Ticket #2745 (closed merge: fixed)
ghc -shared broken
| Reported by: | simonmar | Owned by: | igloo |
|---|---|---|---|
| Priority: | high | Milestone: | 6.10.2 |
| Component: | Compiler | Version: | 6.10.1 |
| Keywords: | Cc: | lennart@…, clemens@… | |
| Operating System: | Windows | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Lennart reports that ghc -shared is broken:
$ cat Foo.hs
{-# LANGUAGE ForeignFunctionInterface #-}
module Foo where
f :: Int -> Int
f x = x+1
foreign export ccall f :: Int -> Int
$ ghc -shared Foo.hs
Foo.o:fake:(.text+0x21): undefined reference to `stg_INTLIKE_closure'
Foo.o:fake:(.text+0x28): undefined reference to `stg_ap_pp_info'
Foo_stub.o:Foo_stub.c:(.text+0x9): undefined reference to `rts_lock'
Foo_stub.o:Foo_stub.c:(.text+0x1a): undefined reference to `rts_mkInt'
Foo_stub.o:Foo_stub.c:(.text+0x2e): undefined reference to `rts_apply'
Foo_stub.o:Foo_stub.c:(.text+0x42): undefined reference to `rts_apply'
Foo_stub.o:Foo_stub.c:(.text+0x55): undefined reference to `rts_evalIO'
Foo_stub.o:Foo_stub.c:(.text+0x67): undefined reference to
`rts_checkSchedStatus'
Foo_stub.o:Foo_stub.c:(.text+0x72): undefined reference to `rts_getInt'
Foo_stub.o:Foo_stub.c:(.text+0x7c): undefined reference to `rts_unlock'
Foo_stub.o:Foo_stub.c:(.text+0x97): undefined reference to `getStablePtr'
.....
Change History
Note: See
TracTickets for help on using
tickets.
