Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 196bc4e

Browse files
author
Release Manager
committedNov 5, 2023
sagemathgh-36599: sage-env: identify the version of command-line tools (OS X) and set LDFLAGS accordingly Identify the version of command-line tools in use (OS X), and use the version to set LDFLAGS. <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> In sage-env, save the version of command-line tools being used in XCLT_VERSION. If it's too recent, we set LDFLAGS to solve some problems: - Fixes sagemath#36337 (doctest failures) - Fixes sagemath#36342 (scipy building, replacing sagemath#36523). <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [X] The title is concise, informative, and self-explanatory. - [X] The description explains in detail what this PR is about. - [X] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36599 Reported by: John H. Palmieri Reviewer(s): Matthias Köppe
2 parents ebef87a + 543cd2d commit 196bc4e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎src/bin/sage-env

+8-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,14 @@ if [ -n "$PYTHONHOME" ]; then
374374
fi
375375

376376
if [ -n "$SAGE_LOCAL" ]; then
377-
LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
377+
# On OS X, test whether "ld-classic" is present in the installed
378+
# version of the command-line tools. If so, we add "-ld_classic"
379+
# to LD_FLAGS. See #36599.
380+
if [ "$UNAME" = "Darwin" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" ] ; then
381+
LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-ld_classic,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
382+
else
383+
LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
384+
fi
378385
if [ "$UNAME" = "Linux" ]; then
379386
LDFLAGS="-Wl,-rpath-link,$SAGE_LOCAL/lib $LDFLAGS"
380387
fi

0 commit comments

Comments
 (0)
Please sign in to comment.