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

Error installing nq, anupq because GMP can't be found #1064

Open
fingolfin opened this issue Nov 14, 2024 · 0 comments
Open

Error installing nq, anupq because GMP can't be found #1064

fingolfin opened this issue Nov 14, 2024 · 0 comments

Comments

@fingolfin
Copy link
Member

julia> GAP.Packages.install("nq"; debug=true)
#I  Getting PackageInfo URLs...
#I  Retrieving PackageInfo.g from https://gap-packages.github.io/nq/PackageInfo.g ...
#I  The newest version of package "nq" is already installed
#I  Package ``nq'': The executable program is not available
#I  Package ``nq'': The executable program is not available
#I  Running compilation script on /Users/mhorn/.julia/gaproot/v4.13/pkg/nq-2.5.11/ ...
#I  Possible error detected, see log:
#I    + GAPROOT=/Users/mhorn/.julia/scratchspaces/c863536a-3901-11e9-33e7-d5cd0df7b904/gap_7216319432009064789_1.11
#I    + PKGDIR=/Users/mhorn/.julia/gaproot/v4.13/pkg/nq-2.5.11/
#I    + command -v gmake
...
+ ./configure --with-gaproot=/Users/mhorn/.julia/scratchspaces/c863536a-3901-11e9-33e7-d5cd0df7b904/gap_7216319432009064789_1.11
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /opt/homebrew/bin/gmkdir -p
checking for gawk... no
...
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for gmp.h... no
configure: error: Could not locate GMP, the GNU multiprecision library

#I  Package ``nq'': The executable program is not available
#I  Package ``nq'': The executable program is not available
#I  Checking dependencies for nq...
#I    polycyclic 2.11: true
#I  Package ``nq'': The executable program is not available
#I  Package ``nq'': The executable program is not available
#I  Package availability test failed

I tried fixing this by modifying setup.jl to do this (after suitably implementing gmp_artifact_dir)

  sysinfo["GMP_PREFIX"] = gmp_artifact_dir()

This then builds, however the resulting nq executable does not run standalone on macOS (which is what I expected):

dyld[56596]: Library not loaded: '@rpath/libgmp.10.dylib'
  Referenced from: '/Users/mhorn/.julia/gaproot/v4.13/pkg/nq-2.5.11/bin/aarch64-apple-darwin20-julia1.11-64-kv9/nq'
  Reason: tried: '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file)
Abort trap: 6

Perhaps I can fix this by ensuring the nq executable gets a suitable @rpath definition embedded... gotta play with LDFLAGS etc. (and then make sure I can pass them on to the nq build system... huh).

Of course the real plan is still to use JLLs to deal with this issue (instead of running a C compiler); however the binaries in the JLL will actually have the same issue. So we may need to also use BinaryWrappers.jl (in either GAP_pkg_nq.jl, or GAP.jl, or even both?!?)

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

1 participant