8000 CI temporary fix for linking against system libs by glemaitre · Pull Request #20654 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

CI temporary fix for linking against system libs #20654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions build_tools/azure/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ if [[ "$DISTRIB" == "conda" ]]; then
# instead because llvm-ar errors
export AR=/usr/bin/ar
fi
else
# FIXME: temporary fix to link against system libraries on linux
export LDFLAGS="$LDFLAGS -Wl,--sysroot=/"
fi
make_conda $TO_INSTALL
setup_ccache
Expand All @@ -81,6 +84,8 @@ elif [[ "$DISTRIB" == "debian-32" ]]; then
$(get_dep joblib $JOBLIB_VERSION)

elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then
# FIXME: temporary fix to link against system libraries on linux
export LDFLAGS="$LDFLAGS -Wl,--sysroot=/"
# Since conda main channel usually lacks behind on the latest releases,
# we use pypi to test against the latest releases of the dependencies.
# conda is still used as a convenient way to install Python and pip.
Expand All @@ -96,6 +101,8 @@ elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then
# and install a version less than 3.0.0 until the issue #18316 is solved.
python -m pip install "lightgbm<3.0.0" --no-deps
elif [[ "$DISTRIB" == "conda-pip-scipy-dev" ]]; then
# FIXME: temporary fix to link against system libraries on linux
export LDFLAGS="$LDFLAGS -Wl,--sysroot=/"
make_conda "ccache python=$PYTHON_VERSION"
python -m pip install -U pip
echo "Installing numpy and scipy master wheels"
Expand Down
4 changes: 3 additions & 1 deletion sklearn/_build_utils/openmp_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ def check_openmp_support():
extra_preargs = os.getenv("LDFLAGS", None)
if extra_preargs is not None:
extra_preargs = extra_preargs.strip().split(" ")
# FIXME: temporary fix to link against system libraries on linux
# "-Wl,--sysroot=/" should be removed
extra_preargs = [
flag
for flag in extra_preargs
if flag.startswith(("-L", "-Wl,-rpath", "-l"))
if flag.startswith(("-L", "-Wl,-rpath", "-l", "-Wl,--sysroot=/"))
]

extra_postargs = get_openmp_flag
Expand Down
0