Skip to content
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

Build from source of 1.9.0-beta1 to beta4 broken due to suite-sparse #48732

Closed
fxcoudert opened this issue Feb 20, 2023 · 5 comments · Fixed by #48835
Closed

Build from source of 1.9.0-beta1 to beta4 broken due to suite-sparse #48732

fxcoudert opened this issue Feb 20, 2023 · 5 comments · Fixed by #48835
Labels
building Build system, or building Julia or its dependencies external dependencies Involves LLVM, OpenBLAS, or other linked libraries

Comments

@fxcoudert
Copy link
Contributor

Pull request #46348 introduced linker option --warn-unresolved-symbols. This is supported by GNU ld, but not by the macOS system linker, so when building from source we error out with:

2023-02-20T09:18:13.6766340Z checking if the linker (ld) is GNU ld... /Applications/Xcode.app/Contents/Developer/usr/bin/make install INSTALL=/private/tmp/julia-20230220-10153-1cp20up/julia-1.9.0-beta4/deps/scratch/SuiteSparse-5.10.1
2023-02-20T09:18:13.6767810Z clang -mmacosx-version-min=13  -Wl,-rpath,/opt/homebrew/Cellar/julia/1.9.0-beta4/lib/julia -Wl,-rpath,/opt/homebrew/opt/curl/lib -Wl,-rpath,/opt/homebrew/opt/mbedtls@2/lib -Wl,-rpath,/opt/homebrew/opt/openblas/lib -Wl,-rpath,/opt/homebrew/opt/gcc/lib/gcc/current -Wl,-rpath,/opt/homebrew/lib -Wl,-rpath,/usr/lib -L/private/tmp/julia-20230220-10153-1cp20up/julia-1.9.0-beta4/deps/scratch/SuiteSparse-5.10.1/lib -Wl,-rpath,'@loader_path/'  -Wl,--warn-unresolved-symbols -dynamiclib -compatibility_version 5 -current_version 5.10.1 -Wl,-install_name -Wl,@rpath/libsuitesparseconfig.5.dylib -shared -undefined dynamic_lookup SuiteSparse_config.o -o /private/tmp/julia-20230220-10153-1cp20up/julia-1.9.0-beta4/deps/scratch/SuiteSparse-5.10.1/lib/libsuitesparseconfig.5.10.1.dylib -lm -rpath /private/tmp/julia-20230220-10153-1cp20up/julia-1.9.0-beta4/deps/scratch/SuiteSparse-5.10.1/lib
2023-02-20T09:18:13.6768700Z ld: unknown option: --warn-unresolved-symbols
2023-02-20T09:18:13.6768940Z clang: error: linker command failed with exit code 1 (use -v to see invocation)
@fxcoudert
Copy link
Contributor Author

PS: The reason we're building suite-sparse from source is that building against latest suite-sparse (versions 6 or 7) leads to a julia build failure: #47884

@fxcoudert
Copy link
Contributor Author

On macOS, the flag is not necessary: removing -Wl,--warn-unresolved-symbols from deps/libsuitesparse.mk causes no issue and lets the build proceed to a later unrelated failure (#48057).

@vtjnash
Copy link
Sponsor Member

vtjnash commented Feb 20, 2023

Error on undef symbol is the default for macOS platform anyways (same for Windows)

@giordano
Copy link
Contributor

-Wl,--warn-unresolved-symbols was added by @Keno in #46348. Any particular reason why that was important for MSAN, or we can just remove it for all platforms?

@giordano giordano added building Build system, or building Julia or its dependencies external dependencies Involves LLVM, OpenBLAS, or other linked libraries labels Feb 20, 2023
@Keno
Copy link
Member

Keno commented Feb 21, 2023

-Wl,--warn-unresolved-symbols was added by @Keno in #46348. Any particular reason why that was important for MSAN, or we can just remove it for all platforms?

Yes. SuiteSparse tries to force errors on undefined symbols, which msan relies on. -Wl,--warn-unresolved-symbols turns that back into warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies external dependencies Involves LLVM, OpenBLAS, or other linked libraries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants