Skip to content

Instantly share code, notes, and snippets.

@dagit
Created July 12, 2013 18:12
Show Gist options
  • Save dagit/5986541 to your computer and use it in GitHub Desktop.
Save dagit/5986541 to your computer and use it in GitHub Desktop.
[NSAutorelaesPool new]
$ ghci -fno-ghci-sandbox -package GLFW-b -v
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Glasgow Haskell Compiler, Version 7.6.3, stage 2 booted by GHC version 7.4.2
Using binary package database: /Users/dagit/local-install/lib/ghc-7.6.3/package.conf.d/package.cache
Using binary package database: /Users/dagit/.ghc/x86_64-darwin-7.6.3/package.conf.d/package.cache
wired-in package ghc-prim mapped to ghc-prim-0.3.0.0-d5221a8c8a269b66ab9a07bdc23317dd
wired-in package integer-gmp mapped to integer-gmp-0.5.0.0-2f15426f5b53fe4c6490832f9b20d8d7
wired-in package base mapped to base-4.6.0.1-6c351d70a24d3e96f315cba68f3acf57
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.8.0.0-c2c1b21dbbb37ace4b7dc26c966ec664
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
*** gcc:
'/usr/bin/gcc' '-m64' '-fno-stack-protector' '-m64' '-L/Users/dagit/local-install/lib/ghc-7.6.3/base-4.6.0.1' '--print-file-name' 'libiconv.dylib'
Loading package base ... linking ... done.
Loading package bindings-DSL-1.0.16 ... linking ... done.
Loading package bindings-GLFW-0.0.0 ... linking ... done.
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package th-lift-0.5.5 ... linking ... done.
Loading package GLFW-b-1.0.0 ... linking ... done.
Prelude λ> import Graphics.UI.GLFW as GLFW
*** Parser:
Prelude GLFW λ> GLFW.init
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
_glfwPlatformInit: start
2013-07-12 11:12:07.006 ghc[84038:f0b] *** NSForwarding: warning: selector (0x1149439dd) for message 'new' does not match selector known to Objective C runtime (0x7fff8d58a06a)-- abort
2013-07-12 11:12:07.008 ghc[84038:f0b] +[NSAutoreleasePool new]: unrecognized selector sent to class 0x7fff763ddd38
2013-07-12 11:12:07.009 ghc[84038:f0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSAutoreleasePool new]: unrecognized selector sent to class 0x7fff763ddd38'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff8ab79b06 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8ae9c3f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8ac1026a +[NSObject(NSObject) doesNotRecognizeSelector:] + 186
3 CoreFoundation 0x00007fff8ab6802e ___forwarding___ + 414
4 CoreFoundation 0x00007fff8ab67e18 _CF_forwarding_prep_0 + 232
5 ??? 0x000000011493c051 0x0 + 4640194641
6 ??? 0x00000001149411f3 0x0 + 4640215539
7 ??? 0x0000000115222b23 0x0 + 4649528099
)
libc++abi.dylib: terminate called throwing an exception
@mietek
Copy link

mietek commented Jul 7, 2014

Have you ever managed to solve this problem?

@mietek
Copy link

mietek commented Jul 7, 2014

I've run into something similar with GHC 7.6.3.

@dagit
Copy link
Author

dagit commented Jul 7, 2014

For me the solution was to upgrade to GHC 7.8.x (really you just need for ghc to use the system linker) and then to use a recent GLFW-b. The underlying problem had to do with GHC's linker not doing the right thing in all cases, but I don't recall how we figured that out.

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