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

Precompiling error on Julia 1.8.5 on Ubuntu 22.04 #1113

Closed
amarux opened this issue Jan 25, 2023 · 13 comments
Closed

Precompiling error on Julia 1.8.5 on Ubuntu 22.04 #1113

amarux opened this issue Jan 25, 2023 · 13 comments

Comments

@amarux
Copy link

amarux commented Jan 25, 2023

Hi,

I have build GMT 6.4.0 from the latest stable release, and outside Julia gmt run without problems.
However, in a fresh installation of Julia 1.8.5 on Ubuntu 22.04, GMT cannot by installed by add GMT because it fails at precompiling.

If I try to load GMT in Julia by using GMT I got this error:

ERROR: InitError: could not load library "/lib/libgdal.so.30"
/opt/julia-1.8.5/bin/../lib/julia/libcurl.so: version `CURL_OPENSSL_4' not found (required by /lib/libgdal.so.30)
Stacktrace:
 [1] GDALVersionInfo(a1::String)
   @ GMT.Gdal ~/.julia/packages/GMT/7jXvi/src/gdal.jl:331
 [2] __init__()
   @ GMT.Gdal ~/.julia/packages/GMT/7jXvi/src/gdal.jl:2457
 [3] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
   @ Base ./loading.jl:831
 [4] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
   @ Base ./loading.jl:1039
 [5] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1315
 [6] _require_prelocked(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1200
 [7] macro expansion
   @ ./loading.jl:1180 [inlined]
 [8] macro expansion
   @ ./lock.jl:223 [inlined]
 [9] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1144
during initialization of module Gdal

The output of the Julia versioninfo() is:

Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × Intel(R) Core(TM) i3-5010U CPU @ 2.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, broadwell)
  Threads: 4 on 4 virtual cores
Environment:
  JULIA_NUM_THREADS = 4

I think it is the same issue of #1052, but I would like to ask if you known about a temporary solution to work with GMT.jl?

Any insights will be appreciated.

Cheers,

@joa-quim
Copy link
Member

Hi, I'm sorry about this but I don't even understand what causes the error. Specially when you say that outside Julia GMT works fine. Can you please do this experiment. If you hide GMT from Julia (that is, not having it in the system path) then the first time you do add GMT it should automatically install a GMT Conda build. Now, that Conda build should be pretty recent as well but maybe it wont trigger that error. That would e helpful for us to start tracking where the hell this error is coming from.

@joa-quim
Copy link
Member

So I updated my WSL Linux to 22.04 and I'm now screwed as well (same error). But this made me finally see the problem. It's Julia again and it's dependencies. Note that what it complains is about

/opt/julia-1.8.5/bin/../lib/julia/libcurl.so

and not the system libcurl.so and that's why then CLI GMT works but errors from within Julia.

Previous experiences of me reporting Julia conflicts were not completely satisfactory. Would you mind being you bringing this issue in Julia forum or opening an issue there?

@joa-quim
Copy link
Member

You know what worked? Moving Julia's libcurl's out of the way. But I don't know what are the consequences of this for other Julia processes.

j@Marilu:~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/lib/julia$ mv libcurl.so libcurla.so
j@Marilu:~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/lib/julia$ mv libcurl.so.4 libcurla.so.4

@amarux
Copy link
Author

amarux commented Jan 25, 2023

@joa-quim thank you so much for answering so soon.

I removed the gmt that I built previously, and also the .jullia/ and julia-1.8.5 directories.
Then, I reinstalled Julia and run add GMT forcing to install gmt from Conda, just as you recommend.

Under these conditions, in which there is not a gmt on the system, GMT.jl works without problems.
So, installing from Conda is the solution for this particular case.

¡Pura vida!

@joa-quim
Copy link
Member

Glad that you made it work and good to know that the GMT Conda build is still not vulnerable to this problem but I'm afraid that it's just a question of time until it starts being linked against a libcurl version that conflicts with the one shipped by Julia.

@amarux
Copy link
Author

amarux commented Jan 26, 2023

I am going to open an issue in Julia. I hope it helps to find a solution.

If I can help with something else please let me know. I am not an experienced user but, I can learn and try to contribute.

Thank you!

NOTE: I already open an issue in Julia

@joa-quim
Copy link
Member

Thanks, for that. But as you can see it there this seems out of our hands. Julia and some(?) Linux package managers do not agree on what a libcurl should be.

@amarux
Copy link
Author

amarux commented Jan 28, 2023

Yes, I understand that is not easy to solve it.

I am fan of gmt and Julia and, I hope this not avoid to use GMT.jl on next Ubuntu or Arch versions.
By now, using gmt installed with Conda works in Ubuntu 22.04!

Thank you for all!

@joa-quim
Copy link
Member

These troubles should all have gone, right?

@michaelschwob
Copy link

I'm still having these troubles.

@joa-quim
Copy link
Member

Can you please give more info. OS and error messages?

@michaelschwob
Copy link

Hi, joa-quim. I am on Ubuntu 22.04.3 LTS in Julia 1.9.2.
image.
Here is my error message:
image

@joa-quim
Copy link
Member

Preferably do not use screen-captures. Copy past the text messages (wrapped in triple back-ticks) makes them much more readable.

This is a different issue from the original post and not a GMT.jl issue. It's a problem raised bu libcurl but one that has been solved meanwhile. My guess is that you have some package that is holding the update of the netcdf library to version where that problem has been solved.

@joa-quim joa-quim closed this as completed Nov 4, 2024
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

3 participants