Link errors when using the GHC API

Dear GHC hackers, I would like to experiment with the GHC API. However I get link errors when using it. For example: --------------------------------------------------------------------- $ ghci -package ghc ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help. Loading package base ... linking ... done. Loading package template-haskell ... linking ... done. Loading package readline-1.0 ... linking ... done. Loading package unix-1.0 ... linking ... done. Loading package Cabal-1.1.6 ... linking ... done. Loading package regex-base-0.71 ... linking ... done. Loading package regex-posix-0.71 ... linking ... done. Loading package regex-compat-0.71 ... linking ... done. Loading package haskell98 ... linking ... done. ghc-6.6: /usr/lib/ghc-6.6/HSghc.o: unknown symbol `Cabalzm1zi1zi6_DistributionziPackage_a_closure' Loading package ghc-6.6 ... linking ... ghc-6.6: unable to load package `ghc-6.6' --------------------------------------------------------------------- I also get this when compiling for example the following module testGHC.hs: --------------------------------------------------------------------- module Main where import qualified GHC import DynFlags (defaultDynFlags) main = GHC.defaultErrorHandler defaultDynFlags $ putStrLn "Hello World" --------------------------------------------------------------------- --------------------------------------------------------------------- $ ghc -package ghc --make testGHC [1 of 1] Compiling Main ( testGHC.hs, testGHC.o ) Linking testGHC ... /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `r6iZ_info': : undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6r9_info': : undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sJ_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sN_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_zddEq_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6ID_0_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_polyzugo_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6IG_0_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_polyzugo1_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x0): undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1cc): undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1dc): undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_closure' /usr/lib/ghc-6.6/libHSghc.a(PackageConfig.o): In function `s23t_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s77S_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s79E_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7i7_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7vI_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7yi_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_zeze_info' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7GC_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8TZ_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8Vv_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Finder.o): In function `s7l2_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' collect2: ld returned 1 exit status --------------------------------------------------------------------- I would like to know what is causing this and how I can fix it? Also, should I file a bugreport? Greetings, Bas van Dijk

Interesting. I was unable to reproduce your problem. What platform are you running on? Are you using a binary distribution or one you built from source? Seems like something didn't build right... You might use 'nm' to examine your libHSCabal.a to see if a similarly named symbol is present. For example, is there a leading underscore? May the version ("m1zi1zi6") isn't present? On Oct 11, 2006, at 12:00 PM, Bas van Dijk wrote:
Dear GHC hackers,
I would like to experiment with the GHC API. However I get link errors when using it. For example:
--------------------------------------------------------------------- $ ghci -package ghc ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done. Loading package template-haskell ... linking ... done. Loading package readline-1.0 ... linking ... done. Loading package unix-1.0 ... linking ... done. Loading package Cabal-1.1.6 ... linking ... done. Loading package regex-base-0.71 ... linking ... done. Loading package regex-posix-0.71 ... linking ... done. Loading package regex-compat-0.71 ... linking ... done. Loading package haskell98 ... linking ... done. ghc-6.6: /usr/lib/ghc-6.6/HSghc.o: unknown symbol `Cabalzm1zi1zi6_DistributionziPackage_a_closure' Loading package ghc-6.6 ... linking ... ghc-6.6: unable to load package `ghc-6.6' ---------------------------------------------------------------------
I also get this when compiling for example the following module testGHC.hs:
--------------------------------------------------------------------- module Main where
import qualified GHC import DynFlags (defaultDynFlags)
main = GHC.defaultErrorHandler defaultDynFlags $ putStrLn "Hello World" ---------------------------------------------------------------------
--------------------------------------------------------------------- $ ghc -package ghc --make testGHC [1 of 1] Compiling Main ( testGHC.hs, testGHC.o ) Linking testGHC ... /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `r6iZ_info': : undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6r9_info': : undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sJ_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sN_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_zddEq_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6ID_0_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_polyzugo_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6IG_0_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_polyzugo1_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x0): undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1cc): undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1dc): undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_closure' /usr/lib/ghc-6.6/libHSghc.a(PackageConfig.o): In function `s23t_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s77S_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s79E_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7i7_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7vI_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7yi_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_zeze_info' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7GC_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8TZ_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8Vv_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Finder.o): In function `s7l2_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' collect2: ld returned 1 exit status ---------------------------------------------------------------------
I would like to know what is causing this and how I can fix it? Also, should I file a bugreport?
Greetings,
Bas van Dijk _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

(I noticed my reply to Mathew Mills didn't reach the GHC list, so here it is.) On Wednesday 11 October 2006 21:53, Mathew Mills wrote:
Interesting. I was unable to reproduce your problem. What platform are you running on? Are you using a binary distribution or one you built from source?
I'm running Gentoo Linux (x86). I emerged the latest GHC (6.6). So GHC is built from source. $ uname -a Linux bassbox 2.6.17-gentoo-r7 #7 PREEMPT Tue Oct 3 01:15:50 CEST 2006 i686 AMD Athlon(tm) 64 Processor 3200+ GNU/Linux $ gcc --version gcc (GCC) 4.1.1 (Gentoo 4.1.1) $ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.6 $ ghc-pkg list /usr/lib/ghc-6.6/package.conf: Cabal-1.1.6, GLUT-2.0, HaXml-1.13.2, OpenGL-2.1, QuickCheck-1.0, base-2.0, (ghc-6.6), haskell-src-1.0, haskell-src-exts-0.2, haskell98-1.0, html-1.0, mtl-1.0, network-2.0, parsec-2.0, readline-1.0, regex-base-0.71, regex-compat-0.71, regex-posix-0.71, rts-1.0, stm-2.0, template-haskell-2.0, unix-1.0 BTW, why is the (ghc-6.6) package listed between parentheses? I also emerged GHC on another PC with the same architecture running the same Gentoo version and there I had the same error: $ ghci -package ghc ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help. Loading package base ... linking ... done. Loading package template-haskell ... linking ... done. Loading package readline-1.0 ... linking ... done. Loading package unix-1.0 ... linking ... done. Loading package Cabal-1.1.6 ... linking ... done. Loading package regex-base-0.71 ... linking ... done. Loading package regex-posix-0.71 ... linking ... done. Loading package regex-compat-0.71 ... linking ... done. Loading package haskell98 ... linking ... done. ghc-6.6: /usr/lib/ghc-6.6/HSghc.o: unknown symbol `Cabalzm1zi1zi6_DistributionziPackage_a_closure' Loading package ghc-6.6 ... linking ... ghc-6.6: unable to load package `ghc-6.6'
Seems like something didn't build right... You might use 'nm' to examine your libHSCabal.a to see if a similarly named symbol is present. For example, is there a leading underscore? May the version ("m1zi1zi6") isn't present?
When I 'nm /usr/lib/ghc-6.6/libHSCabal.a' and search for, for example, "Cabalzm1zi1zi6_DistributionziPackage_a_closure" I see that it is indeed an (U)ndefined symbol. I don't know what that means though. Reemerging GHC or Cabal also doesn't help. Any help is highly appreciated. Greetings, Bas van Dijk.

On Mon, 2006-10-16 at 12:29 +0200, Bas van Dijk wrote:
(I noticed my reply to Mathew Mills didn't reach the GHC list, so here it is.)
On Wednesday 11 October 2006 21:53, Mathew Mills wrote:
Interesting. I was unable to reproduce your problem. What platform are you running on? Are you using a binary distribution or one you built from source?
I'm running Gentoo Linux (x86). I emerged the latest GHC (6.6). So GHC is built from source.
BTW, why is the (ghc-6.6) package listed between parentheses?
Because it's not exposed by default. This is because it doesn't make use of the module namespace and so if it were exposed by default it'd get in the way too often.
I also emerged GHC on another PC with the same architecture running the same Gentoo version and there I had the same error:
This is a problem with the way we have packaged it for Gentoo. We know the source of the problem and will fix it soon. Thanks for testing it for us before it got into the main portage tree. :-) Duncan

On Monday 16 October 2006 12:41, Duncan Coutts wrote:
This is a problem with the way we have packaged it for Gentoo. We know the source of the problem and will fix it soon.
Great, thanks. On Monday 16 October 2006 12:46, Clemens Fruhwirth wrote:
The problem is Gentoo specific. Quick dirty fix: cp /usr/lib/ghc-6.6/HSCabal.o /usr/lib/Cabal-1.1.6/ghc-6.6/HSCabal-1.1.6.o
This seems to get rid of the problem in ghci: $ ghci -package ghc ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help. Loading package base ... linking ... done. Loading package template-haskell ... linking ... done. Loading package readline-1.0 ... linking ... done. Loading package unix-1.0 ... linking ... done. Loading package Cabal-1.1.6 ... linking ... done. Loading package regex-base-0.71 ... linking ... done. Loading package regex-posix-0.71 ... linking ... done. Loading package regex-compat-0.71 ... linking ... done. Loading package haskell98 ... linking ... done. Loading package ghc-6.6 ... linking ... done. Prelude> But the problem remains when making for example testGHC.gs: ------------------------------------------------------------------------------- module Main where import qualified GHC import DynFlags (defaultDynFlags) main = GHC.defaultErrorHandler defaultDynFlags $ putStrLn "Hello World" ------------------------------------------------------------------------------- $ ghc -package ghc --make testGHC.hs [1 of 1] Compiling Main ( testGHC.hs, testGHC.o ) Linking testGHC ... /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `r6iZ_info': : undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6r9_info': : undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sJ_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sN_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_zddEq_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6ID_0_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_polyzugo_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6IG_0_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_polyzugo1_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x0): undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1cc): undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1dc): undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_closure' /usr/lib/ghc-6.6/libHSghc.a(PackageConfig.o): In function `s23t_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s77S_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s79E_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7i7_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7vI_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7yi_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_zeze_info' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7GC_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8TZ_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8Vv_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Finder.o): In function `s7l2_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' collect2: ld returned 1 exit status

On Mon, 2006-10-16 at 17:42 +0200, Bas van Dijk wrote:
On Monday 16 October 2006 12:41, Duncan Coutts wrote:
This is a problem with the way we have packaged it for Gentoo. We know the source of the problem and will fix it soon.
Great, thanks.
On Monday 16 October 2006 12:46, Clemens Fruhwirth wrote:
The problem is Gentoo specific. Quick dirty fix: cp /usr/lib/ghc-6.6/HSCabal.o /usr/lib/Cabal-1.1.6/ghc-6.6/HSCabal-1.1.6.o
This seems to get rid of the problem in ghci:
But the problem remains when making for example testGHC.gs:
Yeah. That'd have a different quick fix: cp /usr/lib/ghc-6.6/libHSCabal.a /usr/lib/Cabal-1.1.6/ghc-6.6/ because ghci uses the .o files and ghc uses the .a ones. Duncan

At Mon, 16 Oct 2006 12:29:22 +0200,
Bas van Dijk
(I noticed my reply to Mathew Mills didn't reach the GHC list, so here it is.)
On Wednesday 11 October 2006 21:53, Mathew Mills wrote:
Interesting. I was unable to reproduce your problem. What platform are you running on? Are you using a binary distribution or one you built from source?
I'm running Gentoo Linux (x86). I emerged the latest GHC (6.6). So GHC is built from source.
The problem is Gentoo specific. Quick dirty fix: cp /usr/lib/ghc-6.6/HSCabal.o /usr/lib/Cabal-1.1.6/ghc-6.6/HSCabal-1.1.6.o The problem stems from incompatible build options. -split-objs for the ghc built library in /usr/lib/ghc-6.6 and no split objs for the one in /usr/lib/Cabal-1.1.6. The problem is ghc expects its own library, namely one that was built with split-objs. They are working on a solution, as they want to ship a stand-alone version of Cabal. I have no clue how this is going to work. -- Fruhwirth Clemens - http://clemens.endorphin.org for robots: sp4mtrap@endorphin.org

The binary distribution http://www.haskell.org/ghc/dist/6.6/ghc-6.6-i386-unknown-linux.tar.bz2 does not contain libHSghc.* So I get: Loading package ghc-6.6 ... ghc-6.6: can't load .so/.DLL for: HSghc (libHSghc.so: cannot open shared object file: No such file or directory) C. Bas van Dijk schrieb:
Dear GHC hackers,
I would like to experiment with the GHC API. However I get link errors when using it. For example:
--------------------------------------------------------------------- $ ghci -package ghc ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done. Loading package template-haskell ... linking ... done. Loading package readline-1.0 ... linking ... done. Loading package unix-1.0 ... linking ... done. Loading package Cabal-1.1.6 ... linking ... done. Loading package regex-base-0.71 ... linking ... done. Loading package regex-posix-0.71 ... linking ... done. Loading package regex-compat-0.71 ... linking ... done. Loading package haskell98 ... linking ... done. ghc-6.6: /usr/lib/ghc-6.6/HSghc.o: unknown symbol `Cabalzm1zi1zi6_DistributionziPackage_a_closure' Loading package ghc-6.6 ... linking ... ghc-6.6: unable to load package `ghc-6.6' ---------------------------------------------------------------------
I also get this when compiling for example the following module testGHC.hs:
--------------------------------------------------------------------- module Main where
import qualified GHC import DynFlags (defaultDynFlags)
main = GHC.defaultErrorHandler defaultDynFlags $ putStrLn "Hello World" ---------------------------------------------------------------------
--------------------------------------------------------------------- $ ghc -package ghc --make testGHC [1 of 1] Compiling Main ( testGHC.hs, testGHC.o ) Linking testGHC ... /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `r6iZ_info': : undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6r9_info': : undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sJ_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sN_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_zddEq_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6ID_0_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_polyzugo_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6IG_0_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_polyzugo1_info' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x0): undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1cc): undefined reference to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_closure' /usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1dc): undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_closure' /usr/lib/ghc-6.6/libHSghc.a(PackageConfig.o): In function `s23t_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s77S_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s79E_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7i7_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7vI_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7yi_info': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_zeze_info' /usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7GC_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8TZ_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8Vv_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' /usr/lib/ghc-6.6/libHSghc.a(Finder.o): In function `s7l2_1_alt': : undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure' collect2: ld returned 1 exit status ---------------------------------------------------------------------
I would like to know what is causing this and how I can fix it? Also, should I file a bugreport?
Greetings,
Bas van Dijk

Christian Maeder schrieb:
The binary distribution
http://www.haskell.org/ghc/dist/6.6/ghc-6.6-i386-unknown-linux.tar.bz2
does not contain libHSghc.*
So I get:
Loading package ghc-6.6 ... ghc-6.6: can't load .so/.DLL for: HSghc (libHSghc.so: cannot open shared object file: No such file or directory)
but ghc-pkg lists this package: /home/linux-bkb/ghc/ghc-6.6/lib/ghc-6.6/package.conf: Cabal-1.1.5.9.4, GLUT-2.0, HGL-3.1, HUnit-1.1, OpenGL-2.1, QuickCheck-1.0, X11-1.1, base-2.0, cgi-2006.9.6, fgl-5.2, (ghc-6.6), haskell-src-1.0, haskell98-1.0, html-1.0, mtl-1.0, network-2.0, parsec-2.0, readline-1.0, regex-base-0.71, regex-compat-0.71, regex-posix-0.71, rts-1.0, stm-2.0, template-haskell-2.0, time-1.0, unix-1.0, xhtml-2006.9.13

Christian Maeder wrote:
The binary distribution
http://www.haskell.org/ghc/dist/6.6/ghc-6.6-i386-unknown-linux.tar.bz2
does not contain libHSghc.*
So I get:
Loading package ghc-6.6 ... ghc-6.6: can't load .so/.DLL for: HSghc (libHSghc.so: cannot open shared object file: No such file or directory)
This is a problem with the binary distributions built via the nightly builds, because they install stage 3 rather than installing stage 2. I'm working on a fix. Cheers, Simon

Simon Marlow wrote:
Christian Maeder wrote:
The binary distribution
http://www.haskell.org/ghc/dist/6.6/ghc-6.6-i386-unknown-linux.tar.bz2
does not contain libHSghc.*
So I get:
Loading package ghc-6.6 ... ghc-6.6: can't load .so/.DLL for: HSghc (libHSghc.so: cannot open shared object file: No such file or directory)
This is a problem with the binary distributions built via the nightly builds, because they install stage 3 rather than installing stage 2. I'm working on a fix.
I updated the x86_64 dist yesterday, and I'm in the process of uploading a new i386 dist. Cheers, Simon
participants (6)
-
Bas van Dijk
-
Christian Maeder
-
Clemens Fruhwirth
-
Duncan Coutts
-
Mathew Mills
-
Simon Marlow