> On 11 Feb 2025, at 22:01, Sven Verdoolaege <
sven.ver...@telenet.be> wrote:
>
> ... Where do you see that the system libc++ is being used?
In the test logs, for example:
dyld: Symbol not found: __ZTTNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE
Referenced from: /Users/ilg/Work/xpack-dev-tools/gcc-xpack.git/build-assets/build/darwin-arm64/aarch64-apple-darwin20.6.0/build/isl-0.26/.libs/isl_test2
Expected in: /usr/lib/libc++.1.dylib
in /Users/ilg/Work/xpack-dev-tools/gcc-xpack.git/build-assets/build/darwin-arm64/aarch64-apple-darwin20.6.0/build/isl-0.26/.libs/isl_test2
FAIL isl_test2 (exit status: 134)
This is confirmed by otool:
% otool -L /Users/ilg/Work/xpack-dev-tools/gcc-xpack.git/build-assets/build/darwin-arm64/aarch64-apple-darwin20.6.0/build/isl-0.26/.libs/isl_test2
/Users/ilg/Work/xpack-dev-tools/gcc-xpack.git/build-assets/build/darwin-arm64/aarch64-apple-darwin20.6.0/build/isl-0.26/.libs/isl_test2:
/Users/ilg/Work/xpack-dev-tools/gcc-xpack.git/build-assets/build/darwin-arm64/aarch64-apple-darwin20.6.0/install/lib/libisl.23.dylib (compatibility version 27.0.0, current version 27.0.0)
/Users/ilg/Work/xpack-dev-tools/gcc-xpack.git/build-assets/build/darwin-arm64/aarch64-apple-darwin20.6.0/install/lib/libgmp.10.dylib (compatibility version 16.0.0, current version 16.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1200.3.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
For an unknown yet reason, the test binary refers to the system libc++ library, instead of the toolchain library.
> In any case, the flags
>
> '-O2 -v -Wl,-v -Wl,-t -Wl,-macosx_version_min,11.0 -Wl,-headerpad_max_install_names -L/Users/ilg/Work/xpack-dev-tools/gcc-xpack.git/build-assets/build/darwin-arm64/aarch64-apple-darwin20.6.0/install/lib -Wl,-rpath,/Users/ilg/Work/xpack-dev-tools/gcc-xpack.git/build-assets/build/darwin-arm64/aarch64-apple-darwin20.6.0/install/lib -Wl,-rpath,/Users/ilg/Library/xPacks/@xpack-dev-tools/clang/19.1.7-1.1/.content/lib -Wl,-rpath,/Users/ilg/Library/xPacks/@xpack-dev-tools/clang/19.1.7-1.1/.content/lib/clang/19/lib/darwin'
>
> that you specified in LDFLAGS when configuring
> do appear to be used to link the test.
>
> What exactly is missing?
Hmmm... that's weird, the toolchain library is in '/Users/ilg/Library/xPacks/@xpack-dev-tools/clang/19.1.7-1.1/.content/lib' and the rpath to it is present, but the -L is not.
I'll try to further investigate and come back when I have more data.
Thank you for your patience.
Liviu