Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 80424

Summary: Unable to compile media-libs/jpeg-6b-r4 with gcc version 3.3.5-r1
Product: Gentoo Linux Reporter: Johan Broman <johan>
Component: [OLD] GCC PortingAssignee: Please assign to toolchain <gcc-porting>
Status: RESOLVED WORKSFORME    
Severity: normal CC: evan, flammie, halcy0n, justin, richard.adam
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Johan Broman 2005-02-02 00:33:32 UTC
I've just installed a new machine and I'm trying to 

# emerge gnome

Unfortunately the emerge fails on a package called:

media-libs/jpeg-6b-r4

It seems to me that the problem occurs because the ebuild assumes it can find files in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4. I'm running gcc version 3.3.5-r1, hence the 3.3.4 directory doesn't exist (version 3.3.5-r1 came with emerge system). As a result I am unable to emerge gnome....
Here's an output of the error message:

 i686-pc-linux-gnu-gcc -O2 -march=pentium4 -fomit-frame-pointer -pipe -I. -c ./wrjpgcom.c -o wrjpgcom.o >/dev/null 2>&1
libtool --mode=link i686-pc-linux-gnu-gcc  -o rdjpgcom rdjpgcom.lo
i686-pc-linux-gnu-gcc -o rdjpgcom .libs/rdjpgcom.o
libtool --mode=link i686-pc-linux-gnu-gcc  -o wrjpgcom wrjpgcom.lo
g++ -shared -nostdlib /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../crti.o /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/crtbeginS.o  .libs/jcapimin.o .libs/jcapistd.o .libs/jctrans.o .libs/jcparam.o .libs/jdatadst.o .libs/jcinit.o .libs/jcmaster.o .libs/jcmarker.o .libs/jcmainct.o .libs/jcprepct.o .libs/jccoefct.o .libs/jccolor.o .libs/jcsample.o .libs/jchuff.o .libs/jcphuff.o .libs/jcdctmgr.o .libs/jfdctfst.o .libs/jfdctflt.o .libs/jfdctint.o .libs/jdapimin.o .libs/jdapistd.o .libs/jdtrans.o .libs/jdatasrc.o .libs/jdmaster.o .libs/jdinput.o .libs/jdmarker.o .libs/jdhuff.o .libs/jdphuff.o .libs/jdmainct.o .libs/jdcoefct.o .libs/jdpostct.o .libs/jddctmgr.o .libs/jidctfst.o .libs/jidctflt.o .libs/jidctint.o .libs/jidctred.o .libs/jdsample.o .libs/jdcolor.o .libs/jquant1.o .libs/jquant2.o .libs/jdmerge.o .libs/jcomapi.o .libs/jutils.o .libs/jerror.o .libs/jmemmgr.o .libs/jmemnobs.o  -L/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4 -L/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/crtendS.o /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../crtn.o  -Wl,-soname -Wl,libjpeg.so.62 -o .libs/libjpeg.so.62.0.0
g++: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../crti.o: No such file or directory
g++: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/crtbeginS.o: No such file or directory
g++: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/crtendS.o: No such file or directory
g++: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../crtn.o: No such file or directory
make: *** [libjpeg.la] Error 1
make: *** Waiting for unfinished jobs....
i686-pc-linux-gnu-gcc -o wrjpgcom .libs/wrjpgcom.o

!!! ERROR: media-libs/jpeg-6b-r4 failed.
!!! Function src_compile, Line 43, Exitcode 2
!!! make failed
!!! If you need support, post the topmost build error, NOT this status message.


Reproducible: Always
Steps to Reproduce:
1. emerge jpeg
2.
3.

Actual Results:  
emerge fails
Comment 1 Flammie Pirinen (RETIRED) gentoo-dev 2005-02-02 06:22:55 UTC
I just verified the same bug with a fresh install, re-emerging libtool after update of gcc + glibc will fix (or work-around?) it apparently, and the same error will appear on other ebuilds than jpeg as well.
Comment 2 Justin Clift 2005-02-02 07:31:13 UTC
Hi,

This exact bug is valid, and the suggested solutions of running fix_libtool_files.sh (in many other bugs for jpeg-6b-r4 and fix_libtool_files.sh) doesn't work.

With a bit of investigating, I've found a working solution.

 1. For me, if I look in /etc/env.d/05gcc, in the LDPATH setting it has a mention of "3.3.4" whilst I'm actually using gcc version 3.3.5.  The "3.3.4" definitely shouldn't be there.  Remove this wrong path in that file and save it.

 2. Next, run "env-update".  This refreshes a few things with the updated /etc/env.d/05gcc file.

 3. *Reinstall libtool*  (Definitely necessary in case people are doubting).

    # emerge --unmerge libtool
      <stuff happens here>
    # emerge libtool
      <stuff happens here>

 4. emerge jpeg

    Should now compile properly and install.  It did for me after all this.

I'm not sure why libtool needs to be rebuilt, all I know is that the jpeg emerge refused to work until I'd done it.

Regards and best wishes,

Justin Clift
Comment 3 Burhan Khalid 2005-02-05 00:38:34 UTC
I have the same problem, but Justin's fix doesn't apply in my case since my paths are correct :

PATH="/usr/i686-pc-linux-gnu/gcc-bin/3.3.5"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/3.3.5"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/info"
LDPATH="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5"
GCC_SPECS=""

Are there any other fixes for this issue? fix_libtools_sh doesn't solve this problem.
Comment 4 Burhan Khalid 2005-02-05 03:01:40 UTC
After a few emails between Justin & I, we were able to resolve this bug by re-emerging libtools.

Make sure your envrionment points to the correct gcc version before you re-emerge libtools.

Thanks to Justin for the tip.
Comment 5 Johan Broman 2005-02-05 05:19:54 UTC
Hi!

Thanks for the tips Justin, that seemed to do the trick! I was able to compile jpeg-6b-r4 without a glitch and I'm now running Gnome :)


Regards
/johan
Comment 6 Adam 2005-02-05 09:41:42 UTC
I had this problem and comment #2 worked for me.

It seems the file /etc/env.d/05gcc originally came from the stage tarball (mine was stage2-athlon-xp-2004.3.tar.bz2), where many of the paths were wrong.  At the time I edited the file to fix the problem, the other paths had gotten fixed by something but the LDPATH had many identical paths separated by ":", and all but one said 3.3.4.

So my guess is that whatever program is supposed to fix that file was supposed to remove the path that was there before and replace it with a new one, but instead only appended the new one.

It seems to be related to having gcc 3.3.4 on the Gentoo CD when installing the basic system, then having it upgrade to 3.3.5 when you run "emerge system".
Comment 7 Adam 2005-02-05 09:43:19 UTC
By the way, what's the rationale behind having different folders for different versions of gcc?  (I.e. /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4 and /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5).
Comment 8 Mark Loeser (RETIRED) gentoo-dev 2005-02-05 23:26:24 UTC
Adam,
That way you can have multiple versions of gcc installed at the same time.  Currently on my test box I have 3.3.5, 3.4.3, and 4.0 all installed.  That way I can make sure anything I change will compile on all versions, or if something doesn't compile with 4.0, I can roll back to 3.4 and use that instead.
Comment 9 SpanKY gentoo-dev 2005-02-06 04:14:48 UTC
looks fine
Comment 10 SpanKY gentoo-dev 2005-02-10 15:27:34 UTC
*** Bug 81518 has been marked as a duplicate of this bug. ***
Comment 11 Adam 2005-02-12 18:17:30 UTC
I think this is still a problem, isn't it, because something was causing that file to be incorrect?  (see comment #6)