You are here

The problem of compiling omp in Rosetta 3.4

5 posts / 0 new
Last post
The problem of compiling omp in Rosetta 3.4
#1

When I execute the command:
./scons.py -j? extras=omp bin mode=dubug
I get the following error:
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `boost::this_thread::disable_interruption::disable_interruption()'
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `boost::detail::get_current_thread_data()'
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `boost::thread::~thread()'
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `typeinfo for boost::detail::thread_data_base'
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `boost::thread::start_thread()'
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `boost::thread::join()'
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `vtable for boost::detail::thread_data_base'
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `boost::this_thread::interruption_point()'
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `boost::detail::thread_data_base::~thread_data_base()'
build/src/release/linux/2.6/64/x86/gcc/4.3/omp/libprotocols_a.2.so: undefined reference to `boost::this_thread::disable_interruption::~disable_interruption()'
collect2: ld returned 1 exit status
scons: *** [build/src/release/linux/2.6/64/x86/gcc/4.3/omp/FloppyTail.omp.linuxgccrelease] Error 1

Therefore I made the following efforts:
1)I have compiled a new libboost(boost_1_51_0) , which gain libboost_thread-mt.o/a.
2)Adding the following to the tools/build/basic.settings file
import os
settings = {
"base" : {
"overrides" : {
"CCFLAGS" : "",
"CXXFLAGS" : "",
"program_path" : [
"/bin",
"/usr/bin",
"/usr/local/bin",
],
"include_path" : [
"external/boost_1_51_0/include/boost",
"#external/dbio",
"/usr/include",
"/usr/local/include",
],
"library_path" : [
"/usr/lib",
"/usr/local/lib",
"external/boost_1_51_0/lib",
],
},
},

the same linux ,and in gcc
"CCFLAGS" : '-isystem external/boost_1_51_0/include/boost',
"CXXFLAGS" : '-isystem external/boost_1_51_0/include/boost',

Any guidence on resolving this issue would be greatly appreaciated.
Thanks!

Post Situation: 
Sat, 2012-09-15 20:27
lihowe

I'm seeing if I can duplicate this locally. I wasn't aware we even had an openMP build at all, and it's not one that is regularly tested.

I'm pretty sure it's going to turn out to be some file needs a header added #ifdef USE_OPENMP or headers reordered or something. The only external libraries that needs to be linked into separately are libz and C++'s STL; boost has all its bits supplied by Rosetta.

Mon, 2012-09-17 10:01
smlewis

"./scons.py -j? extras=omp bin mode=dubug"

I assume dubug is supposed to be release, not debug?

Mon, 2012-09-17 10:07
smlewis

I was able to duplicate this in 3.4, but not in developer trunk. Using that fact, and the hints that it was related to boost and to a file somewhere in library protocols_a.2, I tracked it to SVN 48527 (which is after 3.4 released). It seems src/protocols/frag_picker/FragmentPicker.cc misuses MULTI_THREADED, which is also used by the extras=omp keyword (which #defines MULTI_THREADED and USE_OPENMP). Change all instances of MULTI_THREADED in that file to be some other keyword; USE_BOOST_THREAD is what developer trunk shows. I tested this against 3.4 and it compiles (no idea if OpenMP works or not).

I would also get rid of your boost installation (use the one Rosetta provides).

Mon, 2012-09-17 13:29
smlewis

According to your way, I have solved the problem of the compilation, thank you very much!

Mon, 2012-09-17 22:27
lihowe