-
Notifications
You must be signed in to change notification settings - Fork 28
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
julia 1.8.2-5, 1.9 compile error #1052
Comments
Oh dear, Linux is soooo painful. So it looks like booth Julia and GMT were linked against incompatible See if this is of any help https://askubuntu.com/questions/1211782/curl-openssl-4-not-found-required-by-curl |
Hello, Arch wiki states following: `Note: The julia package is compiled against system libraries and is therefore unsupported by the upstream. While it may be suitable for basic usage it is incompatible with external packages (e.g. MKL, LLVM, LLVMExtra, or packages that depend on these, like CUDA or Flux) which rely on Julia's bundled versions of its dependencies. Bugs reported against this binary will be closed. Install julia-binAUR. The package provides official builds compiled against patched LLVM libs.` Because of that, I have downloaded the official julia package from the julia web site which gave above error. I have also tried julia binary which is not officially supported Arch user repository, it gave the same error as well. I have not understood the solution, should I delete the system libcurl library... |
I installed 1.8.3 from julia web site, deleted internal softlink in the installation and linked the system library instead. In this case, julia did not start . |
I'm sorry you are suffering this and I'm also sorry of being of little help here (I'm a Windows guy). Post this in the Julia forum. There are Arch Linux users there. How did you install GMT? Via a package manager? |
I installed in both ways. By using julia binary tarball from https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.3-linux-x86_64.tar.gz and later by downloading and building from Arch Linux User repository. As stated above, Arch advises not to use official repositories because of julia environment depends on the bundled version of LLVM. |
I meant, how did you install GMT (not GMT.jl). Was it the automatic way, which is done via Conda or from the Arch Linux package manager, or even built by yourself? |
I installed gmt via arc linux package manager from official repositories via pacman. However after your post, I removed it and tried using GMT. Julia tried to install it via conda. However I received following error. By the way, I also changed the julia installation location to /opt from home directory.
|
@benibilme, this issue is know (see JuliaLang/julia#34276), use: $ LD_PRELOAD=$(g++ --print-file-name=libstdc++.so) julia
# or if you know the path to your `libstdc++.so`:
$ LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so julia # this is on `ubuntu 22.04` Can you also try: julia> ENV["FORCE_INSTALL_GMT"] = 1
julia> using GMT
[ Info: Precompiling GMT [5752ebe1-31b9-557e-87aa-f909b540aa54]
ErrorException("Forcing an automatic GMT install")
Building GMT ──→ [...]
[...]
julia> GMT.get_GMTver()
Base.IOError("could not spawn `gmt --version`: no such file or directory (ENOENT)", -2)
(v"6.4.0", true, "[...]/conda/lib/libgmt.so", "[...]/conda/lib/./libgdal.so.31", "[...]/conda/lib/././libproj.so.25", "[...]/conda/bin") |
Yes, as @t-bltg said that is a known issue (it lasts since July (!!)) and although it finally was fixed recently it still not in 1.8.3 (really don't understand this, as if this was a minor issue). But it is fixed in 1.9 dev so I think the easiest is to install that Julia version that just got into the alpha stage. Edit: But I suspect the libcurl problem can still persist even with the GMT Conda build. The problem seams really be tied to the Julia shipped libcurl. |
|
You are not using Can you show: $ LD_PRELOAD=$(g++ --print-file-name=libstdc++.so) julia # from your arch terminal
julia> using Libdl
julia> foreach(println, Libdl.dllist())
linux-vdso.so.1
/usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so # uses the system `libstdc++.so`, forced by `LD_PRELOAD`
/lib/x86_64-linux-gnu/libdl.so.2
/lib/x86_64-linux-gnu/libpthread.so.0
/lib/x86_64-linux-gnu/libc.so.6
[...]/bin/../lib/libjulia.so.1 # [...] denotes the directory where downloaded `julia` is extracted
/lib/x86_64-linux-gnu/libm.so.6
/lib64/ld-linux-x86-64.so.2
[...]/bin/../lib/julia/libgcc_s.so.1
[...]/bin/../lib/julia/libopenlibm.so
[...]/bin/../lib/julia/libjulia-internal.so.1
[...]/bin/../lib/julia/libunwind.so.8
/lib/x86_64-linux-gnu/librt.so.1
[...]/bin/../lib/julia/libz.so.1
[...]/bin/../lib/julia/libatomic.so.1
[...]/bin/../lib/julia/libjulia-codegen.so.1
[...]/bin/../lib/julia/libLLVM-13jl.so
[...]/lib/julia/sys.so
[...]/bin/../lib/julia/libpcre2-8.so
[...]/bin/../lib/julia/libgmp.so
[...]/bin/../lib/julia/libmpfr.so
[...]/bin/../lib/julia/libopenblas64_.so
[...]/bin/../lib/julia/libgfortran.so.5
[...]/bin/../lib/julia/libquadmath.so.0
[...]/bin/../lib/julia/libblastrampoline.so
[...]/bin/../lib/julia/libcholmod.so
[...]/bin/../lib/julia/libamd.so.2
[...]/bin/../lib/julia/libcolamd.so.2
[...]/bin/../lib/julia/libsuitesparseconfig.so.5
[...]/bin/../lib/julia/libccolamd.so.2
[...]/bin/../lib/julia/libcamd.so.2
[...]/bin/../lib/julia/libnghttp2.so.14
[...]/bin/../lib/julia/libcurl.so # this is `libcurl` shipped by julia
[...]/bin/../lib/julia/libssh2.so.1
[...]/bin/../lib/julia/libmbedtls.so.14
[...]/bin/../lib/julia/libmbedx509.so.1
[...]/bin/../lib/julia/libmbedcrypto.so.7
julia> using GMT
julia> GMT.get_GMTver() |
Sorry about missing what you pointed out. Following sequence, which you suggested, solved the problem. However, I need to preload libstd for each invokation to do
Below is the additional things that you requested at the above comment.
I would like to be able to use gmt from console or bash as well. Can't OS gmt and julia install gmt live together? |
Can you run:
Maybe the path exists at that location, and Good news, now that you know $ cd /opt/dev/julia-1.8.3/bin
$ mv julia Julia # if this fails, you need to prepend commands with `sudo`
$ echo -e '#!/usr/bin/env bash\nLD_PRELOAD='$(g++ --print-file-name=libstdc++.so)' exec '$(pwd)/'Julia "$@"' >julia
$ chmod +x julia
$ ./julia --version
julia version 1.8.3 # <-- should show this if correct , so now that you run You need to use But now, you can maybe re-install $ ... # reinstall gmt using `pacman` (I guess) on `arch`
$ julia
julia> using Libdl
julia> foreach(println, Libdl.dllist())
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/libstdc++.so # this is the path you want, please confirm
[...] # rest truncated
julia> using GMT
julia> GMT.get_GMTver()
# <-- should use system paths, not paths with `conda` in it ... |
Hello, Thank you for the detailed instructions. Before reading your comment, I had done a similar thing to preload the libstdc++ when ever I started julia. I have local ~/sbin directory in my home, which comes before any path in my I again installed system provided gmt via package manager. Here are the versions.
The list of linked libraries
GMT version
As far as I understand, GMT.jl do not install conda version if the system has available GMT installation. Since I preload the system libstdc++, I presume I should be able to use system gmt even if I remove gmt that comes with conda, I suppose. |
So everything works now ?
Exactly, it tries first to use a system A note to @joa-quim, you might want to set up a
It this works, you can remove the |
I have deleted ~/.julia directory, and going over everthing again to make sure that it is working as expected. Do you think |
No, you shouldn't use it https://github.com/GenericMappingTools/GMT.jl/blob/master/src/GMT.jl#L34, if you use a system one. Using Please also synchronize the discourse post with your findings / updates, for other arch users. |
Unfortunately, without conda gmt installed, it does not work, I still get the initial libcurl not found error. |
That's a pitty. Bad interactions with But since you have |
I am very much new to GMT, still trying to understand it. I guess, that will do. However, I install many packages which seems some of them are heavyweight packages, Makie etc. I believe they must needing libcurl as well. They all compile without problem. I have not checked my assumption. This is my little script to install or update my usual packages in a new environment. Do you thing other packages use system libcurl? I will check them.
|
IDK, I never used |
Thanks for the The current case is, for me, a clear case of Julia and system's libraries incompatibilities. And since there was a very recent (October) release of a libcurl new version, my bet is Arch Linux is using a newer one that Julia. Being true this points into a more general problem with Julia distributing their libraries that may not be in sync with system libraries. The solution would that Julia used those shared libs with different names so a conflict of this nature would never occur, but as you have seen from the tone in the Discourse topic, that is hardly going to happen. But, so that I understand. The Conda installed GMT works? (note, I'm going out for lunch in this beautifully sunny day in Algarve (Pt)) so will not reply in the next couple of hours). |
Yep, the few libraries shipped by
Thanks for pointing out #1049 (comment), I see that you already thought of this, and this is a difficult problem considering that
Here some more implementations I've worked with, in case you need them for inspiration: https://github.com/JuliaParallel/MPI.jl/tree/master/lib/MPIPreferences Some |
Sorry if I gave a wrong impression. GMT exists for more 30 years but it's code has been modernized along these times and it's build with a modern cmake solution. There is noting of Regarding a Meanwhile I found this page and trying one of the suggested thing in there I get from WSL installation.
So Julia's |
I started to see this on CI test as well. Looks like |
Yeap, see my findings in #1113. It's Julia's shipped |
Hello, I would like to report that this problem still persist in my arch/manjaro systems and newly released julia 1.9. I can use GMT.jl only if I use following steps as suggested earlier. GMT is the only package affected and I have pretty hefty packages installed such as Flux, Knet, Makie, Gadfly etc.
I hope, a solution could be found. |
Don't use
|
Hello,
I am new to GMT as well as julia.
I have installed julia 1.8.2 in an arch linux environment. I have installed GMT without issues but it gives error during precompilation while using the module.
Following is the error:
Any help insight much appreciated.
The text was updated successfully, but these errors were encountered: