You are here

Problems compiling on Ubuntu 15.04

5 posts / 0 new
Last post
Problems compiling on Ubuntu 15.04
#1

Hey,

I've got some issues compiling on Rosetta on my linux workstation. I downloaded the source bundle (2016.02) and ran:

scons bin mode=release -j12

It compiled for a while then threw up the following errors:

build/src/release/linux/4.2/64/x86/gcc/4.8/default/apps/public/darc/DARC.o: In function `utility::options::ScalarOption_T_<utility::options::StringOptionKey, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::cl_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
DARC.cc:(.text._ZN7utility7options15ScalarOption_T_INS0_15StringOptionKeyENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8cl_valueERKS8_[_ZN7utility7options15ScalarOption_T_INS0_15StringOptionKeyENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8cl_valueERKS8_]+0x81): undefined reference to `ObjexxFCL::stripped(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
DARC.cc:(.text._ZN7utility7options15ScalarOption_T_INS0_15StringOptionKeyENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8cl_valueERKS8_[_ZN7utility7options15ScalarOption_T_INS0_15StringOptionKeyENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8cl_valueERKS8_]+0x211): undefined reference to `utility::options::mpi_safe_std_err(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
DARC.cc:(.text._ZN7utility7options15ScalarOption_T_INS0_15StringOptionKeyENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8cl_valueERKS8_[_ZN7utility7options15ScalarOption_T_INS0_15StringOptionKeyENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8cl_valueERKS8_]+0x34e): undefined reference to `utility::options::mpi_safe_std_err(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/apps/public/darc/DARC.o: In function `utility::options::VectorOption_T_<utility::options::StringVectorOptionKey, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::cl_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
DARC.cc:(.text._ZN7utility7options15VectorOption_T_INS0_21StringVectorOptionKeyENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8cl_valueERKS8_[_ZN7utility7options15VectorOption_T_INS0_21StringVectorOptionKeyENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8cl_valueERKS8_]+0x49): undefined reference to `ObjexxFCL::stripped(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libprotocols.3.so: undefined reference to `cppdb::statement::bind(int, std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libbasic.so: undefined reference to `cppdb::session::prepare(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libcore.2.so: undefined reference to `cppdb::statement::operator<<(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libprotocols_c.4.so: undefined reference to `cppdb::result::find_column(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libutility.so: undefined reference to `cppdb::session::open(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libprotocols.3.so: undefined reference to `cppdb::result::fetch(std::string&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libprotocols_c.4.so: undefined reference to `cppdb::result::fetch(std::string const&, unsigned long&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libprotocols.3.so: undefined reference to `cppdb::session::operator<<(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libbasic.so: undefined reference to `cppdb::statement::sequence_last(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/4.8/default/libprotocols_c.4.so: undefined reference to `cppdb::result::fetch(std::string const&, std::string&)'
collect2: error: ld returned 1 exit status
scons: *** [build/src/release/linux/4.2/64/x86/gcc/4.8/default/DARC.default.linuxgccrelease] Error 1

There is a lot more above this as well, this is just the bottom part of the errors. I have installed zlib1g-dev but that didn't seem to help?

Thanks for your time!

 

Category: 
Post Situation: 
Mon, 2016-02-22 21:31
belousoff

Sorry just to clarify, I have Ubuntu 15.10, NOT 15.04

Tue, 2016-02-23 15:44
belousoff

Is there a particular reason you're using gcc4.8? From what I can tell, the default compiler under 15.10 should be gcc 5.2.

I mention it, because a compiler mis-match could be the reason for the errors you're seeing.

When you do a `which -a gcc` and `which -a g++` what do you see? How about for `gcc  --version` and `g++ --version` ?

Wed, 2016-02-24 13:12
rmoretti

Hey,

Thanks for the reply. When I do 'which -a gcc' or 'which -a g++' I see /usr/bin/gcc or /usr/bin/g++. The version I am using is 5.2. The error above was from 4.8 compiler I tried. When I use the 5.2 version I get similar errors: see below. However I have noticed that it doesn't always fail on comiling the same thing....

Any other suggestions to try?

cheers,

matt B

 

g++ -o build/src/release/linux/4.2/64/x86/gcc/5.2/default/AbinitioRelax.default.linuxgccrelease -Wl,-rpath=/home/mbelouso/Downloads/rosetta_src_2016.02.58402_bundle/main/source/build/src/release/linux/4.2/64/x86/gcc/5.2/default -Wl,-rpath=/home/mbelouso/Downloads/rosetta_src_2016.02.58402_bundle/main/source/build/external/release/linux/4.2/64/x86/gcc/5.2/default -Wl,-rpath=\$ORIGIN -Wl,-rpath=\$ORIGIN/../lib build/src/release/linux/4.2/64/x86/gcc/5.2/default/apps/public/AbinitioRelax.o -Lexternal/lib -Lbuild/src/release/linux/4.2/64/x86/gcc/5.2/default -Lsrc -Lbuild/external/release/linux/4.2/64/x86/gcc/5.2/default -Lexternal -L/usr/lib -L/usr/local/lib -ldevel -lprotocols.7 -lprotocols.6 -lprotocols_e.5 -lprotocols_d.5 -lprotocols_c.5 -lprotocols_b.5 -lprotocols_a.5 -lprotocols_h.4 -lprotocols_g.4 -lprotocols_f.4 -lprotocols_e.4 -lprotocols_d.4 -lprotocols_c.4 -lprotocols_b.4 -lprotocols_a.4 -lprotocols.3 -lprotocols_b.2 -lprotocols_a.2 -lprotocols.1 -lcore.5 -lcore.4 -lcore.3 -lcore.2 -lcore.1 -lbasic -lnumeric -lutility -lObjexxFCL -lz -lcppdb -lsqlite3
build/src/release/linux/4.2/64/x86/gcc/5.2/default/apps/public/AbinitioRelax.o: In function `__static_initialization_and_destruction_0(int, int) [clone .constprop.40]':
AbinitioRelax.cc:(.text.startup+0x149): undefined reference to `utility::CSI_Sequence::CSI_Sequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
AbinitioRelax.cc:(.text.startup+0x18a): undefined reference to `utility::CSI_Sequence::CSI_Sequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
AbinitioRelax.cc:(.text.startup+0x1cb): undefined reference to `utility::CSI_Sequence::CSI_Sequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
AbinitioRelax.cc:(.text.startup+0x20c): undefined reference to `utility::CSI_Sequence::CSI_Sequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
AbinitioRelax.cc:(.text.startup+0x24d): undefined reference to `utility::CSI_Sequence::CSI_Sequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/apps/public/AbinitioRelax.o:AbinitioRelax.cc:(.text.startup+0x28e): more undefined references to `utility::CSI_Sequence::CSI_Sequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' follow
build/src/release/linux/4.2/64/x86/gcc/5.2/default/apps/public/AbinitioRelax.o: In function `__static_initialization_and_destruction_0(int, int) [clone .constprop.40]':
AbinitioRelax.cc:(.text.startup+0x623): undefined reference to `basic::Tracer::Tracer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, basic::TracerPriority, bool)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libprotocols.1.so: undefined reference to `cppdb::statement::bind(int, std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libbasic.so: undefined reference to `cppdb::session::prepare(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libcore.2.so: undefined reference to `cppdb::statement::operator<<(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libprotocols_c.4.so: undefined reference to `cppdb::result::find_column(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libutility.so: undefined reference to `cppdb::session::open(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libprotocols.1.so: undefined reference to `cppdb::result::fetch(std::string&)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libprotocols_c.4.so: undefined reference to `cppdb::result::fetch(std::string const&, unsigned long&)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libbasic.so: undefined reference to `cppdb::session::operator<<(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libbasic.so: undefined reference to `cppdb::statement::sequence_last(std::string const&)'
build/src/release/linux/4.2/64/x86/gcc/5.2/default/libprotocols_c.4.so: undefined reference to `cppdb::result::fetch(std::string const&, std::string&)'
collect2: error: ld returned 1 exit status
scons: *** [build/src/release/linux/4.2/64/x86/gcc/5.2/default/AbinitioRelax.default.linuxgccrelease] Error 1
scons: building terminated because of errors.

 

Wed, 2016-02-24 14:00
belousoff

I had a devil of a time trying to replicate this, but I actually just ran into it by chance.

I'm not sure exactly why it happens, but it looks like it's a glitch that happens while compiling. I was able to solve the issue by deleting the rosetta/source/build/external/directory, and relaunching the build command.

I was just getting the cppdb lines, though, not with the utility::CSI_Sequence or the ObjexxFCL. For those, deleting build/external/ isn't going to help. You'll have to either delete the entire build/ directory and recompile, or you could try to be more surgical, and delete the apropriate files under the build direcotory. They'll be something like 'build/src/release/linux/2.6/64/x86/gcc/5.2/default/libutility.so' (or ObjexxFCL.so) and possibly the build/src/release/linux/2.6/64/x86/gcc/5.2/default/utility/ directory.

Tue, 2016-03-01 14:36
rmoretti