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

linking fails on Ubuntu 18.04 #145

Open
psteinb opened this issue Jun 21, 2019 · 6 comments
Open

linking fails on Ubuntu 18.04 #145

psteinb opened this issue Jun 21, 2019 · 6 comments

Comments

@psteinb
Copy link
Contributor

psteinb commented Jun 21, 2019

Just discovered that within a plain vanilla installation of boost and fftw on ubuntu 18.04.2, linking gearshifft_fftw fails:

 $ cmake ..
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
#... 
--  gearshifft::FFTW enabled.
FFTWWrappers will prefer libraries with no prefix and no suffix
FFTWWrappers was not able to find fftw3.h in 
FFTWWrappers was not able to find mkl_intel_lp64 in 
FFTWWrappers was not able to find mkl_intel_thread in 
FFTWWrappers was not able to find mkl_core in 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/psteinb/development/gearshifft/build
[11:01] /home/psteinb/development/gearshifft/build $ make
Scanning dependencies of target gearshifft_version
[ 14%] Building CXX object CMakeFiles/gearshifft_version.dir/gearshifft_version.cpp.o
[ 28%] Linking CXX static library libgearshifft_version.a
[ 28%] Built target gearshifft_version
Scanning dependencies of target gearshifft_fftw
[ 42%] Building CXX object gearshifft/CMakeFiles/gearshifft_fftw.dir/benchmark.cpp.o
[ 57%] Building CXX object gearshifft/CMakeFiles/gearshifft_fftw.dir/options.cpp.o
[ 71%] Linking CXX executable gearshifft_fftw
CMakeFiles/gearshifft_fftw.dir/options.cpp.o:(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/gearshifft_fftw.dir/benchmark.cpp.o:(.bss+0x390): first defined here
collect2: error: ld returned 1 exit status
gearshifft/CMakeFiles/gearshifft_fftw.dir/build.make:129: recipe for target 'gearshifft/gearshifft_fftw' failed
make[2]: *** [gearshifft/gearshifft_fftw] Error 1
CMakeFiles/Makefile2:1018: recipe for target 'gearshifft/CMakeFiles/gearshifft_fftw.dir/all' failed
make[1]: *** [gearshifft/CMakeFiles/gearshifft_fftw.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
@psteinb
Copy link
Contributor Author

psteinb commented Jun 21, 2019

this occurs with master and 0.0.4

@tdd11235813
Copy link
Contributor

tdd11235813 commented Jun 21, 2019

I am already on it, have the same issue. Have you provided flags (superbuild, download, ...) to cmake or just default cmake ..?
Edit: sry, nvm, got it from above

@tdd11235813
Copy link
Contributor

it seems to be enough to place
BOOST_SYSTEM_NO_DEPRECATED=1 in CMakeLists.txt:152 .
I am checking other versions, as there are more possibilities to mitigate this issue.

tdd11235813 pushed a commit to tdd11235813/gearshifft that referenced this issue Jun 21, 2019
- fixes boost::system::throws multiple definition issue in mpicbg-scicomp#145
@psteinb
Copy link
Contributor Author

psteinb commented Jun 21, 2019

Lovely, only BOOST_SYSTEM_ENABLE_DEPRECATED is defined in the Boost.System docs. But not BOOST_SYSTEM_NO_DEPRECATED. :(

@tdd11235813
Copy link
Contributor

1.65.1 used BOOST_SYSTEM_NO_DEPRECATED, but 1.66.0 already uses BOOST_SYSTEM_ENABLE_DEPRECATED.

@psteinb
Copy link
Contributor Author

psteinb commented Jun 21, 2019

🤦‍♂️ should we wrap that inside gearshifft?

tdd11235813 pushed a commit to tdd11235813/gearshifft that referenced this issue Jun 21, 2019
- fixes boost::system::throws multiple definition issue in mpicbg-scicomp#145
tdd11235813 pushed a commit to tdd11235813/gearshifft that referenced this issue Jun 23, 2019
- fixes boost::system::throws multiple definition issue in mpicbg-scicomp#145
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