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

libnghttp2.la referenced in libcurl.la but missing (LibCURL_jll v7.73.0+6) #5031

Closed
Alexander-Barth opened this issue Jun 14, 2022 · 5 comments

Comments

@Alexander-Barth
Copy link
Contributor

While trying to compile NetCDF 4.9.0 with LibCURL_jll v7.73.0+6, I see this error:

[11:40:07] /bin/sh ../libtool  --tag=CXX   --mode=link c++  -g -O2  -L/workspace/destdir/lib -o libncxml.la  ncxml_xml2.lo  -lhdf5_hl -lhdf5 -lm -lz -ldl -lxml2 -lcurl 
[11:40:07] grep: /workspace/destdir/lib/libnghttp2.la: No such file or directory
[11:40:07] sed: /workspace/destdir/lib/libnghttp2.la: No such file or directory
[11:40:07] libtool:   error: '/workspace/destdir/lib/libnghttp2.la' is not a valid libtool archive
[11:40:07] make[2]: *** [Makefile:530: libncxml.la] Error 1

In fact the file libnghttp2.la is referenced in libcurl.la

sandbox:${WORKSPACE}/destdir/lib # grep libnghttp2.la /workspace/destdir/lib/libcurl.la
dependency_libs=' -L/workspace/destdir/lib /workspace/destdir/lib/libnghttp2.la -lssh2 -lmbedtls -lmbedx509 -lmbedcrypto -lz -lrt'

Only binaries of libnghttp2 are currently distributed:

sandbox:${WORKSPACE}/destdir/lib # ls /workspace/destdir/lib/libnghttp2*
/workspace/destdir/lib/libnghttp2.a           /workspace/destdir/lib/libnghttp2.so          /workspace/destdir/lib/libnghttp2.so.14       /workspace/destdir/lib/libnghttp2.so.14.21.2

If I use LibCURL_jll v7.81.0+0, I don't get this error during build-time but at runtime Mac OS complains with on julia 1.8:

dlopen(/Users/runner/.julia/artifacts/2906ec26bc4c6a3f0b45255d1d933904f49abf30/lib/libnetcdf.19.dylib, 1): Library not loaded: @rpath/libcurl.4.dylib
  Referenced from: /Users/runner/.julia/artifacts/[29](https://github.com/Alexander-Barth/NCDatasets.jl/runs/6876791696?check_suite_focus=true#step:8:30)06ec26bc4c6a3f0b45255d1d933904f49abf[30](https://github.com/Alexander-Barth/NCDatasets.jl/runs/6876791696?check_suite_focus=true#step:8:31)/lib/libnetcdf.19.dylib
  Reason: Incompatible library version: libnetcdf.19.dylib requires version 13.0.0 or later, but libcurl.4.dylib provides version 12.0.0

I guess this means that libcurl is too new.

@giordano
Copy link
Member

giordano commented Jun 14, 2022

Delete all *.la files. For context: we now do this automatically during audit thanks to JuliaPackaging/BinaryBuilder.jl#1105, but can't do much for old builds (apart from automatically deleting them before entering the build environment, but I'm a bit wary of doing that blindly)

@Alexander-Barth
Copy link
Contributor Author

OK, this is good to know! I am a bit confused which version of libcurl we would use for julia 1.8. Is is correct to compile and link against 7.73.0+6 ?

@giordano
Copy link
Member

If you're requiring Julia v1.8 anyway in the JLL package, then you can use 7.81.0: https://github.com/JuliaLang/julia/blob/6368fdc6565857b2f2332f8ce74259009184eb62/stdlib/LibCURL_jll/Project.toml#L3

@Alexander-Barth
Copy link
Contributor Author

Do you maybe have any idea why I get this error on Mac?

dlopen(/Users/runner/.julia/artifacts/2906ec26bc4c6a3f0b45255d1d933904f49abf30/lib/libnetcdf.19.dylib, 1): Library not loaded: @rpath/libcurl.4.dylib
  Referenced from: /Users/runner/.julia/artifacts/[29](https://github.com/Alexander-Barth/NCDatasets.jl/runs/6876791696?check_suite_focus=true#step:8:30)06ec26bc4c6a3f0b45255d1d933904f49abf[30](https://github.com/Alexander-Barth/NCDatasets.jl/runs/6876791696?check_suite_focus=true#step:8:31)/lib/libnetcdf.19.dylib
  Reason: Incompatible library version: libnetcdf.19.dylib requires version 13.0.0 or later, but libcurl.4.dylib provides version 12.0.0

Link to CI: https://github.com/Alexander-Barth/NCDatasets.jl/runs/6876791696?check_suite_focus=true

(I have this error actually with libcurl 7.81.0 and 7.73.0, NetCDF_jll is generated by this script)

@Alexander-Barth
Copy link
Contributor Author

Removing the *.la files solved indeed my original problem (and it is not necessary anyways when using LibCURL 7.81.0). I have opened a separate issue concerning curl version mismatch (JuliaPackaging/BinaryBuilder.jl#1210) as you know :-)

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants