bertiniteam / b2

Bertini 2.0: The redevelopment of Bertini in C++.
92 stars 34 forks source link

Mac M1 PyBertini Compile Issue #170

Open theo-long opened 1 year ago

theo-long commented 1 year ago

When attempting to compile PyBertini I am running into the linker error below. Note that I am following the recommendations from https://github.com/bertiniteam/b2/issues/164, i.e. including homebrew in flags.

duplicate symbol 'boost::phoenix::placeholders::uarg9' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o duplicate symbol 'boost::phoenix::placeholders::uarg8' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o duplicate symbol 'boost::phoenix::placeholders::uarg7' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o duplicate symbol 'boost::phoenix::placeholders::uarg6' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o duplicate symbol 'boost::phoenix::placeholders::uarg5' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o duplicate symbol 'boost::phoenix::placeholders::uarg4' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o duplicate symbol 'boost::phoenix::placeholders::uarg3' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o duplicate symbol 'boost::phoenix::placeholders::uarg2' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o duplicate symbol 'boost::phoenix::placeholders::uarg1' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o duplicate symbol 'boost::phoenix::placeholders::uarg10' in: src/.libs/_pybertini_la-parser_export.o src/.libs/_pybertini_la-bertini_python.o ld: 10 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [_pybertini.la] Error 1 make: [all] Error 2

ofloveandhate commented 1 year ago

This is a Boost bug in 1.81. I managed to get by it by specifying an additional flag at compile time

./configure CPPFLAGS=-DBOOST_PHOENIX_STL_TUPLE_H_

See #174

ofloveandhate commented 1 year ago

i do apologize about the delay in my response

ofloveandhate commented 1 year ago

i also note that if the program is already partially compiled, you should make clean first. so

  1. make clean
  2. reconfigure using CPPFLAGS=-DBOOST_PHOENIX_STL_TUPLE_H_
  3. make
  4. enjoy

i do hope that this bug is fixed in an upcoming Boost release, as this is annoying.

theo-long commented 1 year ago

Thanks for the help, will report back once I try with these flags