Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 522268 - Recent sys-devel/binutils breaks compilation of dev-lang/ghc-{6.12.3-r2,7.0.4}
Summary: Recent sys-devel/binutils breaks compilation of dev-lang/ghc-{6.12.3-r2,7.0.4}
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL: https://stackoverflow.com/questions/1...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-06 17:09 UTC by Sebastian Pipping
Modified: 2014-09-07 16:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log of 6.12.3-r2 (dev-lang:ghc-6.12.3-r2:20140906-145556.log.bz2,68.77 KB, application/x-bzip2)
2014-09-06 17:11 UTC, Sebastian Pipping
Details
Build log of 7.0.4 (dev-lang:ghc-7.0.4:20140906-162107.log.bz2,19.63 KB, application/x-bzip2)
2014-09-06 17:11 UTC, Sebastian Pipping
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Pipping gentoo-dev 2014-09-06 17:09:49 UTC
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.
Comment 1 Sebastian Pipping gentoo-dev 2014-09-06 17:11:19 UTC
Created attachment 384302 [details]
Build log of 6.12.3-r2
Comment 2 Sebastian Pipping gentoo-dev 2014-09-06 17:11:44 UTC
Created attachment 384304 [details]
Build log of 7.0.4
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2014-09-06 18:42:50 UTC
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.
Comment 4 Sebastian Pipping gentoo-dev 2014-09-06 19:02:44 UTC
(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.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2014-09-07 06:35:22 UTC
> 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
Comment 6 Sebastian Pipping gentoo-dev 2014-09-07 14:49:35 UTC
(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.
Comment 7 Sebastian Pipping gentoo-dev 2014-09-07 16:53:41 UTC
(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.