Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 357173 - cross-i686-pc-linux-gnu/gcc-4.4.5 fails on SPARC when local libs (libgcc_s.so.1) get picked up by host tools (msgfmt)
Summary: cross-i686-pc-linux-gnu/gcc-4.4.5 fails on SPARC when local libs (libgcc_s.so...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
: 368103 434738 543824 (view as bug list)
Depends on:
Blocks: crossdev-bugs
  Show dependency tree
 
Reported: 2011-03-02 23:10 UTC by Alex Buell
Modified: 2019-12-22 23:21 UTC (History)
6 users (show)

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


Attachments
cross-i686-pc-linux-gnu-info.log (cross-i686-pc-linux-gnu-info.log,14.78 KB, text/plain)
2011-03-03 00:41 UTC, Alex Buell
Details
cross-i686-pc-linux-gnu-gcc-stage2.log gzipped (cross-i686-pc-linux-gnu-gcc-stage2.log.gz,124.22 KB, application/octet-stream)
2011-03-03 00:42 UTC, Alex Buell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buell 2011-03-02 23:10:53 UTC
Using crossdev -S i[56]86, gcc stage2 builds fails on SPARC, stops just after building fortran libraries. Logs attached.
Comment 1 Alex Buell 2011-03-03 00:41:02 UTC
Created attachment 264547 [details]
cross-i686-pc-linux-gnu-info.log
Comment 2 Alex Buell 2011-03-03 00:42:29 UTC
Created attachment 264549 [details]
cross-i686-pc-linux-gnu-gcc-stage2.log gzipped
Comment 3 Alex Buell 2011-03-07 15:16:33 UTC
This also happens with i586.
Comment 4 SpanKY gentoo-dev 2011-03-07 15:36:23 UTC
that detail is most likely irrelevant and can be ignored as noise
Comment 5 Alex Buell 2011-03-24 23:01:41 UTC
Did we ever find a resolution for this problem? Oddly enough this works OK on unstable sparc. There must be a difference between stable and unstable that makes this work. I only use crossdev -S i[56]86 to buld the cross compilers on SPARC. 

Also, I cannot build sparc cross compilers on x86 either.
Comment 6 Alex Buell 2011-04-02 21:02:17 UTC
Have a look at:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553047
Comment 7 SpanKY gentoo-dev 2011-04-02 21:14:59 UTC
i'm not sure that bug report is relevant ... my quick scan of it shows that the LD_LIBRARY_PATH usage there is pretty much all coming from the Debian build scripts and not from the gcc build system.
Comment 8 Alex Buell 2011-04-02 21:33:21 UTC
I wonder what are the differences between unstable sparc and stable sparc, as
my i[56]86 cross compilers on unstable sparc are apparently OK, same versions
of crossdev used on both, both builds stable i[56]86 cross compiler tool
chains.
Comment 9 Ryan Hill (RETIRED) gentoo-dev 2011-04-02 21:39:59 UTC
http://bugs.gentoo.org/show_bug.cgi?id=287667#c14 too.
Comment 10 SpanKY gentoo-dev 2011-04-03 01:50:37 UTC
hmm, maybe it's the old bug i fixed in binutils

08_all_binutils-RPATH_ENVVAR-smack.patch

http://sourceware.org/bugzilla/show_bug.cgi?id=4970
Comment 11 Alex Buell 2011-04-03 09:09:20 UTC
http://sourceware.org/ml/binutils/2007-10/msg00019.html

Maybe it just needs adapting for the libgcc.so so it doesn't pick up the wrong one when linking.
Comment 12 SpanKY gentoo-dev 2011-05-24 02:33:40 UTC
*** Bug 368103 has been marked as a duplicate of this bug. ***
Comment 13 Alexander Koryushkin 2011-06-24 11:18:50 UTC
Same problem with cross-powerpc-unknown-linux-gnu/gcc-4.4.5 on i686 host
Comment 14 SpanKY gentoo-dev 2011-11-22 22:07:50 UTC
*** Bug 391247 has been marked as a duplicate of this bug. ***
Comment 15 SpanKY gentoo-dev 2012-09-11 17:12:29 UTC
*** Bug 434738 has been marked as a duplicate of this bug. ***
Comment 16 Simon Haegler 2012-09-12 08:24:16 UTC
is there any way i can help to get this fixed? i need to have gcc 4.1.2 alongside 4.5.x on amd64 to develop against proprietary APIs (e.g. Autodesk Maya API). any hints where to start digging?
Comment 17 Justin Lecher (RETIRED) gentoo-dev 2014-01-07 09:37:29 UTC
(In reply to Simon Haegler from comment #16)
> is there any way i can help to get this fixed? i need to have gcc 4.1.2
> alongside 4.5.x on amd64 to develop against proprietary APIs (e.g. Autodesk
> Maya API). any hints where to start digging?

gcc-config x86_64-pc-linux-gnu-4.1.2
CFLAGS="-O2" emerge -1 gettext
emerge -1 gcc:4.1
gcc-config x86_64-pc-linux-gnu-4.8.2
emerge -1 gettext
Comment 18 SpanKY gentoo-dev 2015-03-26 04:41:57 UTC
*** Bug 543824 has been marked as a duplicate of this bug. ***
Comment 19 Anthony Basile gentoo-dev 2015-03-26 12:54:16 UTC
I wonder if this isn't addressed by 20_all_msgfmt-libstdc++-link.patch in gcc 4.7.4, 4.8.4 and 4.9.2?  That issue originates from bug #295480 which is not due to a cross compiling environment, but multiple native versions of gcc. But the same issues of a bad library path search order causing linking against the wrong libgcc_s.so.1 seems to be at the heart of it.
Comment 20 SpanKY gentoo-dev 2015-03-26 18:38:30 UTC
(In reply to Anthony Basile from comment #19)

it isn't.  that patch hacked one specific manifestation of the problem rather than fixing it at the underlying point.
Comment 21 Anthony Basile gentoo-dev 2015-03-26 23:08:45 UTC
(In reply to SpanKY from comment #20)
> (In reply to Anthony Basile from comment #19)
> 
> it isn't.  that patch hacked one specific manifestation of the problem
> rather than fixing it at the underlying point.

Yeah I know this can manifest itself in different ways, but suspect this was precisely the same problem again from the title "host tools (msgfmt)".
Comment 22 Justin Lecher (RETIRED) gentoo-dev 2015-03-27 13:30:24 UTC
(In reply to SpanKY from comment #20)
> (In reply to Anthony Basile from comment #19)
> 
> it isn't.  that patch hacked one specific manifestation of the problem
> rather than fixing it at the underlying point.

I tried a patch Anthony gave me which solved the problem. Even thought it probably in acts on the symptoms instead of the real problem, it enhances the usability. So it is a good idea to add it, and then focus on the underlying problem.
Comment 23 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-22 23:21:36 UTC
Fun fact: /usr/bin/msgfmt on sparc32 does not link against libgcc_s.so anymore. It does on powerpc (implicitly via gettext->libxml2->libicu) but running crossdev   on powerpc32 host Just Works for me for modern toolchain versions (gcc-9.2.0).

Let's close it as obsolete. Feel free to open a new bug and we'll try to sort it out.