Ticket #3333 (new bug)
GHCi doesn't load weak symbols
| Reported by: | heatsink | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.6.2 |
| Component: | GHCi | Version: | 6.10.4 |
| Keywords: | weak, dynamic loading | Cc: | ghc@…, hgolden, tkn.akio@…, chetant@…, chris@…, batterseapower@…, hvr@…, mail@… |
| Operating System: | Linux | Architecture: | x86 |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | #3658 | |
| Blocking: | Related Tickets: |
Description (last modified by heatsink) (diff)
GHCi fails to load modules with weak symbols. The compiler, in contrast, has no trouble with them. The attached Cabal package demonstrates the problem. After building and installing:
:Prelude> :m +WeakTest Prelude WeakTest> weak_test 0 Loading package WeakTest-0 ... linking ... <interactive>: /home/heatsink/.cabal/lib/WeakTest-0/ghc-6.10.3/HSWeakTest-0.o: unknown symbol `weak_test'
I encountered this problem while trying to build a package that contains C++ code. Because GCC generates weak symbols when compiling C++, libraries that contain C++ code will not work in GHCi. (Granted, this is not the only problem with mixing C++ and Haskell.)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

