First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 88399
Alias:
Product:
Component:
Status: VERIFIED
Resolution: TEST-REQUEST
Assigned To: Common Lisp Herd <lisp@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Tyler Berry <loki@arete.cc>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 88399 depends on: Show dependency tree
Bug 88399 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.





View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-04-08 13:12 0000
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.

------- Comment #1 From Matthew Kennedy (RETIRED) 2005-04-09 13:43:27 0000 -------
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?

------- Comment #2 From Matthew Kennedy (RETIRED) 2005-04-09 14:31:57 0000 -------
typo: missing "die" after "fi"

------- Comment #3 From Tyler Berry 2005-04-11 16:47:48 0000 -------
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.

------- Comment #4 From Tyler Berry 2005-05-23 11:00:43 0000 -------
Looking for an update; the ebuild currently in portage has the version you
suggested, which misdiagnoses the gcc status.

------- Comment #5 From Matthew Kennedy (RETIRED) 2005-05-27 11:06:48 0000 -------
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.

------- Comment #6 From Matthew Kennedy (RETIRED) 2005-05-29 21:42:35 0000 -------
*** Bug 64452 has been marked as a duplicate of this bug. ***

------- Comment #7 From Matthew Kennedy (RETIRED) 2005-05-30 01:34:49 0000 -------
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.

------- Comment #8 From Tyler Berry 2005-05-30 17:11:01 0000 -------
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.

------- Comment #9 From Matthew Kennedy (RETIRED) 2005-05-31 09:55:21 0000 -------
Thanks. I will resolve this bug as verified then.

First Last Prev Next    No search results available      Search page      Enter new bug