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

boost regex is giving link error under ubuntu 20.04 #2423

Closed mikestillman closed 1 year ago

mikestillman commented 2 years ago

on x86_64, on cmake build. Possibly related to version of boost (1.71), but I'm not sure.

Here is the error I am seeing during a cmake build (with ninja, ccache, no homebrew installed on this machine): This is at the point when it tried to link M2:

/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 I expect we have seen this before, but I didn't see it in the issues.

mikestillman commented 2 years ago

@mahrud I wonder if the standard c++ regex library is in better shape now, and we can use it instead?

mikestillman commented 2 years ago

note: the autotools build on the same machine linked ok with boost.

d-torrance commented 2 years ago

I think this might be #1498/#1982, due to the old givaro/fflas-ffpack packages in Ubuntu 20.04. Try either building them from scratch or using the updated packages from the PPA:

sudo add-apt-repository ppa:macaulay2/macaulay2
sudo apt install libgivaro-dev fflas-ffpack
mahrud commented 1 year ago

I ran into the same issue, and indeed building fflas-ffpack and givaro from source resolved the issue.