Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 223889 - dev-lang/gnat-gcc-4.3.0 fails to build with gcc-4.2.4
Summary: dev-lang/gnat-gcc-4.3.0 fails to build with gcc-4.2.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: ada team [OBSOLETE]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-27 20:08 UTC by Dirk Heinrichs
Modified: 2009-08-30 09:10 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 Dirk Heinrichs 2008-05-27 20:08:15 UTC
I get the following error when building gnat-gcc-4.3.0 with gcc-4.2.4:

make[1]: Leaving directory `/gentoo/build/dev-lang-gnat-gcc-4.3.0/work/build'
>>> Done src_compile
locked_pipe_command: /gentoo/build/dev-lang-gnat-gcc-4.3.0/work/usr/lib/gnatgcc/i686-pc-linux-gnu/4.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/i686-pc-linux-gnu/4.2.4/libstdc++.so.6)

!!! ERROR in dev-lang/gnat-gcc-4.3.0:
!!! In paludis_pipe_command at line 4422
!!! locked_pipe_command failed

!!! Call stack:
!!!    * paludis_pipe_command (/gentoo/build/dev-lang-gnat-gcc-4.3.0/temp/loadsaveenv:4422)
!!!    * ebuild_notice (/gentoo/build/dev-lang-gnat-gcc-4.3.0/temp/loadsaveenv:1999)
!!!    * perform_hook (/gentoo/build/dev-lang-gnat-gcc-4.3.0/temp/loadsaveenv:4495)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:468)
!!!    * main (/usr/libexec/paludis/ebuild.bash:479)

diefunc: making ebuild PID 21812 exit with error
die trap: exiting with error.

Looks like 4.2.4's libstdc++.so doesn't like gnat-boot's (too old?) libgcc.so.

Reproducible: Always

Steps to Reproduce:
1. Install gnat-gcc-4.3.0 with gcc-4.2.4
Actual Results:  
See above.

Expected Results:  
Install gnat-gcc.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-27 20:59:07 UTC
Could you post something-approaching-emerge--info as well, please?
Comment 2 Dirk Heinrichs 2008-05-28 06:13:13 UTC
(In reply to comment #1)
> Could you post something-approaching-emerge--info as well, please?

I'm currently not at that machine. However, I don't see how this would make a difference. The error message I posted has all the needed information. libgcc_s.so.1 from the gnat-boot bootstrap package is missing a symbol (GCC_4.2.0) needed by libstdc++.so.6 that comes with gcc 4.2.4. That's because gnat-boot is version 4.1 and the latest GCC_* symbol in its libgcc_s.so.1 is GCC_4.0.0.

Comment 3 Dirk Heinrichs 2008-05-28 16:25:14 UTC
To second what I wrote above:

strings /gentoo/build/dev-lang-gnat-gcc-4.3.0/work/usr/lib/gnatgcc/i686-pc-linux-gnu/4.1/libgcc_s.so.1|grep GCC
GCC_3.0
GCC_3.3
GCC_3.3.1
GCC_3.4
GCC_3.4.2
GCC_4.0.0


# paludis --info
paludis 0.26.1
Paludis build information:
    Compiler:
        CXX:                   i686-pc-linux-gnu-g++ 4.2.3 (Gentoo 4.2.3 p1.0)
        CXXFLAGS:              -O2 -march=prescott -pipe -fomit-frame-pointer
        LDFLAGS:
        DATE:                  2008-05-17T13:49:25+0200

    Libraries:
        C++ Library:           GNU libstdc++ 20080201

    Reduced Privs:
        reduced_uid:           101
        reduced_uid->name:     paludisbuild
        reduced_uid->dir:      /var/tmp/paludis
        reduced_gid:           440
        reduced_gid->name:     paludisbuild

    Paths:
        DATADIR:               /usr/share
        LIBDIR:                /usr/lib
        LIBEXECDIR:            /usr/libexec
        SYSCONFDIR:            /etc
        PYTHONINSTALLDIR:
        RUBYINSTALLDIR:        /usr/lib/ruby/site_ruby/1.8/i686-linux

    Package information:
        app-admin/eselect-compiler: (none)
        app-shells/bash:       3.2_p39
        dev-java/java-config:  (none)
        dev-lang/python:       2.5.2-r4
        dev-python/pycrypto:   (none)
        dev-util/ccache:       (none)
        dev-util/confcache:    (none)
        sys-apps/baselayout:   2.0.0
        sys-apps/openrc:       0.2.4-r1
        sys-apps/sandbox:      1.2.18.1-r2
        sys-devel/autoconf:    2.13 2.62
        sys-devel/automake:    1.10.1-r1 1.5 1.7.9-r1 1.8.5-r3 1.9.6-r2
        sys-devel/binutils:    2.18-r1
        sys-devel/gcc-config:  1.4.0-r4
        sys-devel/libtool:     1.5.26
        virtual/os-headers:    2.6.25-r3 (for sys-kernel/linux-headers::installed)
Comment 4 George Shapovalov (RETIRED) gentoo-dev 2008-05-28 20:23:27 UTC
I just updated my gcc to 4.2.4 and rebuild gnat-gcc-4.3.0. I cannot reproduce this. In fact this was built with gcc-4.3.0 and was (earlier) tested with gcc-4.1, don't remember about 3.4. Anyway, gcc version should not matter, as gnat-gxx pulls in bootstrap that is solely used for building the final version. That is, gnat-gxx build process is not even supposed to touch system gcc (as gnat requires Ada-enabled gcc and gcc in Gentoo does not know about Ada it cannot be used anyway).

The error you report suggests that you have a misconfiguration on your system. I would suggest the usual routines - like running revdep-rebuild, updating/rebuilding toolcain/binutils, may be trying to emerge libstdc++, as you seem to have a direct complain about this (but doubtfull, as a separate libstdc++ is a compatibility version, with the gcc-3.3 stuff); trying to rebootstrap if all else fails.. However I see that you are using paludis and I suspect this is the primary reason. 

gnat is very sensitive to how the environment is setup during the build. I had to fight it a few times with standard setup (portage was not always behaving logically) and there is no saying in what subtle ways paludis is incompatible with portage. Therefore, I'd suggest trying to use portage to build gnat. I strongly suspect that this issue is not limited to gnat-gcc-4.3 and gcc-4.2.4 on your system. You will likely face some breakage (if not identical, then some other weird stuff) if you try to build some other gnat version..

George
Comment 5 Dirk Heinrichs 2008-05-30 07:53:33 UTC
Yes, you're right. gnat-gcc installs fine with emerge, seems to be a problem with paludis. Please leave this bug open for the paludis folks to take over.
Comment 6 Dirk Heinrichs 2008-05-30 12:12:18 UTC
Hmm, the reason seems to be these lines in gnatbuild.eclass:

# additional vars from gnuada and elsewhere
export LD_RUN_PATH="${LIBPATH}"
export LIBRARY_PATH="${GNATLIB}"
export LD_LIBRARY_PATH="${GNATLIB}"

They seem to be responsible for mixing libs from the build area with installed ones. This should not happen.
Comment 7 David Baehrens 2009-07-31 13:57:04 UTC
Commenting out the two lines for LD_RUN_PATH and LD_LIBRARY_PATH fixed this problem with dev-lang/gnat-gpl-4.1.3.2007 building with i686-pc-linux-gnu-4.3.2 for me.
Comment 8 George Shapovalov (RETIRED) gentoo-dev 2009-08-30 09:10:14 UTC
Yea, sorry about that. This was set long time ago trying to trace some other ezotheric build issues. HOwever the LD_ vars should not, of course, have been added.