-
Notifications
You must be signed in to change notification settings - Fork 368
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
macOS bundle doesn't work for pygmt #1930
Comments
Yes, that issue started to be discussed here |
FYI: I pruned my laptop for brew and macports so it has nothing other than Apple bins. I installed the 6.0.0 pre-release bundle, and in a regular bash shell everything works as long as I added the bundle bin to PATH and set PROJ_LIB to bundle share/proj6. The gs works fine without any GS_LIB setting. SO while the bundle may need more work to serve Julia and Python, it will certainly be very helpful to non-Unix Mac users who just want to install and run without learning the full distribution way of life. |
I try to make some changes to the macOS bundle using the following script, and then the bundle works well for CLI, PyGMT, and GMT.jl. What the script does is simple. It replaces cd /Applications/GMT-6.1.1.app/Contents/Resources/lib
for dylib in $(ls *.dylib); do
otool -L $dylib | awk -v lib=$dylib '/^[[:blank:]]*@executable_path/ {printf("install_name_tool -change %s @loader_path/%s %s\n", $1, substr($1, 18), lib)}' | sh
done
for libso in $(ls gmt/plugins/*.so); do
otool -L $libso | awk -v lib=$libso '/^[[:blank:]]*@executable_path/ {printf("install_name_tool -change %s @loader_path/../../%s %s\n", $1, substr($1, 18), lib)}' | sh
done I also build gmtmex against the bundle, copy gmt.m and gmtmex.mexmaci64 to the bundle's bin directory, and change So perhaps when we build the macOS bundle, we should use |
Maybe the cpack command can control the loader/executable_path stuff? I think we are getting whatever default it has, no? |
Perhaps line 192 determines Lines 187 to 199 in 81d4e56
|
It sure looks like that. I am reading https://wincent.com/wiki/%40executable_path%2C_%40load_path_and_%40rpath as well. |
Duplicated from an also closed issue. |
I believe it's a known issue and was reported somewhere, but I can't find it.
The macOS bundle works well for GMT command-line/scripts, but doesn't work for pygmt, and may also not work for GMT.jl.
This is what I get with pygmt:
The text was updated successfully, but these errors were encountered: