Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sage9.2: Install gap_packages on macOS 10.15 fails

I have tried to install the sage package gap_packages as following

$ sage -v
SageMath version 9.2, Release Date: 2020-10-24
$ sage -i gap_packages

on macOS 10.15 (Catalina) returns

Building GAP package cohomolo-1.6.7
Building gap_packages-4.10.2.p1
mkdir -p bin/x86_64-apple-darwin19.6.0-default64-kv3;
cd standalone/progs.d;\
    make CC="gcc" BIN="..//..//bin/x86_64-apple-darwin19.6.0-default64-kv3" COPTS=""
gcc -c -O -fno-builtin gpd.c 
gpd.c:37:7: error: implicit declaration of function 'gpprog' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  if (gpprog()== -1) exit(1);
      ^
1 error generated.
make[4]: *** [gpd.o] Error 1
make[3]: *** [all] Error 2
********************************************************************************
Error building gap_packages-4.10.2.p1
********************************************************************************

real    0m1.379s
user    0m0.132s
sys 0m1.200s
************************************************************************
Error installing package gap_packages-4.10.2.p1
************************************************************************
Please email sage-devel
explaining the problem and including the log file
  /Applications/SageMath/logs/pkgs/gap_packages-4.10.2.p1.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/Applications/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '/Applications/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1' && '/Applications/SageMath/sage' --buildsh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************

Compiler from XCode:

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.27)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

The error can be disabled with the compiler flag -Wno-implicit-function-declaration.

I could proceed with the compilation as following by editing manually the Makefile with vim

$ (cd '/Applications/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1' && '/Applications/SageMath/sage' --buildsh)
$ cd src/pkg/cohomolo-1.6.7/
$ vim Makefile

I have modified the rule all to following:

all:
    mkdir -p bin/x86_64-apple-darwin19.6.0-default64-kv3;
    cd standalone/progs.d;\
    $(MAKE) CC="$(CC) -Wno-implicit-function-declaration" BIN="..//..//$(BIN)" COPTS="$(COPTS)"

Now at least I can run make

 $ pwd
/Applications/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1/src/pkg/cohomolo-1.6.7
 $ make

How can I finish the installation of gap_packages from this subshell?

click to hide/show revision 2
retagged

Sage9.2: Install gap_packages on macOS 10.15 fails

I have tried to install the sage package gap_packages as following

$ sage -v
SageMath version 9.2, Release Date: 2020-10-24
$ sage -i gap_packages

on macOS 10.15 (Catalina) returns

Building GAP package cohomolo-1.6.7
Building gap_packages-4.10.2.p1
mkdir -p bin/x86_64-apple-darwin19.6.0-default64-kv3;
cd standalone/progs.d;\
    make CC="gcc" BIN="..//..//bin/x86_64-apple-darwin19.6.0-default64-kv3" COPTS=""
gcc -c -O -fno-builtin gpd.c 
gpd.c:37:7: error: implicit declaration of function 'gpprog' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  if (gpprog()== -1) exit(1);
      ^
1 error generated.
make[4]: *** [gpd.o] Error 1
make[3]: *** [all] Error 2
********************************************************************************
Error building gap_packages-4.10.2.p1
********************************************************************************

real    0m1.379s
user    0m0.132s
sys 0m1.200s
************************************************************************
Error installing package gap_packages-4.10.2.p1
************************************************************************
Please email sage-devel
explaining the problem and including the log file
  /Applications/SageMath/logs/pkgs/gap_packages-4.10.2.p1.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/Applications/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '/Applications/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1' && '/Applications/SageMath/sage' --buildsh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************

Compiler from XCode:

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.27)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

The error can be disabled with the compiler flag -Wno-implicit-function-declaration.

I could proceed with the compilation as following by editing manually the Makefile with vim

$ (cd '/Applications/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1' && '/Applications/SageMath/sage' --buildsh)
$ cd src/pkg/cohomolo-1.6.7/
$ vim Makefile

I have modified the rule all to following:

all:
    mkdir -p bin/x86_64-apple-darwin19.6.0-default64-kv3;
    cd standalone/progs.d;\
    $(MAKE) CC="$(CC) -Wno-implicit-function-declaration" BIN="..//..//$(BIN)" COPTS="$(COPTS)"

Now at least I can run make

 $ pwd
/Applications/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1/src/pkg/cohomolo-1.6.7
 $ make

How can I finish the installation of gap_packages from this subshell?