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

Full build from source fails on macOS #48820

Closed
fxcoudert opened this issue Feb 27, 2023 · 4 comments · Fixed by #53894
Closed

Full build from source fails on macOS #48820

fxcoudert opened this issue Feb 27, 2023 · 4 comments · Fixed by #53894
Labels
bug Indicates an unexpected problem or unintended behavior building Build system, or building Julia or its dependencies system:mac Affects only macOS

Comments

@fxcoudert
Copy link
Contributor

Latest julia head, trying a full build from source with:

make VERBOSE=1 USE_BINARYBUILDER=0 prefix=/tmp/toto USE_SYSTEM_CSL=1 PYTHON=python3 MACOSX_VERSION_MIN=13

This fails in configuring curl, with:

checking run-time libs availability... failed
configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lnghttp2 -lssh2 -lssh2 -lz 
make[1]: *** [scratch/curl-7.84.0/build-configured] Error 1

The error is shown in config.log, and it is due to wrong linker paths:

$ clang -mmacosx-version-min=13 -Qunused-arguments -Wno-pointer-bool-conversion -Os -Werror=partial-availability  -I/private/tmp/julia/usr/include -I/private/tmp/julia/usr/include -I/private/tmp/julia/usr/include  -Wl,-rpath,'@loader_path/' -framework CoreFoundation -framework SystemConfiguration -L/private/tmp/julia/usr/lib -framework CoreFoundation -framework Security -L/private/tmp/julia/usr/lib -L/private/tmp/julia/usr/lib a.c -lnghttp2 -lssh2 -lssh2 -lz
$ otool -L ./a.out                      
./a.out:
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1953.255.0)
	/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1241.60.3)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60420.60.24)
	@rpath/libnghttp2.dylib (compatibility version 39.0.0, current version 39.1.0)
	@rpath/libssh2.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/libz.dylib (compatibility version 1.0.0, current version 1.2.13)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
$ ./a.out 
dyld[9337]: Library not loaded: @rpath/libnghttp2.dylib
  Referenced from: <8C6C7EDB-F064-34C0-BD01-D7B49534604B> /private/tmp/julia/deps/scratch/curl-7.84.0/a.out
  Reason: tried: '/private/tmp/julia/deps/scratch/curl-7.84.0/libnghttp2.dylib' (no such file), '/private/tmp/julia/deps/scratch/curl-7.84.0/libnghttp2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libnghttp2.dylib' (no such file), '/private/tmp/julia/deps/scratch/curl-7.84.0/libnghttp2.dylib' (no such file), '/private/tmp/julia/deps/scratch/curl-7.84.0/libnghttp2.dylib' (no such file), '/usr/local/lib/libnghttp2.dylib' (no such file), '/usr/lib/libnghttp2.dylib' (no such file, not in dyld cache)
zsh: abort      ./a.out
@fxcoudert
Copy link
Contributor Author

PS: this is not related to the recent nghttp2 update, as it occurs both before and after that commit.

@ararslan ararslan added bug Indicates an unexpected problem or unintended behavior building Build system, or building Julia or its dependencies system:mac Affects only macOS labels Feb 28, 2023
@fxcoudert
Copy link
Contributor Author

That error is present in 1.9-rc1.

@fxcoudert
Copy link
Contributor Author

Still seeing this in 1.9-rc2

@fxcoudert
Copy link
Contributor Author

Still exists in current master branch 😢

ViralBShah pushed a commit that referenced this issue Mar 29, 2024
Fixes #48820

I think this is the proper fix, and there might be a configure option to
curl or nghttp2 to set it, but I haven't been found it. So we'll do it
that way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior building Build system, or building Julia or its dependencies system:mac Affects only macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants