GAP.jl icon indicating copy to clipboard operation
GAP.jl copied to clipboard

Trouble installing GAP package `nq` (and hence `hap`) on macOS

Open fingolfin opened this issue 2 years ago • 4 comments

Getting this with latest GAP.jl master:

julia> GAP.Packages.install("nq")
#I  Getting PackageInfo URLs...
#I  Retrieving PackageInfo.g from https://gap-packages.github.io/nq/PackageInfo.g ...
#I  Downloading archive from URL https://github.com/gap-packages/nq/releases/download/v2.5.10/nq-2.5.10.tar.gz ...
#I  Saved archive to /var/folders/d_/1zss2fnd6xdgclqnj8jj_27m0000gp/T//gaptempdirrxth3u/nq-2.5.10.tar.gz.pkgman
#I  Extracting to /Users/mhorn/.julia/gaproot/v4.12/pkg/nq-2.5.10 ...
#I  Checking dependencies for nq...
#I    polycyclic 2.11: true
#I  Package ``nq'': The executable program is not available
#I  Running compilation script on /Users/mhorn/.julia/gaproot/v4.12/pkg/nq-2.5.10 ...
#I  Possible error detected: see log at /var/folders/d_/1zss2fnd6xdgclqnj8jj_27m0000gp/T//gaptempdirKXQUeD/exec-log.txt
#I  Compilation failed for package 'nq' (package may still be usable)
#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 availability test failed
#I  (for nq 2.5.10)
#I  Removed directory /Users/mhorn/.julia/gaproot/v4.12/pkg/nq-2.5.10
false

fingolfin avatar Aug 21 '23 07:08 fingolfin

Does the mentioned log file give any idea what went wrong?

(I cannot check the macOS version. When I try the same under Linux, I get a few warnings from the compilation step, but the return value is true.)

ThomasBreuer avatar Aug 21 '23 07:08 ThomasBreuer

Sorry, I should have mentioned that it works under Linux.

I cannot check the logs because PackageManager deletes them; and it also deletes the failed directory, so I can't debug the output of that either.

I've logged this as a debugging issue two years ago at https://github.com/gap-packages/PackageManager/issues/66 ...

I think it would be great if we had a kwarg debug=true/false for GAP.Packages.install; if set to true we'd instruct PackageManager to not delete the log and package directory. Of course that then also requires a corresponding feature in PackageManager

fingolfin avatar Aug 21 '23 08:08 fingolfin

I made https://github.com/gap-packages/PackageManager/issues/66 to help with this debug idea.

Perhaps we can also have debug change the InfoPackageManager info level to 2 or 3 or so

fingolfin avatar Aug 21 '23 08:08 fingolfin

PR for "debug" feature is upcoming. In the meantime, it yielded this:

...
checking for a sed that does not truncate output... /opt/homebrew/bin/gsed
checking for GAP root directory... /Users/mhorn/.julia/scratchspaces/c863536a-3901-11e9-33e7-d5cd0df7b904/gap_7216319432009064789_1.9
checking for GAP architecture... aarch64-apple-darwin20-julia1.9-64-kv8
with_gaproot = /Users/mhorn/.julia/scratchspaces/c863536a-3901-11e9-33e7-d5cd0df7b904/gap_7216319432009064789_1.9
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
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  Checking dependencies for nq...
#I    polycyclic 2.11: true
#I  Package ``nq'': The executable program is not available
#I  Package availability test failed
#I  (for nq 2.5.10)
false

sigh OK I know in principle how to deal with it.

fingolfin avatar Aug 21 '23 09:08 fingolfin