You are here

Cluster Compile Error: g++ ---no-as-needed

3 posts / 0 new
Last post
Cluster Compile Error: g++ ---no-as-needed


I'm trying to install Rosetta 2019.22 in my Home directory of a cluster (which I have done successfully on a different cluster in the past).

However, I'm getting an error:


[av51d@c40b05 source]$ python3 -j 1 mode=release bin
scons: Reading SConscript files ...
Running versioning script ... Release package detected, using rosetta/main/.release.json to acquire version information...
Done. (0.0 seconds)
Number of option files updated: 0
Total 4431 options.
Finished updating ResidueProperty code
-- no changes needed
Finished updating VariantType code
-- no changes needed
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/src/release/linux/2.6/64/x86/gcc/8.1/default/apps/public/AbinitioRelax.o -c -std=c++0x -ffor-scope -isystem external/boost_1_55_0/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -pipe -Wall -Wextra -pedantic -Wno-long-long -Wno-strict-aliasing ---no-as-needed -march=core2 -mtune=generic -O3 -ffast-math -fno-finite-math-only -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -Wno-unused-parameter -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DPTR_STD -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc/8.1 -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/boost_1_55_0 -Iexternal/libxml2/include -Iexternal -Iexternal/dbio -I/usr/include -I/usr/local/include src/apps/public/
g++: error: unrecognized command line option '---no-as-needed'; did you mean '--no-see'?
scons: *** [build/src/release/linux/2.6/64/x86/gcc/8.1/default/apps/public/AbinitioRelax.o] Error 1
scons: building terminated because of errors.


I've loaded the two modules python3/3.5.0 and g++/8.1.0. The test script passes with flying colors when invoking the g++ compilier and python2.

I've tried compiling with python2, and also with older versions of g++, but that doesn't work.

I promise that I've searched the forum and all of Google, but I can't find others with this issue.

I'm thinking that it's something different in this cluster's architecture that's causing a problem? Am I missing a module or have the wrong version? Please help!

Sincerely and with many thanks,

AJ Vincelli

Post Situation: 
Wed, 2019-11-06 14:49

That's a little curious. It looks like GCC 8.1 is the only version of GCC which adds the --no-as-needed flag. I'm not sure if it's actually needed - especially for the release mode compile. (It was added in a commit which added additional debugging facilities to Rosetta).

The most straightforward way to fix things would probably go into main/source/source/tools/build/basic.settings, find the block for "gcc, 8.1"  (around line 400 or so), and then comment out (add a '#' before) the lines with --no-as-needed and then recompile.

I'm not saying that will definitely work - it may reveal an error which its addition was attempting to fix - but it's worth trying to see if it works on your machine.

Thu, 2019-11-07 11:25

Oh YAY it worked!!! Thank you so much! I used g++ version 5.4.0, and it works. (I know I had tried g++ version 4 something, but it didn't work then...?)

In case it helps others, I ran the commands:

cd ROSETTA_2019_22/main/source

module load python3/3.5.0

module load g++/5.4.0

python3 -j 20 mode=release bin

Fri, 2019-11-08 07:52