mpicbg-scicomp / gearshifft

Benchmark Suite for Heterogenuous FFT Implementations
Apache License 2.0
34 stars 9 forks source link

linking fails on Ubuntu 18.04 #145

Open psteinb opened 5 years ago

psteinb commented 5 years ago

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 commented 5 years ago

this occurs with master and 0.0.4

tdd11235813 commented 5 years ago

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 commented 5 years ago

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.

psteinb commented 5 years ago

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

tdd11235813 commented 5 years ago

1.65.1 used BOOST_SYSTEM_NO_DEPRECATED, but 1.66.0 already uses BOOST_SYSTEM_ENABLE_DEPRECATED.

psteinb commented 5 years ago

:man_facepalming: should we wrap that inside gearshifft?