[Haskell-cafe] Re: Linking problem with GHCi

Maurí­cio CA mauricio.antunes at gmail.com
Mon Aug 24 18:27:52 EDT 2009


> With a specific package (bindings-common, with the latest version
> in hackage) if I ask GHCi to read it I get:
> 
> ghc-6.8.2: 
> /home/mauricio/lib/bindings-common-0.2.5/ghc-6.8.2/HSbindings-common-0.2.5.o: 
> unknown symbol `atexit'
> 
> If I build a library or executable cabal package depending on it,
> I have no problems. Also, if I remove that 'atexit' wrap from
> 'bindings-common' I don't get this ghci error message anymore.

This is actually not specific to that package. Attached is a
darcs patch to a package where the only exported module contains
just a wrapped 'atexit'.

Thanks,
Maurício
-------------- next part --------------
Mon Aug 24 19:24:20 BRT 2009  mauricio.antunes at gmail.com
  * All

New patches:

[All
mauricio.antunes at gmail.com**20090824222420
 Ignore-this: e09fe2a2596b6e041c7297efcaad55cb
] adddir ./BaseName
addfile ./BaseName/JustAtexit.hs
hunk ./BaseName/JustAtexit.hs 1
+module BaseName.JustAtexit where
+import Foreign
+import Foreign.C
+
+foreign import ccall atexit :: FunPtr (IO ()) -> IO CInt
+
+
addfile ./Setup.hs
hunk ./Setup.hs 1
+#!/usr/bin/env runhaskell
+
+module Main (main) where
+import Distribution.Simple
+
+main = defaultMain
addfile ./teste.cabal
hunk ./teste.cabal 1
+cabal-version: >= 1.2.3
+name: teste
+version: 0.0.1
+synopsis:
+  Test
+description: 
+  Test
+version: 1
+license: BSD3
+build-type: Simple
+library
+  hs-source-dirs: .
+  extensions:
+    ForeignFunctionInterface
+  build-depends: base >=3 && <5
+  exposed-modules:
+    BaseName.JustAtexit

Context:

Patch bundle hash:
b4c77eef776e4e5c0b7266156fe638c82a6ab1da


More information about the Haskell-Cafe mailing list