-
Notifications
You must be signed in to change notification settings - Fork 30
could not load library "libgmt" #298
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
Comments
Hi, I'm asking this because from the error message the problem seems to be that there is dependency conflict between the libcurl expected by GMT ( |
Hi. I download gmt export PATH="/Applications/GMT-6.0.0rc4.app/Contents/Resources/bin/:$PATH" |
No, it should be fine. @PaulWessel, @seisman Any idea where this libcurl dependency conflict is coming from in the GMT dmg? |
But you didn’t answer. Does it work when you run gmt from the bash shell?
…Sent from my iDedo
No dia 17/09/2019, às 02:23, Mao Zhou <[email protected]> escreveu:
Hi. I download gmt DMG from Github and add it to my PATH. Is there any problem ?
export PATH="/Applications/GMT-6.0.0rc4.app/Contents/Resources/bin/:$PATH"
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
of course ~ $ gmt
GMT - The Generic Mapping Tools, Version 6.0.0rc4 [64-bit] [4 cores]
(c) 1991-2019 The GMT Team (https://www.generic-mapping-tools.org/team.html).
Supported in part by the US National Science Foundation (http://www.nsf.gov/)
and volunteers from around the world.
GMT is distributed under the GNU LGP License (http://www.gnu.org/licenses/lgpl.html).
usage: gmt [options]
gmt <module name> [<module-options>]
options:
--help List descriptions of available GMT modules.
--new-script Write GMT modern mode script template to stdout.
--show-bindir Show directory with GMT executables.
--show-citation Show the most recent citation for GMT.
--show-cores Show number of available cores.
--show-datadir Show directory/ies with user data.
--show-dataserver Show URL of the remote GMT data server.
--show-doi Show the DOI for the current release.
--show-modules Show all module names.
--show-library Show path of the shared GMT library.
--show-plugindir Show directory for plug-ins.
--show-sharedir Show directory for shared GMT resources.
--version Print GMT version number.
if <module-options> is '=' we call exit (0) if module exist and non-zero otherwise. |
macOS ships its own libcurl. Maybe GMT.jl found the system libcurl first.
|
I have a slightly different error with the same commands:
|
That’s kind of what I thought. But why isn’t the libgmt.dylib pointing to the GMT’s libcurl? That’s the idea of having a bundle.
Can you please run otool on the libgmt.dylib?
…Sent from my iDedo
No dia 17/09/2019, às 14:35, Dongdong Tian <[email protected]> escreveu:
macOS ships its own libcurl. Maybe GMT.jl found the system libcurl first.
$ otool -L /usr/lib/libcurl.4.dylib
/usr/lib/libcurl.4.dylib:
/usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 9.0.0)
/usr/lib/libcrypto.42.dylib (compatibility version 43.0.0, current version 43.0.0)
/usr/lib/libssl.44.dylib (compatibility version 45.0.0, current version 45.1.0)
/System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.4.0)
/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 6.0.0)
/usr/lib/libapple_nghttp2.dylib (compatibility version 1.0.0, current version 1.24.1)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
$ otool -L /Applications/GMT-6.0.0rc4.app/Contents/Resources/lib/libcurl.4.dylib
/Applications/GMT-6.0.0rc4.app/Contents/Resources/lib/libcurl.4.dylib:
@executable_path/../lib/libcurl.4.dylib (compatibility version 10.0.0, current version 10.0.0)
@executable_path/../lib/libidn2.0.dylib (compatibility version 4.0.0, current version 4.6.0)
@executable_path/../lib/libpsl.5.dylib (compatibility version 9.0.0, current version 9.2.0)
@executable_path/../lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
And let me guess. If you don’t do the step
push!(Libdl.DL_LOAD_PATH
(that I needed once but probably should not be needed) and use your own GMT build, then the Julia wrapper works fine.
…Sent from my iDedo
No dia 17/09/2019, às 14:45, Dongdong Tian <[email protected]> escreveu:
I have a slightly different error with the same commands:
julia> using Libdl
julia> push!(Libdl.DL_LOAD_PATH, "/Applications/GMT-6.0.0rc4.app/Contents/Resources/lib")
julia> using GMT
julia> coast(region=:global, proj=:Winkel, frame=:g, area=10000,
land=:burlywood4, water=:wheat1, figsize=12, show=true)
ERROR: error compiling finish_PS_module: error compiling gmt: could not load library "libgmt"
dlopen(/Applications/GMT-6.0.0rc4.app/Contents/Resources/lib/libgmt.dylib, 1): Library not loaded: @executable_path/../lib/libgdal.26.dylib
Referenced from: /Applications/GMT-6.0.0rc4.app/Contents/Resources/lib/libgmt.dylib
Reason: image not found
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yes, the julia wrapper works with my own GMT build. |
Thanks. |
PyGMT also has the some problem with the DMG package, but works with my own build. |
If |
This is similar to the issue we have with Matlab where Matlab tells gmt to use its netcdf despite libgmt pointing to another libnetcdf. |
Yes, except that now we can't blame TMW. |
We may need help from someone who understands how shared libraries find other shared libraries and how that is affected by linker flags. There has to be a way to prevent some rogue application from overriding the sequence of dependency in our shared library. |
FYI, GMT from homebrew works for both GMT.jl and PyGMT. |
The man ld command on macOS talks about linking and how symbols are resolved. I wonder if some of those options are needed but cannot fully understand what to do. |
If we could figure out how this works we may solve the long-standing crap with MATLAB as well. We should try to understand link options better. |
@ZMAlt As you see OSX plays mysterious tricks with us. I'm afraid that for the moment the recommendation install GMT from any of the other alternatives but the bundle. Because 6.0.0 is not yet officially released Homebrew does not have the formula yet, but, if you have homebrew, you can install GMTrc4 with
|
One thing that surprised me in the otool output was that it says This is issue is also slightly different from the MEX one. Here the normal build works and it's the bundle, who also tries to protect from the dll hell, that doesn't. |
@joa-quim OK! Thanks |
@joa-quim have you considered using BinaryBuilder to provide the library? |
@giordano Although GMT can be built without GDAL it would be too crippled without it and GDAL is a complex dependency (for example GDAL.jl is rather limited in drivers). On the other hand BinaryBuilder would require a MinGW build on Windows, which is something I'm not willing to accept. I understand how that would easy life for many users but for the moment out of my reach. Let's see how the new |
MacOS
gmt6 rc4
The text was updated successfully, but these errors were encountered: