[GHC] #9010: TemplateHaskell leads to an "unknown symbol" error
GHC
ghc-devs at haskell.org
Fri Dec 18 14:06:39 UTC 2015
#9010: TemplateHaskell leads to an "unknown symbol" error
-------------------------------------+-------------------------------------
Reporter: Feuerbach | Owner:
Type: bug | Status: new
Priority: high | Milestone:
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by basvandijk):
* status: closed => new
* cc: vandijk.roel@… (added)
* version: 7.6.3 => 7.10.2
* resolution: fixed =>
* priority: normal => high
Comment:
At LumiGuide we're hitting this issue on GHC-7.10.2.
We're developing a binding to `opencv-3.0.0` which is a C++ library. The
Haskell package is called `thea` and `thea.cabal` specifies the following
`cc-options: -O2 -std=c++11`. We also need to build the package using the
following cabal flags:
`--with-gcc=g++ --with-ld=g++`. Maybe irrelevant but `thea` uses
[http://hackage.haskell.org/package/inline-c inline-c] for the FFI.
We have another Haskell package called `vision-playground` that depends on
`thea`. This all works great. However I need to use some !TemplateHaskell
in `TM.Types` (one of the modules of `vision-playground`) and get the
following error when doing a `cabal build`:
{{{
[1 of 3] Compiling TM.Types ( src/TM/Types.hs, dist/build/vision-
playground/vision-playground-tmp/TM/Types.o )
ghc: /nix/store/1wyif1adq0pb9h08jqr0v5lrykfhdhah-
opencv-3.0.0/lib/libopencv_hal.a: unknown symbol
`_ZGVZN2cv9v_invsqrtERKNS_11v_float32x4EE4_0_5'
ghc: unable to load package `thea-0.0.0'
}}}
I tried the hacks suggested by @rwbarton but they did not work for me.
I hope there's a work-around since this is a high priority issue for us at
LumiGuide.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9010#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list