[vox-tech] lib2gc installation problems

Alex Mandel tech_dev at wildintellect.com
Sun Nov 21 22:52:19 PST 2010


On 11/21/2010 07:27 PM, Jason Snyder wrote:
> I am running a file that needs the lib2gc installed.  Hence the error
> message below:
> 
> gfortran -I. -fcray-pointer -fconvert=big-endian -frecord-marker=4 -o rip
> addorfill.o adjellip.o angle.o barb.o bes.o bogs.o brnshr.o bshear.o
> bvfricalc.o capecalc3d.o ceilingcalc.o colram.o colrln.o condheat.o
> contrive2.o cpchhl.o cpchll.o cpcolr.o cpmpxy.o createdtg.o cttcalc.o
> dbzcalc.o refmos2calc.o refmos3calc.o ddpcalc.o ddx.o ddy.o derivc.o
> drawcl.o driver.o egridfill.o eqthecalc.o extingcalc.o fields.o fillarray.o
> finterp.o finterp2d.o fregcalc.o frtitle.o fx.o fy.o getbasicvars.o
> getbasicvars_newdom.o getchar.o getconvals.o getdash.o getdims.o
> getheadinfo.o getheadinfo_newdom.o getinum.o getminfo.o getpt.o getrnum.o
> gettimes.o getvar.o getvarinfo.o hboxdraw.o hbulldraw.o hchadraw.o
> hcondraw.o hiresmap.o hlinedraw.o hmapdraw.o hodograph.o hsidsdraw.o
> hstrdraw.o hticdraw.o htrajdraw.o hvecdraw.o igetcoind.o lennonblank.o
> liftparcel.o locinterp.o maptform.o maptick.o mconvert.o mktrjpts.o mlen.o
> monotonic.o netasc.o numeric.o omgcalc.o pfcalc.o pltitle.o prcver.o
> precprob.o premaptform.o profil.o profvelcalc.o pvocalc.o qgomg.o rdcolt.o
> readspec.o relhl.o rhucalc.o ricalc.o rip.o rotipslab.o rotpslab.o
> sateqthecalc.o saweli.o scondraw.o seaprs.o setripheader.o smooth.o
> smoothcp.o smoothcz.o smoothrain.o srflow.o srflow2.o sstats.o sticdraw.o
> sticdraw_polar.o svecdraw.o tdpcalc.o tfpcalc.o thecalc.o tonpsadiabat.o
> tserprep.o turb.o typhoon.o unblank.o vbardraw.o vc2dcalc.o vcondraw.o
> velbrb.o velvctmts.o vgp.o vinterp.o virtual.o virtualhyd.o viscalc.o
> vticdraw.o vtrajdraw.o vvecdraw.o vwinddraw.o wdircalc.o wetbulbcalc.o
> writefile.o wspcalc.o xmapcalc.o xtodot.o binio.o v5d.o
> -L/media/WRFDisk/WRF3.2/RIP4/netcdf_links/lib -lnetcdf
> -I/media/WRFDisk/WRF3.2/RIP4/netcdf_links/include  -L/usr/local/ncarg/lib
> -lncarg -lcgm -lncarg_gks -lncarg_c -lX11 -lm -L/usr/X11R6/lib -lX11
> -L/usr/lib/gcc/i386-redhat-linux/3.4.6 -lgcc -lg2c
> /usr/bin/ld: cannot find -lg2c
> collect2: ld returned 1 exit status
> make: [rip] Error 1 (ignored)
> 
> The only problem is that when I try to install libg2c on my computer I get
> the following error message:
> 
> snyderjm at snyderjm-laptop:~$ sudo apt-get install libg2c0-dev
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Couldn't find package libg2c0-dev
> 
> I already have gcc on my computer and if I try to update that on my computer
> I get the following message:
> 
> snyderjm at snyderjm-laptop:~$ sudo apt-get install gcc
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> gcc is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 85 not upgraded.
> 
> so it does not look like this needs to be updated.  Can someone please help
> me resolve this issue so that I can have libg2c on my computer and run the
> program that I need that for?
> 
> Thanks,
> 
> Jason
> 

Assuming you're on Ubuntu(or possibly Debian) by looking at
packages.ubuntu.com one can see that the package in question hasn't had
that name since Hardy (8.04)
http://packages.ubuntu.com/search?suite=default&section=all&arch=any&searchon=names&keywords=libg2c

Poking around there appear to be some solutions:
https://bugs.launchpad.net/ubuntu/+source/gcc-3.4/+bug/249991

1. use gfortran instead of g77
2. use ubuntu 8.04 which has the package
3. download the old package from the web and force the install of it

"By downloading the deb file from
http://packages.ubuntu.com/jaunty/libg2c0

and then running
sudo dpkg --force-depends -i libg2c0_3.4.6-8ubuntu2_amd64.deb"
http://ubuntuforums.org/showthread.php?t=1346528

Long term there's some underlying discussions about updating the source
code of the application to drop that dependency as it seems to not be
required if you use gcc3.4+ and gfortran (Guess from reading those links).

Thanks,
Alex


More information about the vox-tech mailing list