[GHC] #9010: TemplateHaskell leads to an "unknown symbol" error

GHC ghc-devs at haskell.org
Fri Dec 18 16:54:07 UTC 2015


#9010: TemplateHaskell leads to an "unknown symbol" error
-------------------------------------+-------------------------------------
        Reporter:  Feuerbach         |                Owner:
            Type:  bug               |               Status:  infoneeded
        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:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Well I'm a bit stuck being unable to reproduce the behavior you seem to be
 getting.

 Here's what I think is going on:

 1. Somehow, I don't know how, you're getting GHC's runtime linker
 involved. I guess this must be due to some difference in configuration of
 opencv, but I don't understand how.

 2. From `man nm`:
   {{{
 "u" The symbol is a unique global symbol.  This is a GNU extension to the
 standard set of ELF symbol bindings.  For such a symbol the dynamic
     linker will make sure that in the entire process there is just one
 symbol with this name and type in use.
    }}}
    GHC's runtime dynamic linker presumably doesn't understand this symbol
 type since it is a non-standard extension. And that's probably what causes
 it to report the symbol as not found.

 Fixing 2 would require changes to GHC, so it probably makes sense to fix
 1. But I don't know why you are in this situation. Perhaps build output
 with `cabal -v` and `ghc -v` would help.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9010#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list