Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 129891 - darcs appends invalid -fno-stack-protector-all and -nopie
Summary: darcs appends invalid -fno-stack-protector-all and -nopie
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
: 146223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-13 18:49 UTC by Donnie Berkholz (RETIRED)
Modified: 2006-12-14 03:10 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 Donnie Berkholz (RETIRED) gentoo-dev 2006-04-13 18:49:19 UTC
These options are invalid on the ssp in gcc4, which changed from Gentoo's patchset in 3.x etc. Thus, the build breaks.

Here's the relevant portion from the build log:

/var/log/portage/10235-darcs-1.0.6.log-ghc -cpp  -package QuickCheck -package util -package parsec -O -funbox-strict-fields  -Wall -Werror -I. -DHAVE_CURSES -DHAVE_CURL -optl-L/usr/lib -optl-lcurl -optl-ldl -optl-L/usr/lib -optl-lgnutls -optl-lgcrypt -optl-lgpg-error -optl-lz -optl-lcurses -o stringify stringify.hs
/var/log/portage/10235-darcs-1.0.6.log-gcc: unrecognized option '-nopie'
/var/log/portage/10235-darcs-1.0.6.log:cc1: error: unrecognized command line option "-fno-stack-protector-all"
/var/log/portage/10235-darcs-1.0.6.log-make: *** [stringify] Error 1
/var/log/portage/10235-darcs-1.0.6.log-
/var/log/portage/10235-darcs-1.0.6.log-!!! ERROR: dev-util/darcs-1.0.6 failed.
Comment 1 Duncan Coutts (RETIRED) gentoo-dev 2006-04-20 07:17:56 UTC
spyderous, would you mind looking over ghc-6.4.1-r3 (currently p.masked) which handles these options differently. I expect that it should work for gcc 4, though with recent toolchain elcass changes it might be possible to improve it.
Comment 2 Duncan Coutts (RETIRED) gentoo-dev 2006-05-18 13:51:38 UTC
More changes have gone in to ghc-6.4.1-r3, ghc-6.4.2 and ghc-bin-6.4.1-r1 to address this issue. Anyone with an old ghc installation (6.4.1-r1 or earlier) who upgrades their gcc to 4.x and hits this problem will be able to rescue the situation by re-emerging ghc using one of these new revisions.

These new revisions will also allow you to switch freely between gcc-3.x and 4.x. However users will no longer be able to switch freely between vanilla and hardened gcc. For the moment that will require re-emerging ghc (or ghc-bin).

This should also fix the -nopie warnings.

So this is a workable solution, it makes life a bit harder for people who use hardened gcc but there are rather more people using gcc-4.x. An ideal solution would require a ghc-config program and have that hook into gcc-config so that we can adjust ghc's CFLAGS when gcc changes.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-09-04 00:17:25 UTC
*** Bug 146223 has been marked as a duplicate of this bug. ***
Comment 4 Ben Fowler 2006-12-13 21:33:14 UTC
Using ppc, I get this problem trying to emerge dev-haskell/haddock-0.7 with ghc-6.4.2.

Portage 2.1.1-r2 (default-linux/ppc/2004.1, gcc-4.1.1, glibc-2.4-r4, 2.6.16-gentoo-r9 ppc)
=================================================================
System uname: 2.6.16-gentoo-r9 ppc 7410, altivec supported
Gentoo Base System version 1.12.6
Last Sync: Sat, 09 Dec 2006 12:50:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=7400 -maltivec -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -mcpu=7400 -maltivec -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en_GB en fr de es"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/mnt/FIRELITE/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage/"
USE="ppc X accessibility alsa altivec apache2 bash-completion berkdb bitmap-fonts bzip2 cli cracklib crypt cscope cups dbus dhcp directfb dlloader doc dri dvd effects elibc_glibc elibc_uclibc emboss expat fam fat fbcon firefox font-server fortran fuse gd gif gimpprint gnome gpm graphviz gstreamer gtk gtk2 hal haskell hfs iconv ieee1394 imagemagick imap input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog ithreads jack jpeg jpeg2k kde kernel_linux lcms libwww linguas_de linguas_en linguas_en_GB linguas_es linguas_fr livecd motif mozdevelop mozsvg mp3 mpeg mysql ncurses nfs nls nptl nptlonly ntfs oggvorbis opengl pam pbbuttonsd pcmcia pcre pdf perl php png ppds pppd python qt3 qt4 readline reflection reiser4 reiserfs ruby samba session slp snmp spell spl sql sqlite ssl subversion svg tcpd threads tidy tiff truetype truetype-fonts type1-fonts unicode userland_GNU utempter video_cards_dummy video_cards_fbdev video_cards_v4l vorbis wxwindows xinerama xml xml2 xorg xv zeroconf zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 5 Ben Fowler 2006-12-13 21:47:31 UTC
(In reply to comment #4)
> Using ppc, I get this problem trying to emerge dev-haskell/haddock-0.7 with
> ghc-6.4.2.

haddock might be masked, so I am not sure why it is being emerged at this point 
(it is about 363rd on a list of 600 packages in emerge -e world).

$ equery list -p haddock
[ Searching for package 'haddock' in all categories among: ]
 * installed packages
[I--] [M ] dev-haskell/haddock-0.6-r3 (0)
 * Portage tree (/usr/portage)
[-P-] [M ] dev-haskell/haddock-0.7 (0)
[-P-] [M~] dev-haskell/haddock-0.8 (0)
Comment 6 Ben Fowler 2006-12-14 03:10:16 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Using ppc, I get this problem trying to emerge dev-haskell/haddock-0.7 with
> > ghc-6.4.2.
> 
> haddock might be masked, so I am not sure why it is being emerged at 
> this point (it is about 363rd on a list of 600 packages in 
> emerge -e world).

... and a little later I get the same problem with dev-util/darcs-1.0.5