• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

boost undefined symbols (with g++5)

outpaddling

Member

Thanks: 17
Messages: 64

#1
Stuck on the undefined reference errors below regarding boost::program_options.

I suspect a tool chain mixing issue (boost compiled with clang, this code with g++5), but haven't been able to find any good references to this error.

Anyone seen a similar problem?

Thanks,

Jason

Code:
g++5 -O2 -pipe -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -fno-strict-aliasing  -Wl,-rpath=/usr/local/lib/gcc5 -O2 -msse -msse2 -DUSE_SSE -DMEASURE_DGEMM -DVERBOSE -Wall -fPIC -fopenmp -I/usr/local/include -o StringUtils.o -c StringUtils.cpp
g++5 -O2 -pipe -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -fno-strict-aliasing  -Wl,-rpath=/usr/local/lib/gcc5 -O2 -msse -msse2 -DUSE_SSE -DMEASURE_DGEMM -DVERBOSE -Wall -fPIC -fopenmp -I/usr/local/include -o Timer.o -c Timer.cpp
g++5  -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -L/usr/local/lib/gcc5 -fopenmp -o bolt BoltMain.o Bolt.o BoltParams.o BoltParEstCV.o BoltReml.o CovariateBasis.o DataMatrix.o FileUtils.o Jackknife.o LDscoreCalibration.o MapInterpolater.o MatrixUtils.o MemoryUtils.o NonlinearOptMulti.o NumericUtils.o PhenoBuilder.o RestrictSnpSet.o SnpData.o SnpInfo.o SpectrumTools.o StatsUtils.o StringUtils.o Timer.o -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lnlopt -lboost_program_options -lboost_iostreams -lz -llapack -lopenblas -lgfortran -lpthread -lm
Bolt.o: In function `long double boost::math::detail::full_igamma_prefix<long double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> >(long double, long double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> const&)':
Bolt.cpp:(.text._ZN5boost4math6detail18full_igamma_prefixIeNS0_8policies6policyINS3_13promote_floatILb0EEENS3_14promote_doubleILb0EEENS3_14default_policyES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EEEET_SB_SB_RKT0_[_ZN5boost4math6detail18full_igamma_prefixIeNS0_8policies6policyINS3_13promote_floatILb0EEENS3_14promote_doubleILb0EEENS3_14default_policyES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EEEET_SB_SB_RKT0_]+0x68): warning: powl has lower than advertised precision
BoltParams.o: In function `LMM::BoltParams::processCommandLineArgs(int, char**)':
BoltParams.cpp:(.text+0x1fa5): undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
BoltParams.cpp:(.text+0x3244): undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
BoltParams.cpp:(.text+0x3b2e): undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
BoltParams.cpp:(.text+0x42cc): undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
BoltParams.cpp:(.text+0x4338): undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
 
Last edited:

camp0

New Member


Messages: 6

#2
Hi,

Im able to use the boost::program_options with no issues, any reason for not use c++? instead gcc? Looks that may be is missing math.h?

Is that project public for compile?

Regards,
Luis
 

camp0

New Member


Messages: 6

#4
Hi Jason,

I just need to know the Makefile that you use for compile that project or any instructions for build and reproduce the issue.

Regards,
Luis
 

outpaddling

Member

Thanks: 17
Messages: 64

#5
Sorry, I assumed I had stated the port name in the original post...

The easiest way to reproduce it is by checking out the collection using the instructions at the bottom of the link. Then

cd /usr/ports/wip/bolt-llm
make


Thanks for contributing your time!
 

outpaddling

Member

Thanks: 17
Messages: 64

#6
Solved. Replaced compiler:openmp with compiler:gcc-c++11-lib. The latter is sufficient to enable openmp as well, as compiler:openmp merely adds a GCC requirement.
 
Top