Unable to build Sage develop branch on MacOS 10.13.6

72 views
Skip to first unread message

Jing Guo

unread,
Apr 14, 2022, 12:39:32 PMApr 14
to sage-devel
Hi,

I am interested in applying to Sage GSoC so I am trying to build from source by myself, however I encountered the following:

[eclib-20210625] Undefined symbols for architecture x86_64:
[eclib-20210625]   "__ZN3NTLlsERSoRKNS_2RRE", referenced from:
[eclib-20210625]       __Z4asinRKN3NTL2RRE in interface.o
[eclib-20210625]       __Z7longifyRKN3NTL2RRERli in interface.o
[eclib-20210625]       __Z9ratapproxN3NTL2RRERlS1_l in marith.o
[eclib-20210625]       __Z20conic_mordell_reduceRKN3NTL2ZZES2_S2_RS0_S3_S3_i in conic.o
[eclib-20210625]       __Z14reduced_cubicsRKN3NTL2ZZEiii in cubic.o
[eclib-20210625]       __ZStlsIN3NTL2RREcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES8_RKSt7complexIT_E in cperiods.o
[eclib-20210625]       __ZStlsIN3NTL2RREcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES8_RKSt7complexIT_E in isogs.o
[eclib-20210625]       ...
[eclib-20210625]   "__ZN3NTLlsERSoRKNS_2ZZE", referenced from:
[eclib-20210625]       __Z5I2intRKN3NTL2ZZE in interface.o
[eclib-20210625]       __Z6I2longRKN3NTL2ZZE in interface.o
[eclib-20210625]       __Z4showRKN3NTL2ZZE in marith.o
[eclib-20210625]       __Z5chremRKN3NTL2ZZES2_S2_S2_ in marith.o
[eclib-20210625]       __Z12divide_exactRKN3NTL2ZZES2_RS0_ in marith.o
[eclib-20210625]       __Z6invmodRKN3NTL2ZZES2_ in marith.o
[eclib-20210625]       __Z6invmodRKN3NTL2ZZEl in marith.o
[eclib-20210625]       ...
[eclib-20210625]   "__ZN3NTLlsERSoRKNS_3ZZXE", referenced from:
[eclib-20210625]       __ZN3NTLlsINS_4PairINS_3ZZXElEEEERSoS4_RKNS_3VecIT_EE in nfd.o
[eclib-20210625]       __ZN3nfdC1EP8homspaceiiii in nfd.o
[eclib-20210625]   "__ZN3NTLlsERSoRKNS_5ZZ_pXE", referenced from:
[eclib-20210625]       __ZNK6ffmodq6outputERSo in ffmod.o
[eclib-20210625]       __Z6fact_cPN3NTL2ZZEi in mlocsol.o
[eclib-20210625]       __ZN3NTLlsINS_4PairINS_5ZZ_pXElEEEERSoS4_RKNS_3VecIT_EE in mlocsol.o
[eclib-20210625]       __Z9local_solRKN3NTL2ZZEPS0_i in mlocsol.o
[eclib-20210625]   "__ZN3NTLrsERSiRNS_2RRE", referenced from:
[eclib-20210625]       __ZrsRSiRSt7complexIN3NTL2RREE in interface.o
[eclib-20210625]   "__ZN3NTLrsERSiRNS_2ZZE", referenced from:
[eclib-20210625]       __ZN17extra_prime_class14read_from_fileENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi in marith.o
[eclib-20210625]       __Z20read_vec_from_stringNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in marith.o
[eclib-20210625]       __ZrsRSiR5vec_m in mvector.o
[eclib-20210625]       __ZrsRSiR5mat_m in mmatrix.o
[eclib-20210625]       __ZN3NTL4convINS_2ZZEPKcEEN14_ntl_enable_ifIXsr20_ntl_is_char_pointerIT0_E5valueEvE4typeERT_S6_ in mmatrix.o
[eclib-20210625]       __Z10testcancelv in conic.o
[eclib-20210625]       __Z7testsqfv in conic.o
[eclib-20210625]       ...
[eclib-20210625]   "___emutls_v.avma", referenced from:
[eclib-20210625]       __Z15eclib_pari_initl in parifact.o
[eclib-20210625]       __Z6factorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in parifact.o
[eclib-20210625]       __Z8is_primeNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in parifact.o
[eclib-20210625]       __Z5ellapllllll in parifact.o
[eclib-20210625]   "___emutls_v.pari_mainstack", referenced from:
[eclib-20210625]       __Z5ellapllllll in parifact.o
[eclib-20210625] ld: symbol(s) not found for architecture x86_64
[eclib-20210625] collect2: error: ld returned 1 exit status
[eclib-20210625] make[6]: *** [libec.la] Error 1
[eclib-20210625] make[5]: *** [all-recursive] Error 1
[eclib-20210625] *************************************************************************************************************************************************************************************
[eclib-20210625] Error building eclib-20210625
[eclib-20210625] *************************************************************************************************************************************************************************************
[eclib-20210625]
[eclib-20210625] real    8m16.102s
[eclib-20210625] user    6m49.813s
[eclib-20210625] sys    0m53.610s
[eclib-20210625] ************************************************************************
[eclib-20210625] Error installing package eclib-20210625
[eclib-20210625] ************************************************************************
[eclib-20210625] Please email sage-devel (http://groups.google.com/group/sage-devel)
[eclib-20210625] explaining the problem and including the log files
[eclib-20210625]   /Users/Latisp/github/sage/logs/pkgs/eclib-20210625.log
[eclib-20210625] and
[eclib-20210625]   /Users/Latisp/github/sage/config.log
[eclib-20210625] Describe your computer, operating system, etc.
[eclib-20210625] If you want to try to fix the problem yourself, *don't* just cd to
[eclib-20210625] /Users/Latisp/github/sage/local/var/tmp/sage/build/eclib-20210625 and type 'make' or whatever is appropriate.
[eclib-20210625] Instead, the following commands setup all environment variables
[eclib-20210625] correctly and load a subshell for you to debug the error:
[eclib-20210625]   (cd '/Users/Latisp/github/sage/local/var/tmp/sage/build/eclib-20210625' && '/Users/Latisp/github/sage/sage' --buildsh)
[eclib-20210625] When you are done debugging, you can type "exit" to leave the subshell.
[eclib-20210625] ************************************************************************
make[4]: *** [eclib-SAGE_LOCAL-no-deps] Error 1
make[3]: *** [/Users/Latisp/github/sage/local/var/lib/sage/installed/eclib-20210625] Error 2
make[2]: *** [all-start] Error 2

real    8m20.278s
user    6m52.234s
sys    0m54.998s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         eclib-20210625
  last build time: 4 14 23:26
  log file:        /Users/Latisp/github/sage/logs/pkgs/eclib-20210625.log
  build directory: /Users/Latisp/github/sage/local/var/tmp/sage/build/eclib-20210625

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

make[1]: *** [all-start] Error 1
make: *** [all] Error 2

I read relevant post [0] here and used `./configure --enable-download-from-upstream-url` but that still does not solve my problem. So I was wondering that could you give me some hints or possible approaches to resolve this?

Thank you. Please see attached files for the log.

config.log
eclib-20210625.log

Matthias Koeppe

unread,
Apr 14, 2022, 12:56:05 PMApr 14
to sage-devel
The config.log that you sent does not correspond to this build.
It comes from a run of "configure" that ended with the error:
"configure:10277: error: Cannot build Sage on macOS with GNU's gcc. Make use gcc and g++ are actually Clang compilers."

So what needs to be done here is to clean up PATH. I don't know what /opt/local is on your machine, but that's what I'd suggest to remove first.

Jing Guo

unread,
Apr 15, 2022, 8:01:48 AMApr 15
to sage-devel
Thank you. I used MacPorts to install `gcc` but after I did some changes, the problem is now resolved. I installed `libpng` via MacPorts, however, when I am trying to build, this appears:

make --no-print-directory tachyon-SAGE_LOCAL-no-deps
[tachyon-0.98.9.p7] Using cached file /Users/Latisp/github/sage/upstream/tachyon-0.98.9.tar.bz2
[tachyon-0.98.9.p7] tachyon-0.98.9.p7
[tachyon-0.98.9.p7] ====================================================
[tachyon-0.98.9.p7] Setting up build directory for tachyon-0.98.9.p7
[tachyon-0.98.9.p7] Finished extraction
[tachyon-0.98.9.p7] Applying patches from ../patches...
[tachyon-0.98.9.p7] Applying ../patches/Make-arch.patch
[tachyon-0.98.9.p7] patching file unix/Make-arch
[tachyon-0.98.9.p7] Applying ../patches/Make-config.patch
[tachyon-0.98.9.p7] patching file unix/Make-config
[tachyon-0.98.9.p7] Applying ../patches/Makefile.patch
[tachyon-0.98.9.p7] patching file unix/Makefile
[tachyon-0.98.9.p7] Applying ../patches/main.c.patch
[tachyon-0.98.9.p7] patching file demosrc/main.c
[tachyon-0.98.9.p7] ****************************************************
[tachyon-0.98.9.p7] Host system:
[tachyon-0.98.9.p7] Darwin jing.local 17.7.0 Darwin Kernel Version 17.7.0: Fri Oct 30 13:34:27 PDT 2020; root:xnu-4570.71.82.8~1/RELEASE_X86_64 x86_64
[tachyon-0.98.9.p7] ****************************************************
[tachyon-0.98.9.p7] C compiler: gcc
[tachyon-0.98.9.p7] C compiler version:
[tachyon-0.98.9.p7] Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
[tachyon-0.98.9.p7] Apple LLVM version 10.0.0 (clang-1000.11.45.5)
[tachyon-0.98.9.p7] Target: x86_64-apple-darwin17.7.0
[tachyon-0.98.9.p7] Thread model: posix
[tachyon-0.98.9.p7] InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
[tachyon-0.98.9.p7] ****************************************************
[tachyon-0.98.9.p7] Package 'tachyon' is currently not installed
[tachyon-0.98.9.p7] No legacy uninstaller found for 'tachyon'; nothing to do
[tachyon-0.98.9.p7] Building tachyon-0.98.9.p7
[tachyon-0.98.9.p7] make all \
[tachyon-0.98.9.p7]     "ARCH = macosx" \
[tachyon-0.98.9.p7]     "CFLAGS = -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include " \
[tachyon-0.98.9.p7]     "ARFLAGS = r" \
[tachyon-0.98.9.p7]     "STRIP = strip" \
[tachyon-0.98.9.p7]     "LIBS = -L. -ltachyon  -L/Users/Latisp/github/sage/local/lib -lpng -lz "
[tachyon-0.98.9.p7] Building Tachyon Parallel Ray Tracing library
[tachyon-0.98.9.p7] Copyright 1994-2007, John E. Stone
[tachyon-0.98.9.p7] All Rights Reserveed
[tachyon-0.98.9.p7] Making architecture directory ../compile/macosx
[tachyon-0.98.9.p7] Making library directory ../compile/macosx/libtachyon
[tachyon-0.98.9.p7] make ../compile ../compile/macosx ../compile/macosx/libtachyon  ../compile/macosx/libtachyon.a  ../compile/macosx/tachyon
[tachyon-0.98.9.p7] make[7]: Nothing to be done for `../compile'.
[tachyon-0.98.9.p7] make[7]: Nothing to be done for `../compile/macosx'.
[tachyon-0.98.9.p7] make[7]: Nothing to be done for `../compile/macosx/libtachyon'.
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/api.c -o ../compile/macosx/libtachyon/api.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/apigeom.c -o ../compile/macosx/libtachyon/apigeom.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/box.c -o ../compile/macosx/libtachyon/box.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/global.c -o ../compile/macosx/libtachyon/global.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/hash.c -o ../compile/macosx/libtachyon/hash.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/parallel.c -o ../compile/macosx/libtachyon/parallel.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/threads.c -o ../compile/macosx/libtachyon/threads.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/camera.c -o ../compile/macosx/libtachyon/camera.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/render.c -o ../compile/macosx/libtachyon/render.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/trace.c -o ../compile/macosx/libtachyon/trace.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/grid.c -o ../compile/macosx/libtachyon/grid.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/intersect.c -o ../compile/macosx/libtachyon/intersect.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/sphere.c -o ../compile/macosx/libtachyon/sphere.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/plane.c -o ../compile/macosx/libtachyon/plane.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/ring.c -o ../compile/macosx/libtachyon/ring.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/triangle.c -o ../compile/macosx/libtachyon/triangle.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/cylinder.c -o ../compile/macosx/libtachyon/cylinder.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/quadric.c -o ../compile/macosx/libtachyon/quadric.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/extvol.c -o ../compile/macosx/libtachyon/extvol.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/vol.c -o ../compile/macosx/libtachyon/vol.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/ui.c -o ../compile/macosx/libtachyon/ui.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/util.c -o ../compile/macosx/libtachyon/util.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/vector.c -o ../compile/macosx/libtachyon/vector.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/shade.c -o ../compile/macosx/libtachyon/shade.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/texture.c -o ../compile/macosx/libtachyon/texture.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/coordsys.c -o ../compile/macosx/libtachyon/coordsys.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/imap.c -o ../compile/macosx/libtachyon/imap.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/light.c -o ../compile/macosx/libtachyon/light.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/imageio.c -o ../compile/macosx/libtachyon/imageio.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/jpeg.c -o ../compile/macosx/libtachyon/jpeg.o
[tachyon-0.98.9.p7] gcc -Os -ffast-math -DBsd  -DUSEPNG    -I/Users/Latisp/github/sage/local/include  -c ../src/pngfile.c -o ../compile/macosx/libtachyon/pngfile.o
[tachyon-0.98.9.p7] ../src/pngfile.c:33:10: fatal error: 'png.h' file not found
[tachyon-0.98.9.p7] #include "png.h" /* the libpng library headers */
[tachyon-0.98.9.p7]          ^~~~~~~
[tachyon-0.98.9.p7] 1 error generated.
[tachyon-0.98.9.p7] make[7]: *** [../compile/macosx/libtachyon/pngfile.o] Error 1
[tachyon-0.98.9.p7] make[6]: *** [all] Error 2
[tachyon-0.98.9.p7] make[5]: *** [macosx] Error 2
[tachyon-0.98.9.p7] *************************************************************************************************************************************************************************************
[tachyon-0.98.9.p7] Error building tachyon-0.98.9.p7
[tachyon-0.98.9.p7] *************************************************************************************************************************************************************************************
[tachyon-0.98.9.p7]
[tachyon-0.98.9.p7] real    0m5.091s
[tachyon-0.98.9.p7] user    0m3.581s
[tachyon-0.98.9.p7] sys    0m1.254s
[tachyon-0.98.9.p7] ************************************************************************
[tachyon-0.98.9.p7] Error installing package tachyon-0.98.9.p7
[tachyon-0.98.9.p7] ************************************************************************
[tachyon-0.98.9.p7] Please email sage-devel (http://groups.google.com/group/sage-devel)
[tachyon-0.98.9.p7] explaining the problem and including the log files
[tachyon-0.98.9.p7]   /Users/Latisp/github/sage/logs/pkgs/tachyon-0.98.9.p7.log
[tachyon-0.98.9.p7] and
[tachyon-0.98.9.p7]   /Users/Latisp/github/sage/config.log
[tachyon-0.98.9.p7] Describe your computer, operating system, etc.
[tachyon-0.98.9.p7] If you want to try to fix the problem yourself, *don't* just cd to
[tachyon-0.98.9.p7] /Users/Latisp/github/sage/local/var/tmp/sage/build/tachyon-0.98.9.p7 and type 'make' or whatever is appropriate.
[tachyon-0.98.9.p7] Instead, the following commands setup all environment variables
[tachyon-0.98.9.p7] correctly and load a subshell for you to debug the error:
[tachyon-0.98.9.p7]   (cd '/Users/Latisp/github/sage/local/var/tmp/sage/build/tachyon-0.98.9.p7' && '/Users/Latisp/github/sage/sage' --buildsh)
[tachyon-0.98.9.p7] When you are done debugging, you can type "exit" to leave the subshell.
[tachyon-0.98.9.p7] ************************************************************************
make[4]: *** [tachyon-SAGE_LOCAL-no-deps] Error 1
make[3]: *** [/Users/Latisp/github/sage/local/var/lib/sage/installed/tachyon-0.98.9.p7] Error 2

make[2]: *** [all-start] Error 2

real    0m53.825s
user    0m39.089s
sys    0m12.396s

***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         tachyon-0.98.9.p7
  last build time: 4 15 19:57
  log file:        /Users/Latisp/github/sage/logs/pkgs/tachyon-0.98.9.p7.log
  build directory: /Users/Latisp/github/sage/local/var/tmp/sage/build/tachyon-0.98.9.p7


It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.
config.log
tachyon-0.98.9.p7.log

Matthias Koeppe

unread,
Apr 15, 2022, 1:53:28 PMApr 15
to sage-devel
Using macports is currently untested. I have a branch for macports support in https://trac.sagemath.org/ticket/31505 (which I've just rebased on the current release candidate). Please try with this.

Jing Guo

unread,
Apr 16, 2022, 5:53:07 AMApr 16
to sage-devel
Thank you, Prof. Koeppe.

I was just wondering that is there another way to resolve this without having to "build everything" from scartch again?

Adarsh Kishore

unread,
Apr 16, 2022, 6:29:46 AMApr 16
to sage-devel
Hello, 

Not sure if I am the best person to answer this (I am not a maintainer).
But as far as I know, the only way to get all dependencies correct would be to build from scratch. Because one thing is linked symbolically in many places, so to update all of them would require a complete build from scratch.

Hope that helps

Reply all
Reply to author
Forward
0 new messages