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

GHC ghc-devs at haskell.org
Mon Oct 31 23:56:44 UTC 2016


#9010: TemplateHaskell leads to an "unknown symbol" error
-------------------------------------+-------------------------------------
        Reporter:  Feuerbach         |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.6.3
      Resolution:  fixed             |             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 Darwin226):

 I'm facing the same issue on Windows with both GHC 7.10.3 and GHC 8.0.1.
 In my case it's the curl library. I've provided a way to reproduce this in
 this ticket https://github.com/commercialhaskell/stack/issues/2752

 The error I'm getting is the following

 {{{
 ghc.EXE: unable to load package `curl-1.3.8'
 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `stricmp'

 ghc.EXE: Could not on-demand load symbol 'curl_strequal'

 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `curl_strequal'

 ghc.EXE: Could not on-demand load symbol '.refptr.Curl_cstrdup'

 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `.refptr.Curl_cstrdup'

 ghc.EXE: Could not on-demand load symbol 'curl_slist_free_all'

 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `curl_slist_free_all'

 ghc.EXE: Could not on-demand load symbol 'Curl_ssl_connect_nonblocking'

 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `Curl_ssl_connect_nonblocking'

 ghc.EXE: Could not on-demand load symbol '.refptr.Curl_crealloc'

 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `.refptr.Curl_crealloc'

 ghc.EXE: Could not on-demand load symbol 'curl_msnprintf'

 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `curl_msnprintf'

 ghc.EXE: Could not on-demand load symbol '.refptr.Curl_cmalloc'

 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `.refptr.Curl_cmalloc'

 ghc.EXE: Could not on-demand load symbol 'Curl_verify_windows_version'

 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `Curl_verify_windows_version'

 ghc.EXE: Could not on-demand load symbol 'Curl_sspi_global_init'

 ghc.EXE:
 C:\Users\darwi\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\libcurl.a:
 unknown symbol `Curl_sspi_global_init'

 ghc.EXE: Could not on-demand load symbol 'curl_global_init'

 ghc.EXE: C:\sr\snapshots\df48cbae\lib\x86_64-windows-
 ghc-8.0.1\curl-1.3.8-B8AxMCtSRkiFrZLK4gerBe\HScurl-1.3.8-B8AxMCtSRkiFrZLK4gerBe.o:
 unknown symbol `curl_global_init'
 }}}

 This is the GHC 8 error. The 7.10.3 is different and shorter but in the
 same gist.
 I've seen the `ghc --info` mentioned above and I indeed get `("GHC
 Dynamic","NO")`. I installed both versions of GHC through stack.

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


More information about the ghc-tickets mailing list