Results 1 to 5 of 5
Hi, I am new to Linux. I am trying to install the program "r8s" on my RHEL 5 through its makefile. This is the error I am receiving:
Code:
[Ritu@localhost ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-25-2009 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 4
Trouble with Linker Argument
Hi, I am new to Linux. I am trying to install the program "r8s" on my RHEL 5 through its makefile. This is the error I am receiving:
I know that libg2c.so.0 is located in /usr/lib. How do I tell the linker to look in that folder to access this library?Code:[Ritu@localhost src]$ make gcc -o r8s -L/sw/lib DrawTree.o TreeSim.o moment.o powell.o ConstrOpt.o MyUtilities.o WuLi.o DistrFuncs.o NRCvectorUtils.o distance.o penalty.o ObjFunc.o main.o relativeRates.o ReadNexusFile2.o memory.o root3taxa.o TimeAlgorithms.o nextToken2.o storeNexusFile.o MinND.o TreeUtils.o structures.o blas.o tn.o TNwrapper.o continuousML.o ancestral.o -lg2c -lm /usr/bin/ld: cannot find -lg2c collect2: ld returned 1 exit status make: *** [r8s] Error 1
- 06-25-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,152
If you are running a 32-bit system, then this should work. If you are running a 64-bit system, then you need to see if a 64-bit version exists in /usr/lib64. If not and your are building on a 64-bit system, then you either need the 64-bit version of the library (libg2c.so or libg2c.a) or you need to build your application fully for 32-bit operation, in which case it will get the library from /usr/lib.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-25-2009 #3Just Joined!
- Join Date
- Jun 2009
- Posts
- 4
What should work?
I am running a 32-bit system.
Can I just edit the makefile itself?
Here is a portion of the original makefile:
libg2c.so.0 and libm.so are both in /usr/lib. So I edited LPATH to equal -L/usr/lib.PHP Code:# Make file for r8s
# Updated April 2003 for Linux and Mac OS 10.2. No other builds currently supported
#
FC = g77 # Fortran compiler; standard on Linux, may have to go fetch this on OS X! (get it from Fink)
CC = gcc # GNU C compiler
LIBS = -lg2c -lm # FORTRAN to C library, and standard C library
LPATH = -L/sw/lib # This is the directory where Mac's Fink stuck the g2c library
#CFLAGS = -g -std=c99 -pedantic # for debugging, etc.
CFLAGS = # usual case
But I am still getting the same error....
- 06-25-2009 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,152
I noticed in my system that there is no libg2c.so, but there is .so.0 which is a link to .so.0.0.0. As root, go to /usr/lib and make a symbolic link from libg2c.so.0 to libg2c.so and try linking again.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-25-2009 #5Just Joined!
- Join Date
- Jun 2009
- Posts
- 4
Thanks so much for the help! That worked.


Reply With Quote

