Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Build fail with stack on osx (high sierra) #75

Closed
tnrn9b opened this issue Mar 2, 2018 · 4 comments
Closed

Build fail with stack on osx (high sierra) #75

tnrn9b opened this issue Mar 2, 2018 · 4 comments

Comments

@tnrn9b
Copy link

tnrn9b commented Mar 2, 2018

Here's the log dump:

mwc-078196% cabal install
Resolving dependencies...
Configuring calc-0.1.0...
Building calc-0.1.0...
Installed calc-0.1.0
Updating documentation index
/Users/thomasreynolds/Library/Haskell/share/doc/x86_64-osx-ghc-8.0.2/index.html
mwc-078196% ls
README.md Setup.hs calc.cabal dist src stack.yaml
mwc-078196% stack install calc
Downloaded lts-5.18 build plan.
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-7.10.3.
Installed GHC.
[1 of 2] Compiling Main ( /Users/thomasreynolds/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /Users/thomasreynolds/.stack/setup-exe-src/setup-mPHDZzAJ.o )
[2 of 2] Compiling StackSetupShim ( /Users/thomasreynolds/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /Users/thomasreynolds/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
Linking /Users/thomasreynolds/.stack/setup-exe-cache/x86_64-osx/tmp-Cabal-simple_mPHDZzAJ_1.22.5.0_ghc-7.10.3 ...
random-1.1: configure
primitive-0.6.1.0: download
text-1.2.2.1: download
random-1.1: build
mtl-2.2.1: configure
mtl-2.2.1: build
utf8-string-1.0.1.1: configure
utf8-string-1.0.1.1: build
primitive-0.6.1.0: configure
primitive-0.6.1.0: build
text-1.2.2.1: configure
text-1.2.2.1: build
mtl-2.2.1: copy/register
random-1.1: copy/register
happy-1.19.5: download
happy-1.19.5: configure
primitive-0.6.1.0: copy/register
utf8-string-1.0.1.1: copy/register
tf-random-0.5: download
vector-0.11.0.0: download
happy-1.19.5: build
tf-random-0.5: configure
tf-random-0.5: build
vector-0.11.0.0: configure
vector-0.11.0.0: build
tf-random-0.5: copy/register
QuickCheck-2.8.1: download
QuickCheck-2.8.1: configure
QuickCheck-2.8.1: build
happy-1.19.5: copy/register
QuickCheck-2.8.1: copy/register
alex-3.1.7: download
alex-3.1.7: configure
alex-3.1.7: build
alex-3.1.7: copy/register
text-1.2.2.1: copy/register
hashable-1.2.4.0: download
hashable-1.2.4.0: configure
hashable-1.2.4.0: build
hashable-1.2.4.0: copy/register
vector-0.11.0.0: copy/register
hashtables-1.2.1.0: download
hashtables-1.2.1.0: configure
hashtables-1.2.1.0: build
hashtables-1.2.1.0: copy/register
gtk2hs-buildtools-0.13.0.5: download
gtk2hs-buildtools-0.13.0.5: configure
gtk2hs-buildtools-0.13.0.5: build
gtk2hs-buildtools-0.13.0.5: copy/register
cairo-0.13.1.1: download
glib-0.13.2.2: download
cairo-0.13.1.1: configure
cairo-0.13.1.1: build
glib-0.13.2.2: configure
glib-0.13.2.2: build
Progress: 15/19
-- While building custom Setup.hs for package glib-0.13.2.2 using:
/private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/glib-0.13.2.2/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/thomasreynolds/Desktop/stackbuilderstutorials/tutorials/haskell/gui-application/code/.stack-work/logs/glib-0.13.2.2.log

[1 of 3] Compiling SetupWrapper     ( SetupWrapper.hs, /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/glib-0.13.2.2/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/SetupWrapper.o )
[2 of 3] Compiling Main             ( /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/glib-0.13.2.2/Setup.hs, /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/glib-0.13.2.2/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/Main.o )
[3 of 3] Compiling StackSetupShim   ( /Users/thomasreynolds/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/glib-0.13.2.2/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/StackSetupShim.o )
Linking /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/glib-0.13.2.2/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/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.13.2.2...
Building glib-0.13.2.2...
Preprocessing library glib-0.13.2.2...
gtk2hsC2hs: Error in C header file.

/usr/include/signal.h:79: (column 19) [FATAL] 
  >>> Syntax error!
  The symbol `bsd_signal' does not fit here.

-- While building custom Setup.hs for package cairo-0.13.1.1 using:
/private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/cairo-0.13.1.1/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/thomasreynolds/Desktop/stackbuilderstutorials/tutorials/haskell/gui-application/code/.stack-work/logs/cairo-0.13.1.1.log

[1 of 3] Compiling SetupWrapper     ( SetupWrapper.hs, /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/cairo-0.13.1.1/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/SetupWrapper.o )
[2 of 3] Compiling Main             ( /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/cairo-0.13.1.1/Setup.hs, /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/cairo-0.13.1.1/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/Main.o )
[3 of 3] Compiling StackSetupShim   ( /Users/thomasreynolds/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/cairo-0.13.1.1/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/StackSetupShim.o )
Linking /private/var/folders/17/ndbgk1gs0ds1g6398hd29g9c0000gn/T/stack17265/cairo-0.13.1.1/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/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.13.1.1...
Building cairo-0.13.1.1...
Preprocessing library cairo-0.13.1.1...
gtk2hsC2hs: Error in C header file.

/usr/include/stdio.h:133: (column 19) [FATAL] 
  >>> Syntax error!
  The symbol `_close' does not fit here.

mwc-078196%

@javcasas
Copy link
Contributor

Hi @tnrn9b , sorry for the delay. We are investigating the issue, and we'll get back to you with an update.

@javcasas
Copy link
Contributor

Hi @tnrn9b , there seems to be some problems with gtk2hs on recent versions of OsX: gtk2hs/gtk2hs#183

I have tried rebuilding the app with a recent resolver, tweaking the cabal just a bit, and it builds, but when running it fails to show any windows on screen.

@juanpaucar This tutorial needs some maintenance.

@javcasas
Copy link
Contributor

@juanpaucar It actually works, but for some reason it threw the calculator window behind the other windows, and that confused me quite a bit.

@javcasas
Copy link
Contributor

Hi @tnrn9b , the PR should have fixed the build. Please pull and build the latest code, it should work as expected.

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

No branches or pull requests

2 participants