Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136988 - Add libg2c-3 ebuild to the tree
Summary: Add libg2c-3 ebuild to the tree
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Other
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-16 07:45 UTC by webb.sprague
Modified: 2012-09-07 07:05 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description webb.sprague 2006-06-16 07:45:36 UTC
I just installed gcc-4.1.1 (note that I did use the 'fortran' use flag) and reinstalled numpy (and some other packages that are used in my web application).  Now numpy won't work because it can't find libg2c.  libg2c seems to have been installed only for gcc-3.3.6 and gcc-3.4.6.  If this isn't resolved, I guess I will go back to gcc-3.4.6, but I would like to get on the gcc-4.x train.  Thanks.

Python error, from ipython:

In [1]: import numpy
import linalg -> failed: libg2c.so.0: cannot open shared object file: No such file or directory

Where can I find libg2c?

cowboy src # updatedb && locate libg2c
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libg2c.so.0.0.0
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libg2c.so.0
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libg2c.so
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libg2c.la
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libg2c.a
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libg2c.so.0.0.0
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libg2c.so
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libg2c.la
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libg2c.a
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libg2c.so.0
/other/matlab14/sys/os/glnx86/libg2c.so.0
/other/matlab14/sys/os/glnx86/libg2c.so.0.0.0

emerge info:

Gentoo Base System version 1.12.1
*** Deprecated use of action 'info', use '--info' instead
Portage 2.1 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.11-gentoo-r9 i686)
=================================================================
System uname: 2.6.11-gentoo-r9 i686 AMD Athlon(tm) Processor
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS=" -march=athlon -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS=" -march=athlon -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts blas cli crypt cups dba dri eds emacs emboss encode esd fftw foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg lapack libg++ libwww mad mikmod mime mmap motif mp3 mpeg ncurses nls nptl nptlonly objc ogg opengl oss pam pcre pdflib perl png postgres pppd python quicktime readline reflection sdl session spell spl ssl svg tcltk tcpd tidy truetype truetype-fonts type1-fonts udev unicode vorbis xml xmms xorg xv zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-17 09:28:12 UTC
Yes. The Fortran compiler (and therefore the runtime library) changed to gfortran. You need to recompile your Fortran apps when you switch to gcc 4.

I'm going to change this to a request for an ebuild providing libg2c, similar to what libstdc++-v3 does to provide a libstdc++.so.5 when gcc 3.4 switched to the .so.6.
Comment 2 webb.sprague 2006-06-17 11:59:46 UTC
(In reply to comment #1)
> You need to recompile your Fortran apps when you switch to gcc 4.

Just FYI, I did recompile numpy after switching to gcc-4.1.1 via eselect; it didn't help.  

Perhaps adding the stuff analogous to stdc++ will take care of that -- I don't really understand what you said, but that is fine.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-17 16:59:20 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > You need to recompile your Fortran apps when you switch to gcc 4.
> 
> Just FYI, I did recompile numpy after switching to gcc-4.1.1 via eselect; it
> didn't help.  

Install portage-utils, and try this command:

qlist numpy | xargs ldd | grep -e g2c -e gfortran
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-17 17:17:25 UTC
Actually I bet it's that eselect-compiler bug again.

Look at the files in /etc/eselect/compiler/ and delete any line like alias_gfortran=g77 or alias_g77=gfortran. Then switch to gcc-4 again, and delete /usr/bin/*g77.
Comment 5 webb.sprague 2006-06-17 19:07:57 UTC
(In reply to comment #4)
> Actually I bet it's that eselect-compiler bug again.
> 
> Look at the files in /etc/eselect/compiler/ and delete any line like
> alias_gfortran=g77 or alias_g77=gfortran. Then switch to gcc-4 again, and
> delete /usr/bin/*g77.

Here is the what I did, but it didn't change the error:

(1) edit /etc/eselect/compiler/* to remove said lines
(2) mv'ed f77 to _f77, etc
(3) eselected to gcc-3.3.6
(4) eselected back to gcc-4.1.1
(5) unmerged numpy
(6) remerged numpy
Comment 6 webb.sprague 2006-06-17 20:22:25 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > You need to recompile your Fortran apps when you switch to gcc 4.
> > 
> > Just FYI, I did recompile numpy after switching to gcc-4.1.1 via eselect; it
> > didn't help.  
> 
> Install portage-utils, and try this command:
> 
> qlist numpy | xargs ldd | grep -e g2c -e gfortran

After a fresh un/merge of numpy:

cowboy ~ # qlist numpy | xargs ldd 2>/dev/null | grep -e g2c -e gfortran
        libg2c.so.0 => not found
        libg2c.so.0 => not found
        libgfortran.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgfortran.so.1 (0xb7070000)
        libg2c.so.0 => not found
        libg2c.so.0 => not found
 

Comment 7 Ian Berke 2007-02-27 22:53:40 UTC
Has there been any progress on this?  I need libg2c.so.0 for a binary program and gcc4-4.1.1-r3 still doesn't provide it.
Comment 8 Donnie Berkholz (RETIRED) gentoo-dev 2007-02-28 00:04:34 UTC
(In reply to comment #7)
> Has there been any progress on this?  I need libg2c.so.0 for a binary program
> and gcc4-4.1.1-r3 still doesn't provide it.

Nope, no progress. It will eventually be a standalone libg2c-v3 ebuild if anyone gets around to putting it together. Until then, you can work around the issue by switching your compiler to gcc3 while running the program.
Comment 9 Ian Berke 2007-02-28 13:53:50 UTC
I actually just downloaded a debian package called libg2c0_3.4.6-5_i386.deb, extracted it with dpkg and placed the library in /usr/lib.  Everything works great.  I'd rather do this than have to reinstall gcc3.4.

Shouldn't this be a relatively easy ebuild to make?
Comment 10 Donnie Berkholz (RETIRED) gentoo-dev 2007-03-01 10:18:31 UTC
(In reply to comment #9)
> Shouldn't this be a relatively easy ebuild to make?

Sure, if you're familiar with gcc's weird build process and our eclasses to control it.
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2009-01-27 10:23:12 UTC
Any progress here, Donnie?
Comment 12 Donnie Berkholz (RETIRED) gentoo-dev 2009-01-27 17:38:47 UTC
Nope. Anyone care? I'd figured most people these days make gcc-4 binaries available.
Comment 13 Justin Lecher (RETIRED) gentoo-dev 2009-01-27 18:15:05 UTC
Hit today a package which needs them. But thanks to debian, their package helps as a first workaround. Will see what the next version brings, but I am still waiting for the license.
Comment 14 Justin Lecher (RETIRED) gentoo-dev 2009-01-28 09:55:11 UTC
So finaly the new license arrived. But same linking problem:

gfortran -Wl,-O1,--hash-style=gnu,--sort-common -o cyanaexe.gnu cyana.o accel.o  acostt.o angles.o array.o  assign.o atoms.o build.o  caliba.o cgmin.o  chkgrd.o dihgrd.o dihrng.o discon.o drange.o fcn.o    gencor.o comdco.o compik.o copy.o   discom.o gener.o  geom.o   getaco.o getang.o getcco.o getcor.o getdco.o getlib.o getori.o getpik.o getpro.o getseq.o getxpl.o glomsa.o grad.o   grid.o   griaco.o gricor.o grifra.o grimem.o grisea.o grisrt.o griswa.o grdint.o hbonds.o htable.o iatom.o  inerta.o iniseq.o jcoupl.o lineq.o  makehb.o libcnv.o links.o  lisrms.o makpik.o mean.o   minim.o  moddco.o modmul.o moldyn.o multi.o  peaks.o  pikcal.o pseudo.o putaco.o putang.o putass.o putcco.o putcor.o putdco.o putpik.o putpro.o ranges.o ranstr.o readf.o  rmsd.o   rotat.o  select.o setdco.o setlev.o setlvw.o setsvw.o stable.o struct.o strcal.o sysfun.o sysvar.o setswa.o tfadd.o  tree.o   vdwatm.o veloc.o  violat.o viosta.o vtable.o writef.o  ../inclan/inclan.a 
../inclan/inclan.a(unix.o): In function `istamp_':
unix.f:(.text+0x2f): undefined reference to `stat_'
../inclan/inclan.a(unix.o): In function `uxdate_':
unix.f:(.text+0x5a): undefined reference to `time_'
../inclan/inclan.a(unix.o): In function `uxtime_':
unix.f:(.text+0x1ce): undefined reference to `time_'
../inclan/inclan.a(unix.o): In function `iwall_':
unix.f:(.text+0x2f4): undefined reference to `time_'
../inclan/inclan.a(unix.o): In function `timnow_':
unix.f:(.text+0x466): undefined reference to `etime_'
../inclan/inclan.a(unix.o): In function `igtpid_':
unix.f:(.text+0x496): undefined reference to `getpid_'
../inclan/inclan.a(unix.o): In function `isystm_':
unix.f:(.text+0x49b): undefined reference to `system_'
collect2: ld returned 1 exit status
make[2]: *** [cyanaexe.gnu] Error 1

If there is any chance to get this I would be happy.
Comment 15 Oo.et.oO 2009-10-28 18:26:48 UTC
i have the same issue needing libgc2 for a binary program.  any progress on the ebuild for it?  
Comment 16 charlie cosse 2010-02-04 07:01:18 UTC
(In reply to comment #15)
> i have the same issue needing libgc2 for a binary program.  any progress on the
> ebuild for it?  
> 

I also need libg2c.so for some older software that will no longer compile.

Comment 17 Justin Lecher (RETIRED) gentoo-dev 2010-06-22 12:27:53 UTC
Hopefully we do not need this anymore these days. But if we do, we need the help of the toolchain guys to pack it.
Comment 18 Oo.et.oO 2011-02-25 17:10:26 UTC
aparently i figured out a work around for this before as i see my comment above.  i'm using the same binary program again that needs this, and libg2c is missing again (emerge --clean maybe wiped it out?).

i have the same issue needing libgc2 for a binary program.  any progress on the
ebuild for it?  i have no idea how i fixed this before...
Comment 19 Oo.et.oO 2011-02-25 17:40:53 UTC
found an ebuild here:
https://websvn.j-schmitz.net/filedetails.php?repname=Portage+Overlay&path=%2Febuilds%2Fdev-libs%2Flibg2c%2Flibg2c-3.4.6.ebuild&rev=933

i had to change the source_uri to fetch the amd64 dpkg and i had to use keyword **, but this seemed to work...