Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build gtk3-0.13.6 with ghc-7.10.1 #104

Closed
AphonicChaos opened this issue May 13, 2015 · 2 comments
Closed

Can't build gtk3-0.13.6 with ghc-7.10.1 #104

AphonicChaos opened this issue May 13, 2015 · 2 comments

Comments

@AphonicChaos
Copy link

I'm unable to get gtk3 to build. I successfully installed build tools an other dependencies. Something seems to parse incorrectly in comments. Once I remove the comments (obviously not a solution), build seems to progress further, though it continues to fail on errors similar to the one I documented below.

cabal install ./gtk                                     
Resolving dependencies...
Configuring gtk3-0.13.6...
Building gtk3-0.13.6...
Failed to install gtk3-0.13.6
Build log ( /home/edwin/.cabal/logs/gtk3-0.13.6.log ):
[1 of 2] Compiling SetupWrapper     ( gtk/SetupWrapper.hs, gtk/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( gtk/dist/setup/setup.hs, gtk/dist/setup/Main.o )
Linking ./gtk/dist/setup/setup ...
[1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )
[2 of 2] Compiling Main             ( SetupMain.hs, dist/setup-wrapper/Main.o )
Linking dist/setup-wrapper/setup ...
Configuring gtk3-0.13.6...
Building gtk3-0.13.6...
Preprocessing library gtk3-0.13.6...

Graphics/UI/Gtk/Display/Statusbar.chs:40:10:
    parse error on input ‘bars’
cabal: Error: some packages failed to install:
gtk3-0.13.6 failed during the building phase. The exception was:

My system:

$ cabal --version
cabal-install version 1.22.2.0
using version 1.22.2.0 of the Cabal library 

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.1

$ uname -a
Linux arch-mage 4.0.1-1-ARCH #1 SMP PREEMPT Wed Apr 29 12:00:26 CEST 2015 x86_64 GNU/Linux

I've tried with the git version (latest commit: 9e9a8f1) and whats currently on hackage (0.13.6)

@markwright
Copy link

It builds fine on Gentoo with gcc 4.9.2, and fails with gcc 5.1.0 due to the change noted in the "Preprocessor issues" section of
https://gcc.gnu.org/gcc-5/porting_to.html
Which I workaround with:

sed -e 's@gccProg, "--cppopts=-E"@gccProg, "--cppopts=-E", "--cppopts=-P"@' -i Gtk2HsSetup.hs

markwright added a commit to gentoo-haskell/gentoo-haskell that referenced this issue May 14, 2015
@AphonicChaos
Copy link
Author

Just confirmed @markwright's work-around solves my problem. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants