Operating System - HP-UX
1834568 Members
3332 Online
110069 Solutions
New Discussion

Re: Install g77-2.95.2 failed because cannot find library -lg2c

 
Schwob_1
New Member

Install g77-2.95.2 failed because cannot find library -lg2c

I have a workstation with HP-UX 10.20. I install gcc version 2.95.2. When I install the Fortran g77 version 2.95.2, the step make bootstrap was ok. In the step make install I got the following error:
/usr/ccs/bin/ld: can't find library -lg2c
collect2: ld returned 1 exit status.
I succeed to compile some programs with the Fortran compiler but not all programs. Certain programs returned a similar error. Where to find the library missing and how to add it?
4 REPLIES 4
Alex Glennie
Honored Contributor

Re: Install g77-2.95.2 failed because cannot find library -lg2c

Try "/opt/gcc/bin/gcc -s -g -L. -o prog [list of objects] -lstdc++ " you may have to edit the make file ?

Or detail / post the make file entries ? I don't think the libs missing but I may well be wrong .
Vincent Stedema
Esteemed Contributor

Re: Install g77-2.95.2 failed because cannot find library -lg2c

Hi,

I thought that the last step of a "make bootstrap" is to compile the software using the bootstrap version of the compiler. So, if I'm not mistaken, you should run "make install" now, instead of "make all".

Hope this helps...

Vincent
Schwob_1
New Member

Re: Install g77-2.95.2 failed because cannot find library -lg2c

Dear Alex Glennie,

Your answer was not enough clear where to do the proposed command. I attach the Makefile created by configure.
Please send me your e_mail to answer you directly.
My e_mail is e_schwob@hadasssah.org.il.
Best regards,

Michele Schwob.
Vincent Stedema
Esteemed Contributor

Re: Install g77-2.95.2 failed because cannot find library -lg2c

libg2c.a should be somewhere in your gcc source tree. Use find to locate it, then add the location of this library to your LD_LIBRARY_PATH variable and rerun "make install".

Vincent