Summary: | dev-lang/ghc embeds -nopie CFLAG into wrapper on on gcc-spes-pie gcc, breaks on sys-devel/gcc-6.2.0: unrecognized command line option ‘-nopie’; did you mean ‘-no-pie’? | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | jeremiah <jamiahx> |
Component: | Current packages | Assignee: | Gentoo's Haskell Language team <haskell> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | erikdenstore+gbugs, jamiahx |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=631138 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 582084, 582688 | ||
Attachments: |
Complete build log for dev-haskell/dlist-0.8.0.2
config.log |
Description
jeremiah
2016-09-15 16:58:33 UTC
Can you post an example build.log for a faulty package? Created attachment 445866 [details]
Complete build log for dev-haskell/dlist-0.8.0.2
Can you post your $ emerge --info sys-devel/gcc I guess you are using USE=pie gcc. Basically the issue is: gentoo-specific pardened patches added '-pie'/'-nopie' commandline flag while upstream gcc-6 slightly changed flag name to '-pie'/'-no-pie' Upstream issue is https://ghc.haskell.org/trac/ghc/ticket/11834 where ghc needs to learn to autodetect gcc -fPIC/-fno-PIC default. Meanwhile in gentoo we can use test-flag-CC from flag-o-matic.eclass to pick from '-no-pie' / '-nopie'. the error does not persist after upgrading to ghc-8.0.1 and cabal-1.24; however, this is not really a fix (In reply to jeremiah from comment #5) > the error does not persist after upgrading to ghc-8.0.1 and cabal-1.24; > however, this is not really a fix But how? ghc ebuild still does gcc-specs-pie && append-ghc-cflags persistent compile link -nopie in src_prepare(). Fwiw, I at least still can't build ghc with gcc-6. Please, could someone replace the line above (236 in ghc-8.0.1.ebuild) with something like if test-flags -nopie >/dev/null ; then gcc-specs-pie && append-ghc-cflags persistent compile link -nopie else gcc-specs-pie && append-ghc-cflags persistent compile link -no-pie fi flag-o-matic is already inherited by the ebuild. The same pattern is used by filter-flags() in flag-o-matic.eclass, an alternative would be to just use that in stead of embedding toolchain checks in the ebuild. ghc-8.0.2 should handle -nopie/-no-pie better. It will still require rebuilding ghc to get rid of -no-pie from wrapper. Created attachment 465496 [details]
config.log
checking target system type... x86_64-pc-linux-gnu
GHC build : x86_64-unknown-linux
GHC host : x86_64-unknown-linux
GHC target : x86_64-unknown-linux
configure: Building in-tree ghc-pwd
x86_64-pc-linux-gnu-gcc: error: unrecognized command line option '-nopie'; did you mean '-no-pie'?
configure: error: Building ghc-pwd failed
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-lang/ghc-8.0.2/work/ghc-8.0.2/config.log
* ERROR: dev-lang/ghc-8.0.2::haskell failed (configure phase):
* econf failed
Same with ghc from gentoo proper. This is with gcc-6.3.0.
(In reply to eroen from comment #8) Nevermind, this is because of USE=ghcbootstrap. Please disregard, sorry. |