When I try to compile the program I made at my work, I get the following error
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lg2c
This happened after I upgraded to gcc-3.3.3-r3.
You neglected to provide 'emerge info'
Not much we can say or do without this info.
My emerge info:
Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 2.6.3-gentoo-r1)
System uname: 2.6.3-gentoo-r1 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.10
ccache version 2.3 [enabled]
CFLAGS="-march=pentium3 -mmmx -msse -mfpmath=sse -O3 -pipe"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -mmmx -msse -mfpmath=sse -O3 -pipe"
GENTOO_MIRRORS="http://ftp.surfnet.nl/ftp/pub/ibiblio/distributions/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"MAKEOPTS="-j3"
USE="X alsa avi berkdb cdr composite crypt dga directfb encode esd flash foomaticdb gd-external gdbm gif gnome gtk gtk2 guile imlib java jpeg libg++ libwww madmikmod mmx mng mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png ppds python quicktime readline sdl slang spell sse ssl tcltk tcpd tetex tiff truetype wmf x86 xml2 xmms xv zlib"
You do not have fortran support compiled into gcc. Please add f77 to USE
and remerge gcc.
I might add that this was one of my reasons for not ripping objc and f77
out sooner ...
i'm on both the lists here :p
we added the new USE flags to the hard masked gcc-3.3.3-r2 for that reason :p
but if it wasnt done now, it's hard to define 'later'
Yeah well, I guess my point of view was always that they are not much overhead,
and its a lot less than remerging the whole thing. GCJ is another matter of
course. What about adding objc and f77 to default USE flags - user then have
to specifically disable them. Alternatively is to do it like I did with gcj
initially - add nof77 and noobjc.
"What about adding objc and f77 to default USE flags" -- Yes this should
I don't personaly touch the default-x86 profiles but it should be added.
The logic that we had talked about (SpanKY and myself) was "name" vs
"noname" was to actually make USE="-*" give us a minimal install. Mainly
for life with the embedded world where we want to keep everything small
as we can including the make.conf itself.
I just discovered today that I was missing g77 due to the new USE flags.
I suppose that this is one way to find out how many packages in portage
still have legacy fortran code in them.... *Sigh*
Libraries like that can only be compiled with g77 do exist in portage. Examples are app-sci/blas and app-sci/lapack (which I use at work).
I just stumbled over a bug related to this - #50360 . Is there any clean way how to tell portage that we depend on having g77? Making the ebuild die in pkg_setup is not what I'd call a solution.
Ugh, Ok, here it is (the related bug) :).
This is pointed mostly towards gcc mainainers, but, I imagine, would apply for all core libs:
Guys, please, please, if you do such a change (pulling fortran out of gcc in this case), at the very least, please do a proper announcement on -dev (mailing list)! Looks like this change has broken nearly half of the packages under app-sci (so adding list would ahve been nice too in principle). Oh, and yea, I think +f77 should be default.
>I suppose that this is one way to find out how many packages in portage
>still have legacy fortran code in them.... *Sigh*
You'll be surprised ;), especially by the fact that not all of it is "legacy". Fortran has a quite special structure, which makes it not very pleasant for use with generic stuff (especially structural, buy actually not that bad with Fortran 95/2000), but it allows to write a more optimized number-crunching stuff. So I don't think its gonna go away in certain areas, not in foreseeable future at least..
>Is there any clean way how to tell portage that we depend on having g77?
>Making the ebuild die in pkg_setup is not what I'd call a solution.
Agree on that. There is even a related bug :), #2272. If we can get it done we will have a clean way, but until then, I am not too sure :(.
I seem to clearly recall telling the several mailing lists about the upcoming gcc changes.
Cc: releng <email@example.com>, firstname.lastname@example.org, email@example.com
Subject: Changes in >=gcc-3.3.3-r2
Date: 29 Apr 2004 17:12:52 -0400
The arch maintainers should of add it to profiles
before it ever gets unmasked.
So if things are breaking on your system talk to
But I don't see gentoo-dev among them ;). This change is quite a broad one, so IMHO it warrants a post to -dev, to which all of us are supposed to be subscribed.
Anyway, I apologise for sounding too rough. Although please try to reach all devs in similar situation.