gcc problems on MacOS

58 views
Skip to first unread message

David Roe

unread,
Nov 20, 2023, 5:46:18 PM11/20/23
to sage-devel
I'm trying to build Sage 10.2.rc4 on MacOS 13.3.1 and have been running into multiple errors, some possibly due to Apple upgrading my OS when my laptop went in for repair.  I've managed to get past all of Sage's dependencies, and am currently stuck on an error in sagelib:

g++ -std=gnu++11 -std=gnu++11 -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -L/Users/roed/sage/sage-10.2.rc4/local/lib -Wl,-rpath, .... -L/Users/roed/sage/sage-10.2.rc4/local/lib -lflint -lgmp -lSingular -lpolys -lflint -lmpfr -lgmp -lfactory -lflint -lmpfr -lgmp -lntl -lgmp -lomalloc -lsingular_resources -lgsl -lopenblas -lm -o build/lib.macosx-13-x86_64-cpython-311/sage/symbolic/expression.cpython-311-darwin.so -lpari
error: command '/Users/roed/sage/sage-10.2.rc4/local/libexec/ccache/gcc' failed with exit code 1
(see config.log and sagelib-10.2.rc4.log for more details)

Previously, I did
xcode-select --install
sudo xcode-select --switch /Library/Developer/CommandLineTools
brew install gcc

to get past a build error in scipy
../meson.build:82:0: ERROR: Compiler gfortran cannot compile programs.

I noticed that this is the first g++ call after a bunch of gcc calls, but it doesn't seem to be the first g++ call overall.  Any ideas?
David

Matthias Koeppe

unread,
Nov 20, 2023, 5:51:55 PM11/20/23
to sage-devel
The real error from your log:

    sage/algebras/quatalg/quaternion_algebra_element.cpp:22735:3: error: 'fmpz_poly_scalar_mul_mpz' is deprecated. Use 'fmpz_poly_scalar_mul_fmpz' instead.
      fmpz_poly_scalar_mul_mpz(__pyx_v_self->x, __pyx_v_self->x, __pyx_v_4sage_8algebras_7quatalg_26quaternion_algebra_element_T1);
      ^
    ///usr/local/include/flint/fmpz_poly.h:1263:34: note: expanded from macro 'fmpz_poly_scalar_mul_mpz'
    #define fmpz_poly_scalar_mul_mpz _Pragma("GCC error \"'fmpz_poly_scalar_mul_mpz' is deprecated. Use 'fmpz_poly_scalar_mul_fmpz' instead.\"")
                                     ^
    <scratch space>:433:6: note: expanded from here
     GCC error "'fmpz_poly_scalar_mul_mpz' is deprecated. Use 'fmpz_poly_scalar_mul_fmpz' instead."
         ^

Your config.log says that you are using flint from SPKG. Above refers to a FLINT installation in /usr/local, likely incompatible FLINT 3. Best to uninstall that

David Roe

unread,
Nov 20, 2023, 7:50:36 PM11/20/23
to sage-...@googlegroups.com
Thank you Matthias; clearing out /usr/local/include/flint* and /usr/local/flint* solved the problem.
David

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20f5c300-b82f-48f7-a0fa-a4e978f55030n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages