The new ebuild for SBCL 0.8.21 prints an error message if the user has hardened in his USE flags. This is somewhat misleading; the stack protector and PIC options for hardened GCC do cause a compiler error during the SBCL build, but there's an easy way around this not mentioned by the error message which is available even if GCC was compiled with hardened. Namely, use gcc-config to select the -vanilla variant of the GCC compiled with the hardened flag, do 'source /etc/profile', and emerge SBCL. Given the current setup in the ebuild, you also have to do USE="-hardened" just to disable the error message and allow the build to happily proceed. It would be nice to expand the printed error message in the ebuild so that users with hardened GCC don't unnecessarily rebuild their C compiler just to install SBCL; ideally, the ebuild could look at the currently selected GCC profile and print a better error message. Caveat; this is all assuming ~x86 Gentoo, which is all that I use. I don't know if gcc-config is in use on non-tilde Gentoo yet.
Thanks for this information, I going to add pkg_setup() { if gcc-config -c |grep hardened; then while read line; do einfo "${line}"; done <<EOF So-called "hardened" compiler features are incompatible with SBCL. You must use gcc-config to select a profile with non-hardened features and "source /etc/profile" before continuing. EOF fi } Do you think thats reasonable?
typo: missing "die" after "fi"
That will miss certain cases actually. From my system: % gcc-config -l [1] i686-pc-linux-gnu-3.3.4 [2] i686-pc-linux-gnu-3.4.3-20050110 * [3] i686-pc-linux-gnu-3.4.3-20050110-hardenednopie [4] i686-pc-linux-gnu-3.4.3-20050110-hardenednossp [5] i686-pc-linux-gnu-3.4.3-20050110-vanilla The -vanilla is the only one that will work with SBCL (and for that matter, CMUCL too). But AFAIK that option will only exist if the gcc was compiled with hardened in the first place. Maybe something like: use hardened && if `gcc-config -c | grep -q vanilla` ; then ... fi Which assumes that hardened wasn't altered between the compilation of gcc and SBCL, but really I don't see a way around that assumption.
Looking for an update; the ebuild currently in portage has the version you suggested, which misdiagnoses the gcc status.
Is this logic correct... use hardened && if `gcc-config -c | grep -q vanilla` ; then ... fi "If the user has "hardened" in thier USE flag set, and their corrently selected gcc-config profile has "vanilla" in it, then show the error message and die". I'm a bit confused because in Comment #3 you mentioned that -vanilla is the only profile which works with SBCL and CMUCL. Did you mean: use hardened && if `gcc-config -c | grep -qv vanilla`; then ... fi Which is true for when hardened is in USE *and* their gcc-config profile *doesn't* contain "vanilla" in it.
*** Bug 64452 has been marked as a duplicate of this bug. ***
I added the above check to the ebuild for sbcl-0.9.1. Please check my logic. I'll resolve this bug for now with a test request.
Sorry for the delay, RL reared its ugly head this weekend. Either of those two formulations should work, just as long as you're sensitive to which case is 'OK' and which one is 'Evil', and do the right thing inside the conditional as appropriate. The way you have it in the ebuild right now seems to behave correctly for me.
Thanks. I will resolve this bug as verified then.