Skip to content

Instantly share code, notes, and snippets.

@eccstartup
Created December 3, 2013 05:16
Show Gist options
  • Save eccstartup/7764212 to your computer and use it in GitHub Desktop.
Save eccstartup/7764212 to your computer and use it in GitHub Desktop.
cabal install gtk

#1. cabal install glib-0.12.5.0 Resolving dependencies... [1 of 2] Compiling SetupWrapper ( /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/SetupWrapper.hs, /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/dist/setup/SetupWrapper.o )

/var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/SetupWrapper.hs:118:28: Warning: In the use of `configCompiler' (imported from Distribution.Simple.Configure): Deprecated: "'configCompiler' is deprecated. Use 'configCompilerEx' instead." [2 of 2] Compiling Main ( /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/Setup.hs, /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/dist/setup/Main.o ) Linking /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1494/glib-0.12.5.0/dist/setup/setup ...

Gtk2HsSetup.hs:155:50: warning: missing terminating ' character [-Winvalid-pp-token] -> RegisterFlags -- ^Install in the user's database?; verbose ^

Gtk2HsSetup.hs:220:41: warning: missing terminating ' character [-Winvalid-pp-token] -- have the header file name if we don't have the precompiled header yet ^

Gtk2HsSetup.hs:263:40: warning: missing terminating ' character [-Winvalid-pp-token] mFiles <- mapM (findFileWithExtension' ["chi"] [buildDir lbi] . toFilePath) ^

Gtk2HsSetup.hs:307:28: warning: missing terminating ' character [-Winvalid-pp-token] , let name' = filter isAlpha (display name) ^

Gtk2HsSetup.hs:308:31: warning: missing terminating ' character [-Winvalid-pp-token] , tag <- name' ^

Gtk2HsSetup.hs:309:33: warning: missing terminating ' character [-Winvalid-pp-token] : [ name' ++ "-" ++ show major ++ "." ++ show digit ^ 6 warnings generated. [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 glib-0.12.5.0... Building glib-0.12.5.0... Preprocessing library glib-0.12.5.0... gtk2hsC2hs: Error in C header file.

/usr/include/pthread.h:206: (column 45) [FATAL]

Syntax error! The symbol `=' does not fit here.

Failed to install glib-0.12.5.0 cabal: Error: some packages failed to install: glib-0.12.5.0 failed during the building phase. The exception was: ExitFailure 1

#2. OS OSX 10.9

#3. cabal --version cabal-install version 1.18.0.2 using version 1.18.1.2 of the Cabal library

#4. ghc --version The Glorious Glasgow Haskell Compilation System, version 7.6.3

#5. Did you install the GTK+ dev packages? Both gtk and gtk3, installed with homebrew.

#6. ls Library/Haskell/bin/ cabal ccap cpphs egison gtk2hsC2hs gtk2hsHookGenerator gtk2hsTypeGen haddock

@eccstartup
Copy link
Author

gcc -v

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

@eccstartup
Copy link
Author

cabal install gtk

Resolving dependencies...
[1 of 2] Compiling SetupWrapper ( /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/cairo-0.12.5.0-1624/cairo-0.12.5.0/SetupWrapper.hs, /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/cairo-0.12.5.0-1624/cairo-0.12.5.0/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main ( /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/cairo-0.12.5.0-1624/cairo-0.12.5.0/Setup.hs, /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/cairo-0.12.5.0-1624/cairo-0.12.5.0/dist/setup/Main.o )
Linking /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/cairo-0.12.5.0-1624/cairo-0.12.5.0/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 cairo-0.12.5.0...
Building cairo-0.12.5.0...
Preprocessing library cairo-0.12.5.0...
gtk2hsC2hs: Error in C header file.

/usr/include/stdio.h:437: (column 138) [FATAL]

Syntax error!
The symbol `=' does not fit here.

Failed to install cairo-0.12.5.0
[1 of 2] Compiling SetupWrapper ( /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1624/glib-0.12.5.0/SetupWrapper.hs, /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1624/glib-0.12.5.0/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main ( /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1624/glib-0.12.5.0/Setup.hs, /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1624/glib-0.12.5.0/dist/setup/Main.o )
Linking /var/folders/3r/5c02fv4j15l0khx6qllnx4dc0000gn/T/glib-0.12.5.0-1624/glib-0.12.5.0/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 glib-0.12.5.0...
Building glib-0.12.5.0...
Preprocessing library glib-0.12.5.0...
gtk2hsC2hs: Error in C header file.

/usr/include/pthread.h:206: (column 45) [FATAL]

Syntax error!
The symbol `=' does not fit here.

Failed to install glib-0.12.5.0

@bryanwoods
Copy link

Sorry to hijack this gist, but I'm having the same installation problem as you were. Did you end up figuring out a way to get it installed?

@alexeymuranov
Copy link

@bryanwoods, this seems to be an issue with new Apple gcc: gtk2hs/gtk2hs#1

The following worked for me: cabal install --with-gcc=gcc-4.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment