Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39306 - unmerge hardened-gcc should trigger hcc -r before unmerging
Summary: unmerge hardened-gcc should trigger hcc -r before unmerging
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-24 21:13 UTC by Scott Taylor (RETIRED)
Modified: 2004-03-01 06:40 UTC (History)
0 users

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 Scott Taylor (RETIRED) gentoo-dev 2004-01-24 21:13:16 UTC
Its pretty easy to forget to do an hcc -r before unmerging this package. Failure
to do so results in gcc trying to link against a crt1S.o that had just been
deleted as part of the ebuild. It also leads to cursing at yourself, the machine,
and anyone within earshot as you re-merge this package just so you can run hcc -r
then unmerge it again.
Comment 1 Alexander Gabert (RETIRED) gentoo-dev 2004-01-25 06:09:23 UTC
>>> "It also leads to cursing at yourself, the machine,"

i take that as an offense, sorry.

now lets get back to the technical implementation.

what i am missing in this bug report is a description of what is happening, which versions of glibc/gcc/binutils and hardened-gcc are found on the system where this happens and last but not least, looking at the hardened-gcc ebuild itself:

from 2.4.6
## backup/restore logic
pkg_postrm() {
    [ ! -f "${HGCC_SHSCRIPT_INSTALLATIONPATH}/hardened-gcc" ] && gcc -dumpspecs > $(dirname $(gcc --print-libgcc-file-name))
}

same in the 3.3 pack
## backup/restore logic
pkg_postrm() {
    [ ! -f "${HGCC_SHSCRIPT_INSTALLATIONPATH}/hardened-gcc" ] && gcc -dumpspecs > $(dirname $(gcc --print-libgcc-file-name))
}

so, putting the insults aside... is there anything going wrong with that logic at your side?

if yes, i would be interested to learn about the background why this restore is not performed.

thank you very much,

Alexander Gabert

Comment 2 Scott Taylor (RETIRED) gentoo-dev 2004-01-25 10:16:06 UTC
The yelling wasn't aimed at you in particular... But it was very much real. I had
just finished unmerging hcc and started the new gcc build when it died:

in /data/tmp/portage/gcc-3.3.2-r6/work/build using "mt-frag"
/var/tmp/portage/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: crt1S.o: No such file: No such file or directory

merging, hcc -r, unmerge did get things back to a point where gcc would compile again.
Comment 3 solar (RETIRED) gentoo-dev 2004-02-21 22:58:13 UTC
Hey Scott think you could attach a patch/diff for this?
Comment 4 Scott Taylor (RETIRED) gentoo-dev 2004-02-21 23:27:35 UTC
When I reported it, I had definitely seen unexpected behavior. Sounds like it
should have worked as expected, perhaps it was just a quirk in the handling by
portage? Either way, I haven't been able to reproduce it, and I've gone pretty
far down the path of gcc-pie (the reason I unmerged hardened-gcc in the first
place). I'm willing to chalk it up to being a random occurrence.
Comment 5 Alexander Gabert (RETIRED) gentoo-dev 2004-03-01 06:40:07 UTC
works for me

additionally, hardened-gcc is end of life due march 2004.