Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 170230 - sys-devel/gcc fails to unpack without USE="d"
Summary: sys-devel/gcc fails to unpack without USE="d"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 170243 170308 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-10 06:15 UTC by bilateral
Modified: 2007-03-16 09:39 UTC (History)
6 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 bilateral 2007-03-10 06:15:43 UTC
gc2d portage # cat sys-devel\:gcc-4.1.2\:20070310-054522.log
>>> Unpacking source...
>>> Unpacking gcc-4.1.2.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.1.2/work
>>> Unpacking gdc-0.23-src.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/gcc

!!! ERROR: sys-devel/gcc-4.1.2 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_unpack
  ebuild.sh, line 751:   Called qa_call 'src_unpack'
  environment, line 5337:   Called src_unpack
  gcc-4.1.2.ebuild, line 54:   Called gcc_src_unpack
  toolchain.eclass, line 1018:   Called gcc_quick_unpack
  toolchain.eclass, line 1870:   Called unpack 'gdc-0.23-src.tar.bz2'
  ebuild.sh, line 404:   Called die

!!! gdc-0.23-src.tar.bz2 does not exist
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/log/portage/sys-devel:gcc-4.1.2:20070310-054522.log'.


Reproducible: Always




Had to manually download gdc-0.23-src.tar.bz2.
Comment 1 Fernando (likewhoa) 2007-03-10 06:23:00 UTC
i can confirm this, also it shouldn't be trying to unpack gdc..tar.bz2 if "-d" is in USE flags.
Comment 2 bilateral 2007-03-10 06:38:52 UTC
gcc-3.4.6-r2 is also affected.

gc2d gcc # grep 'D_VER' *
gcc-3.4.6-r2.ebuild:D_VER="0.23"
Comment 3 Fernando (likewhoa) 2007-03-10 06:42:45 UTC
ok, the problem was with toolchain.eclass and the fix was to simply change the order of the if statement from..

        if [[ -n ${D_VER} ]] ; then  
                pushd "${S}"/gcc > /dev/null
                unpack gdc-${D_VER}-src.tar.bz2
                cd ..
                if use d ; then
                        ebegin "Adding support for the D language"
                        ./gcc/d/setup-gcc.sh >& "${T}"/dgcc.log
                        if ! eend $? ; then  
                                eerror "The D gcc package failed to apply"
                                eerror "Please include this log file when posting a bug report:"
                                eerror "  ${T}/dgcc.log"
                                die "failed to include the D language"   
                        fi
                fi
                popd > /dev/null
        fi

to this....

        if [[ -n ${D_VER} ]] ; then  
                if use d ; then
                        pushd "${S}"/gcc > /dev/null
                        unpack gdc-${D_VER}-src.tar.bz2
                        cd ..
                        ebegin "Adding support for the D language"
                        ./gcc/d/setup-gcc.sh >& "${T}"/dgcc.log
                        if ! eend $? ; then  
                                eerror "The D gcc package failed to apply"
                                eerror "Please include this log file when posting a bug report:"
                                eerror "  ${T}/dgcc.log"
                                die "failed to include the D language"   
                        fi
                fi
                popd > /dev/null
        fi

This way it will only unpack if "d" is in USE flags.
Comment 4 Fernando (likewhoa) 2007-03-10 06:45:11 UTC
to further add, i think the "pushd "${S}"/gcc > /dev/null" should go below the first "if" statement.
Comment 5 bilateral 2007-03-10 07:01:41 UTC
Gracias
Comment 6 Aidan Taniane 2007-03-10 09:32:39 UTC
I had the same problem on x86 hardened, as a quick workaround I fetched the required file manually.
Comment 7 Anant Narayanan (RETIRED) gentoo-dev 2007-03-10 10:43:44 UTC
*** Bug 170243 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2007-03-10 13:40:53 UTC
fixed in cvs
Comment 9 Peter Gerassimoff 2007-03-10 13:49:49 UTC
Tracked it down as $D_VER expands to the correct version '0.23' whether or not 'd' use flag is present.  For get uses the test:

       [[ -n ${D_VER} ]] && \
                GCC_SRC_URI="${GCC_SRC_URI} d? ( mirror://sourceforge/dgcc/gdc-${D_VER}-src.tar.bz2 )"

This only gets the gdc source if 'd' is in the source list

But later toolchain... uses

[[ -n ${D_VER}   ]] && IUSE="${IUSE} d"

And this always works and whether d was initially set, from now on it is always set.  Because get comes first, before build or unpack, it fails to get the gdc source while the rest look for it to be there, always.

If you only want to build in gdc when 'd' is present in the USE list, then all of the logic should test for it rather than D_VER because the latter is set to "0.23".  If you always want gdc to be added, get rid of " d? " in the get portion.

From the code, it looks like you didn't want gdc to always be built.  If so, set D_VER to blank when " d " not in use list and keep it from being filled in.
 
 
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2007-03-10 21:49:19 UTC
*** Bug 170308 has been marked as a duplicate of this bug. ***