Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems compilling BAGEL using Boost 1.79.0 #258

Open
rdguerrerom opened this issue Sep 26, 2022 · 1 comment
Open

Problems compilling BAGEL using Boost 1.79.0 #258

rdguerrerom opened this issue Sep 26, 2022 · 1 comment

Comments

@rdguerrerom
Copy link

Hi,

On macOS, after a successful compilation, when I try to run the executable I am getting the following error message:

$ BAGEL --help
dyld[30513]: symbol not found in flat namespace (__ZN5boost7archive23basic_binary_iprimitiveINS0_15binary_iarchiveEcSt11char_traitsIcEE4initEv)
Abort trap: 6

Demangling what is in parentheses I get:

$ echo __ZN5boost7archive23basic_binary_iprimitiveINS0_15binary_iarchiveEcSt11char_traitsIcEE4initEv | c++filt -s
boost::archive::basic_binary_iprimitive<boost::archive::binary_iarchive, char, std::char_traits<char> >::init()

I am using the following version of the Boost library:

$ brew info boost
==> boost: stable 1.79.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
/usr/local/Cellar/boost/1.79.0_2 (15,462 files, 469MB) *
  Poured from bottle on 2022-09-25 at 09:17:30
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/boost.rb
License: BSL-1.0
==> Dependencies
Required: icu4c ✔, xz ✔, zstd ✔
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 144,598 (30 days), 411,125 (90 days), 1,133,106 (365 days)
install-on-request: 46,734 (30 days), 108,968 (90 days), 272,082 (365 days)
build-error: 35 (30 days)

Finally, BAGEL was configured using the following options:

./configure MPICC=cc CC=gcc-11 CXX=g++-11 CXXFLAGS="-std=c++17" --with-boost=/usr/local/Cellar/boost/1.79.0_2 --with-boost-serialization=boost_serialization-mt --disable-smith

Thanks in advance for your help.

@shiozaki
Copy link
Member

shiozaki commented Sep 26, 2022

I suggest that you compile with

--enable-static --disable-shared

It should not link due to missing symbols. I discourage the use of "--with-boost-serialization" or any other similar flags.

If you cannot identify the issue, you could write a small program related to Archive/serialization and make sure your can compile it.

PS: this function is supposed to be in boost (1.79.0)
https://www.boost.org/doc/libs/1_79_0/boost/archive/basic_binary_iprimitive.hpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants