Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
347 stars 231 forks source link

Ninja build failing, looks related to boost-regex #1498

Closed kschwede closed 4 years ago

kschwede commented 4 years ago

Following the instructions for the quick build from INSTALL-CMake.mod

git clone https://github.com/Macaulay2/M2.git
cmake -GNinja -S M2/M2 -B M2/M2/BUILD/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
cmake --build M2/M2/BUILD/build --target build-libraries build-programs
cmake --build M2/M2/BUILD/build --target install-packages
cmake --build M2/M2/BUILD/build --target M2-emacs
cmake --install M2/M2/BUILD/build

This fails even before I get to packages. I already have libboost-regex-dev installed (1.71.0.0ubuntu2). Is there something else needed? (Ubuntu 20.04, WSL2).

The classic way of building from source still works. Here is the output when the build fails.

[331/538] Linking CXX executable usr-dist/x86_64-Linux-Ubuntu-20.04/bin/M2-binary
FAILED: usr-dist/x86_64-Linux-Ubuntu-20.04/bin/M2-binary
: && /usr/bin/c++  -O3 -DNDEBUG  -march=native -g3 -L/home/schwede/M2Ninja/M2/M2/BUILD/build/usr-host/lib -fopenmp Macaulay2/d/CMakeFiles/M2-interpreter.dir/M2types.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/M2lib.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/M2mem.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/scclib.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/memdebug.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/debug.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/gmp_aux.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/gdbm_interface.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/arithmetic-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/atomic-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/M2-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/system-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/strings-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/varstrin-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/strings1-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/errio-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/vararray-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/ctype-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/nets-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/varnets-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/interrupts-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/pthread0-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/stdiop0-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/gmp-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/engine-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/xml-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/stdio0-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/parse-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/expr-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/stdio-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/stdiop-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/err-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/gmp1-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/tokens-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/getline-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/lex-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/parser-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/binding-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/basic-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/convertr-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/common-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/util-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/struct-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/classes-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/buckets-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/equality-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/hashtables-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/regex-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/sets-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/evaluate-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/mysqldummy-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/pthread-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/actors-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/actors2-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/actors3-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/actors4-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/xmlactors-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/actors5-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/actors6-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/threads-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/interface-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/interface2-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/texmacs-tmp.c.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/interp-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/version-tmp.cc.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/boost-regex.cpp.o Macaulay2/d/CMakeFiles/M2-interpreter.dir/xml-c.c.o Macaulay2/system/CMakeFiles/M2-supervisor.dir/supervisor.cpp.o Macaulay2/system/CMakeFiles/M2-supervisor.dir/m2file.cpp.o Macaulay2/system/CMakeFiles/M2-supervisor.dir/tests.cpp.o Macaulay2/bin/CMakeFiles/M2-binary.dir/timestamp.cpp.o Macaulay2/bin/CMakeFiles/M2-binary.dir/main.cpp.o Macaulay2/bin/CMakeFiles/M2-binary.dir/startup.c.o  -o usr-dist/x86_64-Linux-Ubuntu-20.04/bin/M2-binary  -Wl,-rpath,:::::::::::::::::::::::::::::::::::::::  /usr/lib/x86_64-linux-gnu/libboost_stacktrace_backtrace.so.1.71.0  Macaulay2/e/libM2-engine.a  -ldl  -lpthread  /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0  /usr/lib/x86_64-linux-gnu/libblas.so  /usr/lib/x86_64-linux-gnu/liblapack.so  /usr/lib/x86_64-linux-gnu/libgivaro.so  usr-host/lib/libmps.a  usr-host/lib/libmathicgb.a  usr-host/lib/libmathic.a  usr-host/lib/libmemtailor.a  usr-host/lib/libfrobby.a  usr-host/lib/libfactory.a  usr-host/lib/libflint.a  /usr/lib/x86_64-linux-gnu/libntl.so  /usr/lib/x86_64-linux-gnu/libmpfr.so  /usr/lib/x86_64-linux-gnu/libgmpxx.so  /usr/lib/x86_64-linux-gnu/libgmp.so  /usr/lib/x86_64-linux-gnu/libgc.so  /usr/lib/x86_64-linux-gnu/libopenblas.so  /usr/lib/x86_64-linux-gnu/libxml2.so  /usr/lib/x86_64-linux-gnu/libreadline.so  /usr/lib/x86_64-linux-gnu/libhistory.so  /usr/lib/x86_64-linux-gnu/libgdbm.so  /usr/lib/x86_64-linux-gnu/libatomic_ops.a  /usr/lib/gcc/x86_64-linux-gnu/9/libgomp.so  /usr/lib/x86_64-linux-gnu/libpthread.so && cd /home/schwede/M2Ninja/M2/M2/BUILD/build/Macaulay2/bin && /usr/bin/cmake -E echo --\ Linked\ libraries: && LD_LIBRARY_PATH=/home/schwede/M2Ninja/M2/M2/BUILD/build/usr-host/lib:/usr/local/lib /usr/bin/ldd /home/schwede/M2Ninja/M2/M2/BUILD/build/usr-dist/x86_64-Linux-Ubuntu-20.04/bin/M2-binary && /usr/bin/cmake -E echo --\ INSTALL_RPATH:\ /usr/lib/x86_64-linux-gnu/Macaulay2/lib
/usr/bin/ld: Macaulay2/d/CMakeFiles/M2-interpreter.dir/boost-regex.cpp.o: in function `boost::cpp_regex_traits<char>::transform_primary(char const*, char const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:966: undefined reference to `boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
/usr/bin/ld: Macaulay2/d/CMakeFiles/M2-interpreter.dir/boost-regex.cpp.o: in function `boost::cpp_regex_traits<char>::transform(char const*, char const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:962: undefined reference to `boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
mahrud commented 4 years ago

That's bizarre! Could you post the full output of cmake -LA . | grep -i boost?

ps: better to use ```[newline][code][newline]``` for multi-line code

kschwede commented 4 years ago

Here you are. The first time I pasted it, it complained about missing programs, but it build programs successfully. I'll try again with a clean clone as well.

## Configure Macaulay2
     M2 version        = 1.16.0.2
     Git commit        = 8103563cf
     Install prefix    = /usr

     CMAKE_BUILD_TYPE  = Release
     BUILD_NATIVE      = ON
     BUILD_SHARED_LIBS = OFF
     BUILD_TESTING     = ON
     BUILD_DOCS        = OFF

     COVERAGE          = OFF
     PROFILING         = OFF

     DEVELOPMENT       = OFF
     EXPERIMENT        = OFF

## Host OS information
     ISSUE             = Ubuntu-20.04
     NODENAME          = 2020AMDComputer
     OS REL            = Linux 4.19.104-microsoft-standard
     ARCH              = x86_64

## Staging area prefixes
     common            = /home/schwede/M2Ninja/M2/M2/BUILD/build/usr-dist/common
     exec              = /home/schwede/M2Ninja/M2/M2/BUILD/build/usr-dist/x86_64-Linux-Ubuntu-20.04

## Compiler information
     C                 = GNU 9.3.0 (/usr/bin/cc)
     C++               = GNU 9.3.0 (/usr/bin/c++)

CHECK_START Checking for existing libraries and programs
CHECK_START Checking library compatibility
CHECK_PASS Libraries are compatible!
CHECK_PASS Everything is in order! �
## External components
     Need to build:
       Libraries       = N/A
       Programs        = N/A
     Already built:
       Libraries       = Flint;Factory;Frobby;MPSolve;GTest;Memtailor;Mathic;Mathicgb
       Programs        = 4ti2;cohomCalg;lrslib;Nauty;TOPCOM

## Library information
     Linear Algebra    = /usr/lib/x86_64-linux-gnu/libopenblas.so
     MP Arithmetic     = /usr/lib/x86_64-linux-gnu/libgmpxx.so;/usr/lib/x86_64-linux-gnu/libgmp.so

Boost_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0
Boost_INCLUDE_DIR:PATH=/usr/include
Boost_REGEX_LIBRARY_RELEASE:STRING=/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0
Boost_STACKTRACE_BACKTRACE_LIBRARY_RELEASE:STRING=/usr/lib/x86_64-linux-gnu/libboost_stacktrace_backtrace.so.1.71.0
boost_headers_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/boost_headers-1.71.0
boost_regex_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/boost_regex-1.71.0
boost_stacktrace_backtrace_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/boost_stacktrace_backtrace-1.71.0
mahrud commented 4 years ago

No need to do a fresh build, having separate components guarantees that a problem in one component (e.g. missing programs) will never cause a problem with building the binary.

What is the output of this?

nm --demangle /lib/x86_64-linux-gnu/libboost_regex.a  | grep "boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform"

When I run this on Ubuntu 20.04 I get the following:

macaulay@527be761f5fa:~/M2/M2/BUILD/build-docker$ nm --demangle /lib/x86_64-linux-gnu/libboost_regex.a  | grep "boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform"
                 U boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const
                 U boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const
0000000000000000 W boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const
0000000000000000 W boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const
nm: regex_debug.o: no symbols
nm: w32_regex_traits.o: no symbols
nm: usinstances.o: no symbols

So the symbols are there in the static library.

kschwede commented 4 years ago

Here's my output

schwede@2020AMDComputer:~/M2Ninja/M2/M2/BUILD/build$ nm --demangle /lib/x86_64-linux-gnu/libboost_regex.a  | grep "boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform"
                 U boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const
                 U boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const
0000000000000000 W boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const
0000000000000000 W boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const
nm: regex_debug.o: no symbols
nm: w32_regex_traits.o: no symbols
nm: usinstances.o: no symbols

Anyways, I started from scratch, still no luck.

mahrud commented 4 years ago

Could you try compiling with clang instead? This probably does require a clean start. You can set the compiler with:

CC=clang CXX=clang++ cmake ....

On the first run of cmake.

mahrud commented 4 years ago

Actually, before that, let's try building a test program: boost-example.cpp.txt The compile command:

g++ boost-example.cpp.txt  -lboost_regex
kschwede commented 4 years ago

The simple example seemed to work.

schwede@2020AMDComputer:~$ mv boost-example.cpp.txt boost-example.cpp
schwede@2020AMDComputer:~$ g++ boost-example.cpp  -lboost_regex
schwede@2020AMDComputer:~$ ls
M2Ninja    M2Projects     MMP     Workshop-2016-Utah       a.out              boost-example.cpp.txt:Zone.Identifier  mail  nwM2
M2OldMake  M2SourceMoved  MyFork  Workshop-2020-Cleveland  boost-example.cpp  dead.letter                            myM2  test.m2
schwede@2020AMDComputer:~$ a.out
a.out: command not found
schwede@2020AMDComputer:~$ ./a.out
abcd, ab, c, d,
kschwede commented 4 years ago

I had to

sudo apt install clang

and then I ran

CC=clang CXX=clang++ cmake -GNinja -S../.. -B. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
-- Checking for one of the modules 'givaro>=4.1.1'
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found suitable version "2.9.10", minimum required is "2.9")
CHECK_START Checking library compatibility
CHECK_FAIL Detected library incompatibilities; rerun the build-libraries target
-- Submodule update
Submodule 'M2/Macaulay2/editors/emacs' (https://github.com/Macaulay2/M2-emacs.git) registered for path 'Macaulay2/editors/emacs'
Submodule 'M2/submodules/bdwgc' (https://github.com/Macaulay2/bdwgc.git) registered for path 'submodules/bdwgc'
Submodule 'M2/submodules/fflas-ffpack' (https://github.com/linbox-team/fflas-ffpack.git) registered for path 'submodules/fflas_ffpack'
Submodule 'M2/submodules/flint2' (https://github.com/Macaulay2/flint2.git) registered for path 'submodules/flint2'
Submodule 'M2/submodules/frobby' (https://github.com/Macaulay2/frobby.git) registered for path 'submodules/frobby'
Submodule 'M2/submodules/givaro' (https://github.com/Macaulay2/givaro.git) registered for path 'submodules/givaro'
Submodule 'M2/submodules/googletest' (https://github.com/google/googletest.git) registered for path 'submodules/googletest'
Submodule 'M2/submodules/libatomic_ops' (https://github.com/Macaulay2/libatomic_ops.git) registered for path 'submodules/libatomic_ops'
Submodule 'M2/submodules/mathic' (https://github.com/Macaulay2/mathic) registered for path 'submodules/mathic'
Submodule 'M2/submodules/mathicgb' (https://github.com/Macaulay2/mathicgb) registered for path 'submodules/mathicgb'
Submodule 'M2/submodules/memtailor' (https://github.com/Macaulay2/memtailor) registered for path 'submodules/memtailor'
Submodule 'M2/submodules/mpir' (https://github.com/Macaulay2/mpir.git) registered for path 'submodules/mpir'
Cloning into '/home/schwede/M2Ninja/M2/M2/Macaulay2/editors/emacs'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/bdwgc'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/fflas_ffpack'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/flint2'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/frobby'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/givaro'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/googletest'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/libatomic_ops'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/mathic'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/mathicgb'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/memtailor'...
Cloning into '/home/schwede/M2Ninja/M2/M2/submodules/mpir'...
Submodule path 'Macaulay2/editors/emacs': checked out '310601c59196cd70cc105191ce8771676c25f5b4'
From https://github.com/Macaulay2/bdwgc
 * branch              98ac50b6311219b8f57a794deb9a72d2a25b23ce -> FETCH_HEAD
Submodule path 'submodules/bdwgc': checked out '98ac50b6311219b8f57a794deb9a72d2a25b23ce'
From https://github.com/linbox-team/fflas-ffpack
 * branch              91ca323d0dfe2236148a2847d33602fc702f2a8f -> FETCH_HEAD
Submodule path 'submodules/fflas_ffpack': checked out '91ca323d0dfe2236148a2847d33602fc702f2a8f'
Submodule path 'submodules/flint2': checked out 'e159671204454a784fa2120fb315be9ebff10f47'
Submodule path 'submodules/frobby': checked out 'd12b7b786a0e50765c1a2878601125ac2f55b68c'
Submodule path 'submodules/givaro': checked out '9f23d861971b48584bd628d05bdf526267c81b95'
Submodule path 'submodules/googletest': checked out '703bd9caab50b139428cea1aaff9974ebee5742e'
Submodule path 'submodules/libatomic_ops': checked out 'ba6c3170412ef7f751ff63e2b656296265dcff93'
Submodule path 'submodules/mathic': checked out 'd26913a8117c2c2191d286ae766592a84ec4d003'
Submodule path 'submodules/mathicgb': checked out 'd8dd3d617e7c5658d3222490c1d8d8984a848c0b'
Submodule path 'submodules/memtailor': checked out '31024178b1337c364b6f652e3de0d893d5874223'
Submodule path 'submodules/mpir': checked out '82816d99518e8779cbe981e6667a9b0fd23be20a'
CMake Error at cmake/build-libraries.cmake:239 (message):
  gmp integer package specified, but not found
Call Stack (most recent call first):
  CMakeLists.txt:76 (include)

-- Configuring incomplete, errors occurred!
See also "/home/schwede/M2Ninja/M2/M2/BUILD/build/CMakeFiles/CMakeOutput.log".
See also "/home/schwede/M2Ninja/M2/M2/BUILD/build/CMakeFiles/CMakeError.log".

but I had errors, see the log files here:

http://www.math.utah.edu/~schwede/CMakeError.log http://www.math.utah.edu/~schwede/CMakeOutput.log

what else do I need to install? It's not so obvious from me from the log files.

kschwede commented 4 years ago

By the way, I've tried it (not the CLang version) on another machine using WSL2 + Ubuntu 20.04, I had the same issue. But I had no trouble with an actual Ubuntu machine. Perhaps something else is missing?

mahrud commented 4 years ago

Regarding the clang errors, did you start with a fresh build directory?

Yes, I tried it on an ubuntu machine as well, which is why I'm at a loss for what could be going wrong. Can you try compiling the test program with these two commands instead:

g++ -DBOOST_ALL_NO_LIB -DBOOST_REGEX_DYN_LINK boost-example.cpp -lboost_regex

and:

g++ -DBOOST_ALL_NO_LIB -DBOOST_REGEX_DYN_LINK -c boost-example.cpp 
g++ -DBOOST_ALL_NO_LIB -DBOOST_REGEX_DYN_LINK -o a.out boost-example.o /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0

and if both of them work, try the following:

g++ -g -S boost-example.cpp

and attach the resulting boost-example.s file.

mahrud commented 4 years ago

Oh, I just noticed this line in one of the logs you uploaded:

clang: error: unknown argument: '-fabi-version=6'

Uninstall givaro and fflas-ffpack! The version on ubuntu 20.04 is too old for gcc 9. Crossing fingers that this resolves the issue!!

kschwede commented 4 years ago

The test program had no issues. I'm attaching the boost-example.s (.gz)

II removed fflas-ffpack although it didn't appear that I had givaro installed. I'll try clang again momentarily (I think I did a clean install...)

boost-example.s.gz

mahrud commented 4 years ago

I was able to reproduce the issue after installing ubuntu's fflas-ffpack 2.4.3-1 and libgivaro-dev 4.1.1-2build1, both of which have -fabi-version=6 among their cflags:

/usr/bin/ld: Macaulay2/d/CMakeFiles/M2-interpreter.dir/boost-regex.cpp.o: in function `boost::cpp_regex_traits<char>::transform_primary(char const*, char const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:966: undefined reference to `boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
/usr/bin/ld: Macaulay2/d/CMakeFiles/M2-interpreter.dir/boost-regex.cpp.o: in function `boost::cpp_regex_traits<char>::transform(char const*, char const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:962: undefined reference to `boost::re_detail_107100::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
kschwede commented 4 years ago

Ok, I'm still having trouble with clang, but I'll try it after removing everything fflas-ffpack. By the way, the instructions for compiling the classic way still tell people to install libgivaro-dev and fflas-ffpack.

mahrud commented 4 years ago

Ok, I'm still having trouble with clang, but I'll try it after removing everything fflas-ffpack.

I think using gcc should be fine with fflas-ffpack and givaro removed.

By the way, the instructions for compiling the classic way still tell people to install libgivaro-dev and fflas-ffpack.

Yes, and that works for older compilers. I reopened #1227 a couple of months back to address this. @d-torrance could you reconsider patching the Ubuntu package? The upstreams haven't made a new release in months, but this continues to be a nuisance.

kschwede commented 4 years ago

Ok, it worked for me too. I'm currently building documentation. I've gotten more errors for that in the cmake version in the past, but I haven't tried compiling recently, so hopefully it works.

mahrud commented 4 years ago

Great! Are you building from the development branch (or a branch on top of it)? If so please open an issue if you get documentation errors, I recently made a lot of improvements in the documentation system and there may be bugs hidden.

I'll close this for now. Feel free to reopen if similar issues occur.

d-torrance commented 4 years ago

Yes, and that works for older compilers. I reopened #1227 a couple of months back to address this. @d-torrance could you reconsider patching the Ubuntu package? The upstreams haven't made a new release in months, but this continues to be a nuisance.

It's on my to-do list. FYI, any changes to the Debian fflas-ffpack package now won't be part of an official Ubuntu release until 21.04 next April. The feature freeze for the next release (20.10 in October) was last month.

mahrud commented 4 years ago

But 20.04 is an LTS release, doesn't that mean packages will have updates and patches for longer? If not then we'll need to remove fflas-ffpack and givaro from the INSTALL file because presumably a lot of people will use 20.04 until the next LTS.

d-torrance commented 4 years ago

But 20.04 is an LTS release, doesn't that mean packages will have updates and patches for longer?

That's true. I'm not familiar with the process, but could look into it.

Also, the default compiler in 20.04 is still gcc 9, and isn't the issue just with gcc 10? gcc 10 won't be the default until 20.10 (https://lists.ubuntu.com/archives/ubuntu-devel/2020-July/041102.html).

mahrud commented 4 years ago

Also, the default compiler in 20.04 is still gcc 9, and isn't the issue just with gcc 10? gcc 10 won't be the default until 20.10 (https://lists.ubuntu.com/archives/ubuntu-devel/2020-July/041102.html).

Apparently this affects gcc 9 as well. I just tested it manually, and removing -fabi-version=6 from the compile command resolved the bug.