Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

G++: error: unrecognized option ‘-soname’

Tags:

g++

I am trying to build SLitrani on Ubuntu 12.04 64-bit. I have already built ROOT 5.34.03 from source and I did figure out how to set the LD_LIBRARY_PATH and PATH variables for $ROOTDEV so the problem is not there but when I try to make SplineFit I get

>>> g++: error: unrecognized option ‘-soname=libSplineFit.so’
make: *** [libSplineFit.so] Error 1

I also did change all the -m32 to -m64 in the Makefiles so I don't know what is going on. I was able to get TwoPad installed but I can't continue from SplineFit. I have been on this build for quite some time and would appreciate any help.

like image 867
fred.smalley Avatar asked Nov 25 '12 02:11

fred.smalley


2 Answers

From memory, soname is a linker operation, not a compiler one. So, if you're doing it with g++, you may need to change the option into something like:

-Wl,-soname=libSplineFit.so

The following transcript shows that this is necessary:

pax> g++ --soname=x -Wall -o qq qq.cpp
cc1plus: error: unrecognized command line option "-fsoname=x"

pax> g++ -Wl,-soname=x -Wall -o qq qq.cpp

pax> 

From the online GNU docs for gcc:

-Wl,option: pass option as an option to the linker. If option contains commas, it is split into multiple options at the commas.

like image 129
paxdiablo Avatar answered Oct 26 '22 21:10

paxdiablo


I know this is an old question but after a week of struggling I thought I should post my findings.

I've successfully edited the makefiles for this so they can compile on Ubuntu 12.04 x64.

You can remove the -soname option completely, it seemingly is unnecessary.

As mentioned: all "m32" change to "m64".

You can replace "$ROOTSYS/libs" with "$ROOTLIBS"

and with TwoPad makefile reorder the library order (under LIBS += (.....)) so that -lTwoPad is NOT last on the list, and for VisuSLitrani make -lPhysMore last in its group.

As far as I know the errors saying "set but not used" can be ignored.

If any of this still doesn't work contact me back and I can send you my makefiles.

like image 2
Michael Abbott Avatar answered Oct 26 '22 21:10

Michael Abbott