The compile error is /usr/include/bfd.h:35:2: error: #error config.h must be included before this header and the guilty part of the file /* PR 14072: Ensure that config.h is included first. */ #if !defined PACKAGE && !defined PACKAGE_VERSION #error config.h must be included before this header #endif Build log attachments follow in a minute.
Created attachment 384302 [details] Build log of 6.12.3-r2
Created attachment 384304 [details] Build log of 7.0.4
Unfortunately it's a bintuils' "feature". http://sourceware.org/bugzilla/show_bug.cgi?id=14243 https://bugs.gentoo.org/show_bug.cgi?id=438626 Dou you need so old ghcs? I'm about to wipe them out from the tree.
(In reply to Sergei Trofimovich from comment #3) > Unfortunately it's a bintuils' "feature". > > http://sourceware.org/bugzilla/show_bug.cgi?id=14243 > > https://bugs.gentoo.org/show_bug.cgi?id=438626 Sigh. > Dou you need so old ghcs? > I'm about to wipe them out from the tree. According to <https://ghc.haskell.org/trac/ghc/ticket/4958> ghc 7.2.1 is the first version where haskell98 support trouble starts. So 7.0.4 is the latest in Gentoo that has a chance to build the code unpatched that I'm trying to build (without really knowing anything haskell). I tried to pull it into the present but I failed. So if it's not too hard to add a workaround I would say being able to compile haskell98 code would be nice to keep.
> According to <https://ghc.haskell.org/trac/ghc/ticket/4958> ghc 7.2.1 is the > first version where haskell98 support trouble starts. I've pushed a tweak to ghcs: > 07 Sep 2014; Sergei Trofimovich <slyfox@gentoo.org> ghc-6.12.3-r2.ebuild, > ghc-7.0.4.ebuild: > Disable bitrot bfd code (bug #522268 by Sebastian Pipping). > So 7.0.4 is the > latest in Gentoo that has a chance to build the code unpatched that I'm > trying to build (without really knowing anything haskell). I tried to pull > it into the present but I failed. So if it's not too hard to add a > workaround I would say being able to compile haskell98 code would be nice to > keep. Is that code available in public? I can try to fix it and pull in thee/overlay. Exactly that error is easy to fix: change 'build-depends:' package from 'haskell98' to 'base' in .cabal file (or wherever dependencies are specified. Sometimes it's also needed to change old-style imports to hierarchical modules like that: import Char import IO import Maybe becomes import Data.Char import System.IO import Data.Maybe
(In reply to Sergei Trofimovich from comment #5) > > According to <https://ghc.haskell.org/trac/ghc/ticket/4958> ghc 7.2.1 is the > > first version where haskell98 support trouble starts. > > I've pushed a tweak to ghcs: > > > 07 Sep 2014; Sergei Trofimovich <slyfox@gentoo.org> ghc-6.12.3-r2.ebuild, > > ghc-7.0.4.ebuild: > > Disable bitrot bfd code (bug #522268 by Sebastian Pipping). Many thanks, 7.0.4 compiles now, trying 6.* in a second. > Is that code available in public? I can try to fix it and pull in > thee/overlay. > Exactly that error is easy to fix: > > change 'build-depends:' package from 'haskell98' to 'base' in .cabal > file (or wherever dependencies are specified. > > Sometimes it's also needed to change old-style imports to hierarchical > modules > like that: > > import Char > import IO > import Maybe > > becomes > > import Data.Char > import System.IO > import Data.Maybe I did that but then ran into other errors. I'll contact you off-bug in a minute.
(In reply to Sebastian Pipping from comment #6) > Many thanks, 7.0.4 compiles now, trying 6.* in a second. 6.12.3-r2 compiles again, too. Very cool! Closing.