You are here

compiling error in rosetta 2016 week 20

5 posts / 0 new
Last post
compiling error in rosetta 2016 week 20
#1

source code: rosetta 2016 week 20

compiling:    ./scons.py -j10 mode=debug cat=test

error :

./test/basic/options/options_system.cxxtest.hh: In member function 'void OptionsSystemTests::test_initialize_local_option_collection_from_global()':
./test/basic/options/options_system.cxxtest.hh:294: error: reference to 'OptionCollection' is ambiguous
src/basic/options/option.hh:40: error: candidates are: typedef class utility::options::OptionCollection basic::options::OptionCollection
src/utility/options/OptionCollection.hh:72: error:                 class utility::options::OptionCollection
./test/basic/options/options_system.cxxtest.hh:294: error: reference to 'OptionCollection' is ambiguous
src/basic/options/option.hh:40: error: candidates are: typedef class utility::options::OptionCollection basic::options::OptionCollection
src/utility/options/OptionCollection.hh:72: error:                 class utility::options::OptionCollection
./test/basic/options/options_system.cxxtest.hh:294: error: expected `;' before 'const'
./test/basic/options/options_system.cxxtest.hh:296: error: 'local_options' was not declared in this scope
./test/basic/options/options_system.cxxtest.hh:297: error: 'local_options' was not declared in this scope

first error appears in line 294:    OptionCollection const & local_options ( *local_options_ptr );

 

Category: 
Post Situation: 
Mon, 2016-06-27 20:33
jarod

I tried to compile the source into "release" and "debug" flavors.

compile debug:  ./scons.py -j10 bin

compile release ./scons.py -j10 mode=release bin

both compiling procedures finished well.

but when I run integration test, most of applications in "release" mode throw "segmentation fault" but applications in "debug" mode work fine.

Tue, 2016-06-28 01:05
jarod

Hmm, I don't know why you'd have that failure about OptionCollection, but the unit tests (what you're compiling with "cat=test") are there mainly for development purposes. The code has to pass the unit tests before it gets released, and running unit tests locally (in debug mode) doesn't tell you much about how things went for the release-mode compile.

I'd be more concerned with the segfaulting integration tests in release mode. Since your debug mode compile seems to work, I'm guessing you just got a bad compilation during release mode compilation.

I'd recommend doing a clean release mode compilation and see if that fixes things. To do this,  delete all the Rosetta/main/source/build/*/release directories, and recompile with the "./scons.py -j10 mode=release bin" commandline.

Tue, 2016-06-28 07:26
rmoretti

rmoretti,

I deleted the whole "build" folder, and recompiled the release mode. still same, segmentation fault.

my OS is Red Hat Enterprise Linux Client release 5.11, maybe too old?

Tue, 2016-06-28 22:27
jarod

Perhaps. Although I'd guess that it's more likely to be an issue with an older compiler, rather than an older OS. What compiler are you using? 

At any rate, if this is on a computational cluster, it's likely that the sysadmins have installed a newer version of the compiler. There's normally a module loading system (different for each cluster, unfortunately) which will allow you to switch to a newer compiler. Talk to the sysadmins, and see if a newer compiler is availible.

If there isn't a newer compiler availible, you can always download and compile a newer compiler yourself. GCC 4.8 is a version I know works well (and can be relatively easily compiled.) You shouldn't have to install it system wide: when you configure it before compiling, just use the --prefix option to specify somewhere in your home directory. You may then need to update your PATH and LD_LIBRARY_PATH environment variables in order to get scons to use the new gcc.

Tue, 2016-07-12 07:54
rmoretti