Skip to content

Fix parsing error when finding an existing GMT in macos #1735

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

Merged
merged 1 commit into from
May 21, 2025

Conversation

ZMAlt
Copy link
Contributor

@ZMAlt ZMAlt commented May 21, 2025

I found a fault when I set up the environment to debug external calls. See #1723.

Steps:

  1. compile GMT using Xcode
  2. set $GMT_LIBRARY to /Users/zm/Desktop/git/gmt/xbuild/src/Debug/libgmt.dylib (path of gmtlib compiled using Xcode)
  3. set ENV["SYSTEMWIDE_GMT"] = 1 in julia-repl
  4. using Pkg; Pkg.build("GMT")

However, the build can't parse the correct path of gdal (mebrew/opt/gdal/lib/libgdal.36.dylib) due to the wrong index. So I remove it in this PR.

julia> Pkg.build("GMT")
    Building GMT → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/c584158f845b3ae7ce51df9cd677bc1c5edff29a/build.log`

shell> cat ~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/c584158f845b3ae7ce51df9cd677bc1c5edff29a/build.log
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic: can't open file: mebrew/opt/gdal/lib/libgdal.36.dylib (No such file or directory)
ProcessFailedException(Base.Process[Process(`otool -L mebrew/opt/gdal/lib/libgdal.36.dylib`, ProcessExited(1)), Process(`grep libproj`, ProcessExited(1))])

No GMT system wide installation found

Copy link
Member

@joa-quim joa-quim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I don't remember anymore why I had that indices and it works for you.

Don't understand why the tests are failing. It looks like from where it was launched it has no access to the SECRET that is used to create the ~./cdsapirc file.

@joa-quim joa-quim merged commit dc994ef into GenericMappingTools:master May 21, 2025
1 of 13 checks passed
@ZMAlt ZMAlt deleted the fix_mac_build branch May 22, 2025 04:10
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

Successfully merging this pull request may close these issues.

2 participants