Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127724 - Toolchain.eclass has problems with gcc 4.1/4.2 snapshots.
Summary: Toolchain.eclass has problems with gcc 4.1/4.2 snapshots.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-27 02:08 UTC by Simon Strandman
Modified: 2006-04-11 16:40 UTC (History)
1 user (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 Simon Strandman 2006-03-27 02:08:11 UTC
Toolchain.eclass has problems with gcc 4.1/4.2 snapshots. When merging files end up in the wrong dirs. For ex. a 4.1.1.20060324 snapshot would install files in both /usr/lib/gcc/i686-pc-linux-gnu/4.1.1 and /usr/lib/gcc/i686-pc-linux-gnu/4.1.1-20060324 when it should only be in the later and in /usr/libexec/gcc/i686-pc-linux-gnu/4.1.1 when it should be in /usr/libexec/gcc/i686-pc-linux-gnu/4.1.1-20060324. This causes problems when running the compiler:

configure:2239: i686-pc-linux-gnu-gcc -O2 -march=pentium3 -pipe -fomit-frame-pointer -D_FORTIFY_SOURCE=1   conftest.c  >&5
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status 

R. Hill described the problem:

"This is caused by changes to the build system in 4.1 and GCC's BASE-VER not matching portage's ${PV} in snapshot builds.  Most of the system directories are set up by portage during configure using ${PV} as part of the dirname. (eg. includedir=/usr/<lib>/gcc/<chost>/${PV}/include).  However, libdir and libexecdir aren't set by portage (because they generate really strange paths w/ --enable-version-specific-runtime-libs in GCC 3.3/3.4) and default to /usr/<lib>/gcc/<chost>/BASE-VER/blah.  When ${PV} != BASE-VER, wackiness ensues.

Try this in your ebuild:

src_unpack() {
    toolchain_src_unpack

    echo ${PV/_/-} > "${S}"/gcc/BASE-VER
    echo "" > "${S}"/gcc/DATESTAMP
}

--de."

Unfortunately adding those lines makes the compiler ICE (gcc bug #19372).
Comment 1 Mark Loeser (RETIRED) gentoo-dev 2006-03-27 05:33:31 UTC
I'll get to this when I make the changes necessary for gcc-4.2 to the eclass, which will hopefully be in a few days.
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2006-03-27 16:53:59 UTC
strange, i use it my svn ebuild and haven't ever run into trouble.  maybe you're using a $PV GCC doesn't like.  how do you name your ebuild?  mine is currently gcc-4.1.0_pre20060324.
Comment 3 SpanKY gentoo-dev 2006-03-27 21:21:02 UTC
correct, if you name your ebuild #.#.#.#######, that is wrong

it should be #.#.#_pre######
Comment 4 Simon Strandman 2006-03-27 23:03:18 UTC
I used 4.1.1.20060314 and 4.1.1_beta20060324 and both failed. I'll try with _pre.
Comment 5 Simon Strandman 2006-03-28 23:27:57 UTC
Yes that seems to have fixed it. Though I had to pull gcc from svn and make my own snapshot tarball instead of using one fron gcc.gnu.org.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2006-04-11 16:40:47 UTC
Added the necessary changes to the eclass.