[GHC] #9909: Linker error (TemplateHaskell + HPC?)

#9909: Linker error (TemplateHaskell + HPC?) -------------------------------------+------------------------------------- Reporter: dcturner | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- I'm getting the following error message when compiling a Yesod application (which uses Template Haskell rather a lot) with -fhpc: {{{ /usr/bin/ld: ./Foundation.dyn_o: relocation R_X86_64_PC32 against undefined symbol `_hpc_tickboxes_Settings_hpc' can not be used when making a shared object; recompile with -fPIC }}} Steps to reproduce: 1. Run `yesod init` to make a new scaffold. Call it `testsite` and select `simple` for no database. 2. Run: {{{ cd testsite ghc --make app/main.hs -XTemplateHaskell -XCPP -XOverloadedStrings -XMultiParamTypeClasses -XTypeFamilies -XQuasiQuotes -fhpc -O1 }}} Running the `ghc` line again completes successfully. It seems that there is a missing `./Settings.dyn_o` in the `gcc` command line that `ghc` calls, the first time through. It's there the second time so the link succeeds. No idea what that might mean. It's not a problem at `-O0`. I'm using 7.8.3 so this might be fixed now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9909 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9909: Linker error (TemplateHaskell + HPC?) ---------------------------------------+---------------------------------- Reporter: dcturner | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ---------------------------------------+---------------------------------- Changes (by dcturner): * os: Unknown/Multiple => Linux * architecture: Unknown/Multiple => x86_64 (amd64) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9909#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9909: Linker error (TemplateHaskell + HPC?) ---------------------------------------+---------------------------------- Reporter: dcturner | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: duplicate | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: #9762 Differential Revisions: | ---------------------------------------+---------------------------------- Changes (by rwbarton): * status: new => closed * resolution: => duplicate * related: => #9762 Comment: Thanks for the report. This looks like the same issue as #9762. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9909#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC