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

GHC ghc-devs at haskell.org
Fri Dec 18 18:40:29 UTC 2015


#9010: TemplateHaskell leads to an "unknown symbol" error
-------------------------------------+-------------------------------------
        Reporter:  Feuerbach         |                Owner:
            Type:  bug               |               Status:  infoneeded
        Priority:  high              |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             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 basvandijk):

 Since I'm on NixOS I think it's very likely that OpenCV is build
 differently than on your Debian system.

 Here's the full verbose `cabal install` output:

 {{{
 $ cabal install -v --ghc-option=-v ./play/
 /nix/store/klnq8izadq9c5jpg5swfak8kp2zwiijz-gcc-wrapper-4.9.3/bin/gcc
 -dumpversion
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/haddock
 --version
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/hpc version
 looking for tool hsc2hs near compiler in
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin
 found hsc2hs in
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/hsc2hs
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/hsc2hs
 --version
 /run/current-system/sw/bin/HsColour -version
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/ghc -c
 /run/user/1001/1804289383846930886.c -o
 /run/user/1001/16816927771714636915.o -v
 Glasgow Haskell Compiler, Version 7.10.2, stage 2 booted by GHC version
 7.8.4
 Using binary package database:
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/lib/ghc-7.10.2/package.conf.d/package.cache
 wired-in package ghc-prim mapped to ghc-
 prim-0.4.0.0-af16264bc80979d06e37ac63e3ba9a21
 wired-in package integer-gmp mapped to integer-
 gmp-1.0.0.0-8e0f14d0262184533b417ca1f8b44482
 wired-in package base mapped to
 base-4.8.1.0-4f7206fd964c629946bb89db72c80011
 wired-in package rts mapped to builtin_rts
 wired-in package template-haskell mapped to template-
 haskell-2.10.0.0-90e8393d65f4ae44cb2026177a257f28
 wired-in package ghc mapped to ghc-7.10.2-787f1a784665fb3ac2a1be1d9d85245b
 wired-in package dph-seq not found.
 wired-in package dph-par not found.
 Hsc static flags:
 Created temporary directory: /run/user/1001/ghc2412_0
 *** C Compiler:
 /nix/store/klnq8izadq9c5jpg5swfak8kp2zwiijz-gcc-wrapper-4.9.3/bin/cc -fno-
 stack-protector -DTABLES_NEXT_TO_CODE -x c
 /run/user/1001/1804289383846930886.c -o /run/user/1001/ghc2412_0/ghc_1.s
 -Wimplicit -S '-D__GLASGOW_HASKELL__=710' -include /nix/store
 /55dmsb48yf5l2wjhlsalm7lwbp74ycda-
 ghc-7.10.2/lib/ghc-7.10.2/include/ghcversion.h -I/nix/store
 /55dmsb48yf5l2wjhlsalm7lwbp74ycda-
 ghc-7.10.2/lib/ghc-7.10.2/base_GDytRqRVSUX7zckgKqJjgw/include -I/nix/store
 /xgajz3ndnj863mx3zgmk5fx6c8rssz6v-gmp-5.1.3/include -I/nix/store
 /55dmsb48yf5l2wjhlsalm7lwbp74ycda-
 ghc-7.10.2/lib/ghc-7.10.2/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include
 -I/nix/store/55dmsb48yf5l2wjhlsalm7lwbp74ycda-
 ghc-7.10.2/lib/ghc-7.10.2/include
 *** Assembler:
 /nix/store/klnq8izadq9c5jpg5swfak8kp2zwiijz-gcc-wrapper-4.9.3/bin/cc -fno-
 stack-protector -DTABLES_NEXT_TO_CODE -x assembler -c
 /run/user/1001/ghc2412_0/ghc_1.s -o /run/user/1001/16816927771714636915.o
 *** Deleting temp files:
 Deleting: /run/user/1001/ghc2412_0/ghc_1.s
 *** Deleting temp dirs:
 Deleting: /run/user/1001/ghc2412_0
 /nix/store/klnq8izadq9c5jpg5swfak8kp2zwiijz-gcc-wrapper-4.9.3/bin/ld -x -r
 /run/user/1001/16816927771714636915.o -o
 /run/user/1001/1957747793424238335.o
 /nix/store/v0hr8wc2bfzax11a756lc8j54v98141g-gnutar-1.28/bin/tar --help
 Reading available packages...
 Choosing modular solver.
 Resolving dependencies...
 Ready to install play-0.0.0
 Waiting for install task to finish...
 Configuring play-0.0.0...
 Dependency base ==4.8.1.0: using base-4.8.1.0
 Dependency hs-opencv-binding ==0.0.0: using hs-opencv-binding-0.0.0
 Glasgow Haskell Compiler, Version 7.10.2, stage 2 booted by GHC version
 7.8.4
 Using binary package database:
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/lib/ghc-7.10.2/package.conf.d/package.cache
 wired-in package ghc-prim mapped to ghc-
 prim-0.4.0.0-af16264bc80979d06e37ac63e3ba9a21
 wired-in package integer-gmp mapped to integer-
 gmp-1.0.0.0-8e0f14d0262184533b417ca1f8b44482
 wired-in package base mapped to
 base-4.8.1.0-4f7206fd964c629946bb89db72c80011
 wired-in package rts mapped to builtin_rts
 wired-in package template-haskell mapped to template-
 haskell-2.10.0.0-90e8393d65f4ae44cb2026177a257f28
 wired-in package ghc mapped to ghc-7.10.2-787f1a784665fb3ac2a1be1d9d85245b
 wired-in package dph-seq not found.
 wired-in package dph-par not found.
 Hsc static flags:
 Created temporary directory: /run/user/1001/ghc2487_0
 *** C Compiler:
 /nix/store/klnq8izadq9c5jpg5swfak8kp2zwiijz-gcc-wrapper-4.9.3/bin/cc -fno-
 stack-protector -DTABLES_NEXT_TO_CODE -x c
 /run/user/1001/7198853861649760492.c -o /run/user/1001/ghc2487_0/ghc_1.s
 -Wimplicit -S '-D__GLASGOW_HASKELL__=710' -include /nix/store
 /55dmsb48yf5l2wjhlsalm7lwbp74ycda-
 ghc-7.10.2/lib/ghc-7.10.2/include/ghcversion.h -I/nix/store
 /55dmsb48yf5l2wjhlsalm7lwbp74ycda-
 ghc-7.10.2/lib/ghc-7.10.2/base_GDytRqRVSUX7zckgKqJjgw/include -I/nix/store
 /xgajz3ndnj863mx3zgmk5fx6c8rssz6v-gmp-5.1.3/include -I/nix/store
 /55dmsb48yf5l2wjhlsalm7lwbp74ycda-
 ghc-7.10.2/lib/ghc-7.10.2/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include
 -I/nix/store/55dmsb48yf5l2wjhlsalm7lwbp74ycda-
 ghc-7.10.2/lib/ghc-7.10.2/include
 *** Assembler:
 /nix/store/klnq8izadq9c5jpg5swfak8kp2zwiijz-gcc-wrapper-4.9.3/bin/cc -fno-
 stack-protector -DTABLES_NEXT_TO_CODE -x assembler -c
 /run/user/1001/ghc2487_0/ghc_1.s -o /run/user/1001/5965166491189641421.o
 *** Deleting temp files:
 Deleting: /run/user/1001/ghc2487_0/ghc_1.s
 *** Deleting temp dirs:
 Deleting: /run/user/1001/ghc2487_0
 Using Cabal-1.22.4.0 compiled by ghc-7.10
 Using compiler: ghc-7.10.2
 Using install prefix: /home/bas.van.dijk/.cabal
 Binaries installed in: /home/bas.van.dijk/.cabal/bin
 Libraries installed in:
 /home/bas.van.dijk/.cabal/lib/x86_64-linux-
 ghc-7.10.2/play-0.0.0-4YsBlLA8LO69MV7S17lkjf
 Private binaries installed in: /home/bas.van.dijk/.cabal/libexec
 Data files installed in:
 /home/bas.van.dijk/.cabal/share/x86_64-linux-ghc-7.10.2/play-0.0.0
 Documentation installed in:
 /home/bas.van.dijk/.cabal/share/doc/x86_64-linux-ghc-7.10.2/play-0.0.0
 Configuration files installed in: /home/bas.van.dijk/.cabal/etc
 No alex found
 Using ar found on system at:
 /nix/store/v7h3j43vx0dz5ahhkxg5z50by2iqc6k1-binutils-2.23.1/bin/ar
 No c2hs found
 No cpphs found
 Using gcc version 4.9.3 found on system at:
 /nix/store/klnq8izadq9c5jpg5swfak8kp2zwiijz-gcc-wrapper-4.9.3/bin/gcc
 Using ghc version 7.10.2 found on system at:
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/ghc
 Using ghc-pkg version 7.10.2 found on system at:
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/ghc-pkg
 No ghcjs found
 No ghcjs-pkg found
 No greencard found
 Using haddock version 2.16.1 found on system at:
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/haddock
 No happy found
 Using haskell-suite found on system at: haskell-suite-dummy-location
 Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-
 location
 No hmake found
 Using hpc version 0.67 found on system at:
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/hpc
 Using hsc2hs version 0.67 found on system at:
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/hsc2hs
 Using hscolour version 1.22 found on system at:
 /run/current-system/sw/bin/HsColour
 No jhc found
 Using ld found on system at:
 /nix/store/klnq8izadq9c5jpg5swfak8kp2zwiijz-gcc-wrapper-4.9.3/bin/ld
 No lhc found
 No lhc-pkg found
 No pkg-config found
 Using strip version 2.23 found on system at:
 /nix/store/v7h3j43vx0dz5ahhkxg5z50by2iqc6k1-binutils-2.23.1/bin/strip
 Using tar found on system at:
 /nix/store/v0hr8wc2bfzax11a756lc8j54v98141g-gnutar-1.28/bin/tar
 No uhc found
 Component build order: executable 'play'
 creating dist/build
 creating dist/build/autogen
 Building play-0.0.0...
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/ghc-pkg init
 dist/package.conf.inplace
 Preprocessing executable 'play' for play-0.0.0...
 Building executable play...
 creating dist/build/play
 creating dist/build/play/play-tmp
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/bin/ghc --make -no-
 link -fbuilding-cabal-package -O -static -outputdir dist/build/play/play-
 tmp -odir dist/build/play/play-tmp -hidir dist/build/play/play-tmp
 -stubdir dist/build/play/play-tmp -i -idist/build/play/play-tmp -i.
 -idist/build/autogen -Idist/build/autogen -Idist/build/play/play-tmp
 -optP-include -optPdist/build/autogen/cabal_macros.h -hide-all-packages
 -package-db dist/package.conf.inplace -package-id
 base-4.8.1.0-4f7206fd964c629946bb89db72c80011 -package-id hs-opencv-
 binding-0.0.0-8f2416af7a2ee3c9cd620cc714b1aad9 -XHaskell2010 ./play.hs -v
 Glasgow Haskell Compiler, Version 7.10.2, stage 2 booted by GHC version
 7.8.4
 Using binary package database:
 /nix/store/ij6kvzi44hmwnvkxsxfimvlixaxwfhf4-ghc-7.10.2/lib/ghc-7.10.2/package.conf.d/package.cache
 Using binary package database: dist/package.conf.inplace/package.cache
 wired-in package ghc-prim mapped to ghc-
 prim-0.4.0.0-af16264bc80979d06e37ac63e3ba9a21
 wired-in package integer-gmp mapped to integer-
 gmp-1.0.0.0-8e0f14d0262184533b417ca1f8b44482
 wired-in package base mapped to
 base-4.8.1.0-4f7206fd964c629946bb89db72c80011
 wired-in package rts mapped to builtin_rts
 wired-in package template-haskell mapped to template-
 haskell-2.10.0.0-90e8393d65f4ae44cb2026177a257f28
 wired-in package ghc mapped to ghc-7.10.2-787f1a784665fb3ac2a1be1d9d85245b
 wired-in package dph-seq not found.
 wired-in package dph-par not found.
 Hsc static flags:
 wired-in package ghc-prim mapped to ghc-
 prim-0.4.0.0-af16264bc80979d06e37ac63e3ba9a21
 wired-in package integer-gmp mapped to integer-
 gmp-1.0.0.0-8e0f14d0262184533b417ca1f8b44482
 wired-in package base mapped to
 base-4.8.1.0-4f7206fd964c629946bb89db72c80011
 wired-in package rts mapped to builtin_rts
 wired-in package template-haskell mapped to template-
 haskell-2.10.0.0-90e8393d65f4ae44cb2026177a257f28
 wired-in package ghc mapped to ghc-7.10.2-787f1a784665fb3ac2a1be1d9d85245b
 wired-in package dph-seq not found.
 wired-in package dph-par not found.
 *** Chasing dependencies:
 Chasing modules from: *play.hs
 Stable obj: []
 Stable BCO: []
 Ready for upsweep
   [NONREC
       ModSummary {
          ms_hs_date = 2015-12-18 16:32:22.959647846 UTC
          ms_mod = Main,
          ms_textual_imps = [import (implicit) Prelude, import OpenCV]
          ms_srcimps = []
       }]
 *** Deleting temp files:
 Deleting:
 compile: input file play.hs
 Created temporary directory: /run/user/1001/ghc2538_0
 *** Checking old interface for Main:
 [1 of 1] Compiling Main             ( play.hs, dist/build/play/play-
 tmp/Main.o )
 *** Parser:
 *** Renamer/typechecker:
 *** Simplify:
 *** CorePrep:
 *** ByteCodeGen:
 Loading package ghc-prim-0.4.0.0 ... linking ... done.
 Loading package integer-gmp-1.0.0.0 ... linking ... done.
 Loading package base-4.8.1.0 ... linking ... done.
 Loading package hs-opencv-binding-0.0.0 ... linking ... ghc: /nix/store
 /yd25dral2yg4sdn31iq3cbzf1k2lsqlh-opencv-3.0.0/lib/libopencv_hal.a:
 unknown symbol `_ZGVZN2cv9v_invsqrtERKNS_11v_float32x4EE4_0_5'
 *** Deleting temp files:
 Deleting: /run/user/1001/ghc2538_0/ghc_1.s
 Warning: deleting non-existent /run/user/1001/ghc2538_0/ghc_1.s
 *** Deleting temp dirs:
 Deleting: /run/user/1001/ghc2538_0
 ghc: unable to load package `hs-opencv-binding-0.0.0'
 Failed to install play-0.0.0
 cabal: Error: some packages failed to install:
 play-0.0.0 failed during the building phase. The exception was:
 ExitFailure 1
 }}}

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


More information about the ghc-tickets mailing list