Created attachment 514220 [details] full build log Building alsa-mixer-0.2.0.3... Preprocessing library alsa-mixer-0.2.0.3... c2hs: C header contains errors: /usr/include/bits/floatn.h:73: (column 29) [ERROR] >>> Syntax error ! The symbol `;' does not fit here. [31;01m*[0m ERROR: dev-haskell/alsa-mixer-0.2.0.3::gentoo failed (compile phase): [31;01m*[0m setup build failed [31;01m*[0m [31;01m*[0m Call stack: [31;01m*[0m ebuild.sh, line 124: Called src_compile [31;01m*[0m environment, line 2703: Called haskell-cabal_src_compile [31;01m*[0m environment, line 1904: Called cabal_src_compile [31;01m*[0m environment, line 697: Called cabal-build [31;01m*[0m environment, line 461: Called die [31;01m*[0m The specific snippet of code: [31;01m*[0m ./setup "$@" || die "setup build failed" [31;01m*[0m
Created attachment 514222 [details] /usr/include/bits/floatn.h Attaching the header itself
Created attachment 514224 [details] emerge --info output
Filled issue mainstream https://github.com/haskell/c2hs/issues/198
Also those are seem related: https://github.com/visq/language-c/issues/43 and https://github.com/haskell/c2hs/issues/191
Which c2hs version you are using? 0.28.3 fixed similar failure.
(In reply to Sergei Trofimovich from comment #5) > Which c2hs version you are using? 0.28.3 fixed similar failure. latest one - 0.28.3
(In reply to Anton Kochkov from comment #6) > (In reply to Sergei Trofimovich from comment #5) > > Which c2hs version you are using? 0.28.3 fixed similar failure. > > latest one - 0.28.3 Is it built against language-c-0.7.1? Should be easy to check as: $ LANG=C readelf -d /usr/bin/c2hs | fgrep language-c 0x0000000000000001 (NEEDED) Shared library: [libHSlanguage-c-0.7.1-Dyrd8W62Y758UdKGWH1pWG-ghc8.0.2.so]
(In reply to Sergei Trofimovich from comment #7) > (In reply to Anton Kochkov from comment #6) > > (In reply to Sergei Trofimovich from comment #5) > > > Which c2hs version you are using? 0.28.3 fixed similar failure. > > > > latest one - 0.28.3 > > Is it built against language-c-0.7.1? Should be easy to check as: > > $ LANG=C readelf -d /usr/bin/c2hs | fgrep language-c > 0x0000000000000001 (NEEDED) Shared library: > [libHSlanguage-c-0.7.1-Dyrd8W62Y758UdKGWH1pWG-ghc8.0.2.so] yes, it is language-c-0.7.1
*** Bug 645546 has been marked as a duplicate of this bug. ***
Aha, we need to extract sully preprocessed file from c2hs then. I believe 'HCFLAGS=-v emerge ...' will show you full command running c2hs. Adding --keep to c2hs output should yield fully preprocessed file. Please attach it here and I'll try to reproduce the failure locally against it.
Changing gcc version from 6.4.0 to 7.3.0 fixed bug.
No longer relevant and was fixed.