This looks pretty complicated.
I
used XCode 15.0.1 to build the macOS SageMath-10-3 app for Arm and
XCode 13.4 for Intel. I got "duplicate rpaths" and "duplicate
libraries" warnings with 15.0.1 but not with 13.4. I pasted typical gcc
commands (from cvxopt) below. You can see that:
(1) Both commands contain duplicate rpath specifications but XCode 13.4 does not warn about them
(2) duplicate libraries and invalid library search paths only occur with XCode 15.01.
(3)
With 15.0.1 the gcc command does not include the linker option
-ld_classic, so the code in sage-env is not actually succeeding in using
the old linker. (But the build works anyway.)
It is not clear to me that Sage is responsible for the duplicates, since it seems to depend on the XCode version, and
it is not clear to me that the code in sage-env that aims to use the old
linker has any effect, on spkgs anyway.
- Marc
XCode 15.0.1 on Arm:
-----------------------------------
gcc
-bundle -undefined dynamic_lookup
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-Wl,-platform_version,macos,11.0,11.1
-L/Library/Developer/CommandLineTools/SDKs/macOSX.sdk/usr/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/var/lib/sage/venv-python3.11.1/lib
-L. -Wl,-rpath,. -L/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-Wl,-platform_version,macos,11.0,11.1
-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-Wl,-platform_version,macos,11.0,11.1
-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -O2
-mmacosx-version-min=11.0
build/temp.macosx-11.0-arm64-cpython-311/src/C/base.o
build/temp.macosx-11.0-arm64-cpython-311/src/C/dense.o
build/temp.macosx-11.0-arm64-cpython-311/src/C/sparse.o
-L/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/var/lib/sage/venv-python3.11.1/lib
-lm -lopenblas -lopenblas -o
build/lib.macosx-11.0-arm64-cpython-311/cvxopt/
base.cpython-311-darwin.so ld: warning: duplicate -rpath '/private/var/tmp/sage-10.3-current/local/lib' ignored
ld: warning: duplicate -rpath '/private/var/tmp/sage-10.3-current/local/lib' ignored
ld: warning: duplicate -rpath '/private/var/tmp/sage-10.3-current/local/lib' ignored
ld: warning: duplicate -rpath '/private/var/tmp/sage-10.3-current/local/lib' ignored
ld: warning: duplicate -rpath '/private/var/tmp/sage-10.3-current/local/lib' ignored
ld: warning: ignoring duplicate libraries: '-lopenblas'
ld: warning: search path '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib' not found
ld: warning: search path '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib' not found
ld: warning: search path '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib' not found
ld: warning: duplicate LC_RPATH are deprecated ('/private/var/tmp/sage-10.3-current/local/lib')
XCode 13.4 on Intel:
--------------------------------
gcc
-bundle -undefined dynamic_lookup
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-Wl,-platform_version,macos,10.9,11.3
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/var/lib/sage/venv-python3.11.1/lib
-L. -Wl,-rpath,. -L/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-Wl,-platform_version,macos,10.9,11.3
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/lib
-Wl,-rpath,/private/var/tmp/sage-10.3-current/local/lib
-Wl,-platform_version,macos,10.9,11.3 -O2 -mmacosx-version-min=10.9
-mno-avx -mno-avx2 -mno-bmi2
build/temp.macosx-10.9-x86_64-cpython-311/src/C/base.o
build/temp.macosx-10.9-x86_64-cpython-311/src/C/dense.o
build/temp.macosx-10.9-x86_64-cpython-311/src/C/sparse.o
-L/private/var/tmp/sage-10.3-current/local/lib
-L/private/var/tmp/sage-10.3-current/local/var/lib/sage/venv-python3.11.1/lib
-lm -lopenblas -lopenblas -o
build/lib.macosx-10.9-x86_64-cpython-311/cvxopt/
base.cpython-311-darwin.so ld: warning: passed two min versions (10.9, 10.9) for platform macOS. Using 10.9.
ld: warning: passed two min versions (10.9, 10.9) for platform macOS. Using 10.9.
ld: warning: passed two min versions (10.9, 10.9) for platform macOS. Using 10.9.
- Marc