#9129 closed bug (invalid)

link error: unknown symbol `diagramszmlibzm1zi1zi0zi1_DiagramsziDirection_Direction_closure'

Reported by: dmbergey Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

When trying to build libraries linking against https://github.com/diagrams/diagrams-lib/tree/direction I get an error, in both GHC 7.6.3 and GHC 7.8.2. In 7.6.3:

Loading package diagrams-lib-1.1.0.1 ... linking ... ghc: /home/vagrant/.cabal/lib/diagrams-lib-1.1.0.1/ghc-7.6.3/HSdiagrams-lib-1.1.0.1.o: unknown symbol \diagramszmlibzm1zi1zi0zi1_DiagramsziDirection_Direction_closure'`

In 7.8.2:

`Loading package diagrams-lib-1.1.0.1 ... <command line>: can't load .so/.DLL for: /home/bergey/code/diagrams/.cabal-sandbox/lib/x86_64-linux-ghc-7.8.2/diagrams-lib-1.1.0.1/libHSdiagrams-lib-1.1.0.1-ghc7.8.2.so
(/home/bergey/code/diagrams/.cabal-sandbox/lib/x86_64-linux-ghc-7.8.2/diagrams-lib-1.1.0.1/libHSdiagrams-lib-1.1.0.1-ghc7.8.2.so: undefined symbol: diagramszmlibzm1zi1zi0zi1_DiagramsziDirection_Direction_con_info)`

The problem seems specific to this branch. I can install the package, but cannot link against it.

The following steps reproduce the error in a clean Linux (Ubuntu) VM with HP 2013.2 installed:

set -e
sudo aptitude install git -y
git clone https://github.com/diagrams/diagrams-core.git core
git clone https://github.com/diagrams/diagrams-lib.git lib
git clone https://github.com/diagrams/diagrams-svg.git svg
cabal update
cd lib/
git checkout direction
cd ..
cabal install core/ lib/ svg/

I'm happy to do more debugging if someone can advise me what to try.

Change History (1)

comment:1 Changed 14 months ago by rwbarton

  • Resolution set to invalid
  • Status changed from new to closed

You need to list Diagrams.Direction in diagrams-lib.cabal somewhere, or Cabal won't link it into the library. Admittedly the diagnostic messages are not good, but it's unclear to me who is at fault here (GHC or Cabal). Please reopen if you think it is that GHC should be producing a more informative error.

Note: See TracTickets for help on using tickets.