
#12806: curl dependency in conjunction with Template Haskell causes "unknown symbol" errors -------------------------------------+------------------------------------- Reporter: Darwin226 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: x86_64 | Type of failure: Compile-time (amd64) | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I've reported on this issue to the stack issue tracker here https://github.com/commercialhaskell/stack/issues/2752#issuecomment-25737851... The steps to reproduce are the following * Make a new stack project (lts-5.3 in my case). stack new curl-test -resolver=lts-5,3 * Add curl as a dependency to the library. * Modify the Lib file to the following {{{ {-# LANGUAGE TemplateHaskell #-} module Lib where return [] someFunc :: IO () someFunc = return () }}} The error that I get with GHC 8 is this {{{ 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' }}} but this still fails with GHC 7.10.3 with a similar error. This is happening on two Windows 10 machines so it's not an isolated case. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12806 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler