Bug 1957233 - haskell packages using c2hs fail to build due to gcc11 in Fedora 34
Summary: haskell packages using c2hs fail to build due to gcc11 in Fedora 34
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk2hs-buildtools
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-05 12:30 UTC by Sergey Dmitriev
Modified: 2021-05-18 05:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 05:19:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sergey Dmitriev 2021-05-05 12:30:57 UTC
Description of problem:

cabal fails to compile and install packages with C hookups due to introduction of gcc11 in Fedora 34.
install goes smoothly on Fedora 33 with gcc10
Same problem has been reported as FTBFS for Debian for a list of Haskell components
For example: https://alioth-lists.debian.net/pipermail/pkg-haskell-maintainers/2021-March/075208.html

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. dnf install cabal-install
2. cabal update
3. cabal install ncurses

Actual results:

Failed to build ncurses-0.2.16.
Build log (
/root/.cabal/logs/ghc-8.8.4/ncurses-0.2.16-84973bef3e57511a459c21397a857ce3a04189952a45d9441bec60c3c06514ae.log
):
Configuring ncurses-0.2.16...
Preprocessing library for ncurses-0.2.16..
c2hs: C header contains errors:

dist/build/UI/NCurses.i:1: (column 1) [ERROR]  >>> Lexical error !
  The character '#' does not fit here.

cabal: Failed to build ncurses-0.2.16. See the build log above for details.


Expected results:


Additional info:

Comment 1 Jens Petersen 2021-05-18 04:34:43 UTC
Thanks for the report - I can't reproduce this yet locally.

What locale are you using?

Comment 2 Jens Petersen 2021-05-18 04:40:41 UTC
Sorry I misread, I was thrown by the component: I see you mean when building the ncurses library.

Yeah unfortunately I already hit this with some of the gtk2hs libraries too :-(

Have you seen any patches floating around?

I think this is basically an issue with c2hs, which we don't have directly in Fedora.

Comment 3 Jens Petersen 2021-05-18 05:19:19 UTC
Nvm I found a patch: https://github.com/gtk2hs/gtk2hs/pull/304
which I am pushing to Fedora gtk2hs-buildtools: you could try applying
to c2hs too (https://github.com/haskell/c2hs/issues/268) -
though I am not sure how much c2hs and gtk2hsC2hs have diverged by now.

Comment 4 Jens Petersen 2021-05-18 05:20:04 UTC
As such it might not be a bad idea to add c2hs to Fedora...


Note You need to log in before you can comment on or make changes to this bug.