Macaulay2 / homebrew-tap

The Macaulay2 tap for Homebrew
6 stars 7 forks source link

factory fails to install on apple m1 arm64 #195

Closed mikestillman closed 10 months ago

mikestillman commented 10 months ago

When doing a brew upgrade, I get the following error. Any suggestions @mahrud ?

==> Reinstalling 3 dependents with broken linkage from source:
macaulay2/tap/factory, macaulay2/tap/normaliz, macaulay2/tap/macaulay2
==> Fetching macaulay2/tap/factory
==> Downloading https://www.singular.uni-kl.de/ftp/pub/Math/Factory/factory-4.3.0.tar.gz
############################################################################################################ 100.0%
==> Reinstalling macaulay2/tap/factory 
==> autoreconf -vif
==> ./configure --disable-doxygen-doc --disable-silent-rules --disable-omalloc --without-Singular --with-gmp=/opt/h
==> make
Last 15 lines from /Users/mike/Library/Logs/Homebrew/factory/03.make:
slong fmpq_mpoly_factor_get_exp_si(fmpq_mpoly_factor_t f,
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [cf_factor.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/opt/homebrew/opt/flint/include/ -I/opt/homebrew/opt/ntl/include -I/opt/homebrew/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cfEzgcd.cc -o cfEzgcd.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/opt/homebrew/opt/flint/include/ -I/opt/homebrew/opt/ntl/include -I/opt/homebrew/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cf_globals.cc -o cf_globals.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/opt/homebrew/opt/flint/include/ -I/opt/homebrew/opt/ntl/include -I/opt/homebrew/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cf_hnf.cc  -fno-common -DPIC -o .libs/cf_hnf.o
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/opt/homebrew/opt/flint/include/ -I/opt/homebrew/opt/ntl/include -I/opt/homebrew/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cfGcdUtil.cc -o cfGcdUtil.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/opt/homebrew/opt/flint/include/ -I/opt/homebrew/opt/ntl/include -I/opt/homebrew/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cf_gcd.cc -o cf_gcd.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/opt/homebrew/opt/flint/include/ -I/opt/homebrew/opt/ntl/include -I/opt/homebrew/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cfGcdAlgExt.cc -o cfGcdAlgExt.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/opt/homebrew/opt/flint/include/ -I/opt/homebrew/opt/ntl/include -I/opt/homebrew/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cf_hnf.cc -o cf_hnf.o >/dev/null 2>&1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Looking in the log file, it seems the flint interface is perhaps very different? Here is the first set of errors reported in that file:

cf_factor.cc:460:9: error: use of undeclared identifier 'nmod_poly_factor_init'; did you mean 'nmod_poly_factor_t'?
        nmod_poly_factor_init (result);
        ^
/opt/homebrew/opt/flint/include/flint/nmod_types.h:53:33: note: 'nmod_poly_factor_t' declared here
typedef nmod_poly_factor_struct nmod_poly_factor_t[1];
                                ^
cf_factor.cc:461:33: error: use of undeclared identifier 'nmod_poly_factor'
        mp_limb_t leadingCoeff= nmod_poly_factor (result, f1);
mahrud commented 10 months ago

Factory should be working now.