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

GHC ghc-devs at haskell.org
Fri Apr 18 08:59:11 UTC 2014


#9010: TemplateHaskell leads to an "unknown symbol" error
------------------------------------+-------------------------------------
       Reporter:  Feuerbach         |             Owner:
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Compiler          |           Version:  7.6.3
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 Code:

 {{{
 {-# LANGUAGE TemplateHaskell #-}
 module M where

 import System.Console.Editline
 import Data.Lens.Template

 data S = S { _a :: EditLine }

 makeLens ''S
 }}}

 When compiled with `ghc link.hs`, everything is fine;

 {{{
 [1 of 1] Compiling M                ( link.hs, link.o )
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package array-0.4.0.1 ... linking ... done.
 Loading package deepseq-1.3.0.1 ... linking ... done.
 Loading package containers-0.5.0.0 ... linking ... done.
 Loading package bytestring-0.10.0.2 ... linking ... done.
 Loading package tagged-0.7.1 ... linking ... done.
 Loading package transformers-0.3.0.0 ... linking ... done.
 Loading package transformers-compat-0.1.1.1 ... linking ... done.
 Loading package contravariant-0.4.4 ... linking ... done.
 Loading package distributive-0.4.3.1 ... linking ... done.
 Loading package mtl-2.1.3.1 ... linking ... done.
 Loading package text-1.1.0.1 ... linking ... done.
 Loading package hashable-1.2.1.0 ... linking ... done.
 Loading package nats-0.1.2 ... linking ... done.
 Loading package unordered-containers-0.2.3.3 ... linking ... done.
 Loading package semigroups-0.12.2 ... linking ... done.
 Loading package comonad-4.0.1 ... linking ... done.
 Loading package semigroupoids-4.0.1 ... linking ... done.
 Loading package data-lens-2.10.4 ... linking ... done.
 Loading package pretty-1.1.1.0 ... linking ... done.
 Loading package template-haskell ... linking ... done.
 Loading package data-lens-template-2.1.8 ... linking ... done.
 }}}

 However, when compiling with `ghc -package-id
 editline-0.2.1.1-ef91ae78e7ea1b9142c2fb0b84e85c11 link.hs`, I get

 {{{
 [1 of 1] Compiling M                ( link.hs, link.o )
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package editline-0.2.1.1 ... linking ... ghc: /home/feuerbach/work
 /.cabal-sandbox/lib/i386-linux-
 ghc-7.6.3/editline-0.2.1.1/HSeditline-0.2.1.1.o: unknown symbol `el_reset'
 ghc: unable to load package `editline-0.2.1.1'
 }}}

 This is a problem because that's how cabal invokes ghc.

 This looks similar to #4899, except there's nothing "non-standard" here
 (no profiling or dynamic linking).

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


More information about the ghc-tickets mailing list