G ++: error: unrecognized option '-soname

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

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

I also changed all -m32 to -m64 in Make files, so I don't know what is going on. I was able to install TwoPad, but I can not continue to work with SplineFit. I have been doing this assembly for a long time and I will be grateful for any help.

+4
source share
2 answers

From memory, soname is a linker operation, not a compiler. So, if you do this using g++ , you may need to change the parameter to 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 GNU online docs for gcc :

-Wl, option: transfer option as an option for the linker. If an option contains commas, it is divided into several options in commas.

+4
source

I know this is an old question, but after a week of struggle I thought that I should publish my conclusions.

I have successfully edited makefiles for this so that they can compile on Ubuntu 12.04 x64.

You can completely remove the -soname option, this does not seem to be necessary.

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

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

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

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

If any of this still does not work, contact me and I can send you my makefiles.

+2
source

All Articles