
Hi, I'm trying to use Hoogle as a library in my Summer of Code project. But when I try to compile using Cabal, I get the following error: Linking dist/build/scion-browser/scion-browser ... /home/serras/.cabal/lib/hoogle-4.2.4/ghc-7.0.2/libHShoogle-4.2.4.a(Serialise.o): In function `s1ePR_info': (.text+0x2015): undefined reference to `hooglezm4zi2zi4_Pathszuhoogle_version1_closure' /home/serras/.cabal/lib/hoogle-4.2.4/ghc-7.0.2/libHShoogle-4.2.4.a(Serialise.o): In function `s1f8a_info': (.text+0x338f): undefined reference to `__stginit_hooglezm4zi2zi4_Pathszuhoogle_' I've been looking for some information and it seems to be related with the fact that Hoogle first builds a library and then build an executable using the library, but all files get recompiled in that second pass. Is there any way to workaround this problem?

On Sat, Jun 04, 2011 at 01:17:03AM +0200, Alejandro Serrano Mena wrote:
Hi, I'm trying to use Hoogle as a library in my Summer of Code project. But when I try to compile using Cabal, I get the following error:
Linking dist/build/scion-browser/scion-browser ... /home/serras/.cabal/lib/hoogle-4.2.4/ghc-7.0.2/libHShoogle-4.2.4.a(Serialise.o): In function `s1ePR_info': (.text+0x2015): undefined reference to `hooglezm4zi2zi4_Pathszuhoogle_version1_closure' /home/serras/.cabal/lib/hoogle-4.2.4/ghc-7.0.2/libHShoogle-4.2.4.a(Serialise.o): In function `s1f8a_info': (.text+0x338f): undefined reference to `__stginit_hooglezm4zi2zi4_Pathszuhoogle_'
I've been looking for some information and it seems to be related with the fact that Hoogle first builds a library and then build an executable using the library, but all files get recompiled in that second pass.
Is there any way to workaround this problem?
Does 'ghc-pkg check' report any problems?

No, it does not report any problem.
2011/6/4 Clint Moore
On Sat, Jun 04, 2011 at 01:17:03AM +0200, Alejandro Serrano Mena wrote:
Hi, I'm trying to use Hoogle as a library in my Summer of Code project. But when I try to compile using Cabal, I get the following error:
Linking dist/build/scion-browser/scion-browser ...
/home/serras/.cabal/lib/hoogle-4.2.4/ghc-7.0.2/libHShoogle-4.2.4.a(Serialise.o):
In function `s1ePR_info': (.text+0x2015): undefined reference to `hooglezm4zi2zi4_Pathszuhoogle_version1_closure'
In function `s1f8a_info': (.text+0x338f): undefined reference to `__stginit_hooglezm4zi2zi4_Pathszuhoogle_'
I've been looking for some information and it seems to be related with
/home/serras/.cabal/lib/hoogle-4.2.4/ghc-7.0.2/libHShoogle-4.2.4.a(Serialise.o): the
fact that Hoogle first builds a library and then build an executable using the library, but all files get recompiled in that second pass.
Is there any way to workaround this problem?
Does 'ghc-pkg check' report any problems?

On Fri, Jun 3, 2011 at 4:17 PM, Alejandro Serrano Mena
I've been looking for some information and it seems to be related with the fact that Hoogle first builds a library and then build an executable using the library, but all files get recompiled in that second pass. Is there any way to workaround this problem?
Upgrading Cabal / cabal-install is a good place to start, if you're not already using the 0.10's. I also suggest using cabal-dev, since issues like this can be caused by combinations of dependencies that conflict. There's a good chance that you just have a weird mix of compiled libraries that don't all work together, and cabal isn't able/willing to rebuild everything necessary to make all the things in your user package db work together. I very recently installed Hoogle locally, on a fresh system, so I'm fairly confident it's still possible without too many headaches :). --Rogan

I'm using the last Haskell Platform available in Arch Linux, with GHC 7.0.2
and Cabal 1.10.1.0 (the last one).
The problem is not installing Hoogle, because it builds and works correctly,
but linking with the library Hoogle provides.
2011/6/4 Rogan Creswick
On Fri, Jun 3, 2011 at 4:17 PM, Alejandro Serrano Mena
wrote: I've been looking for some information and it seems to be related with
the
fact that Hoogle first builds a library and then build an executable using the library, but all files get recompiled in that second pass. Is there any way to workaround this problem?
Upgrading Cabal / cabal-install is a good place to start, if you're not already using the 0.10's. I also suggest using cabal-dev, since issues like this can be caused by combinations of dependencies that conflict.
There's a good chance that you just have a weird mix of compiled libraries that don't all work together, and cabal isn't able/willing to rebuild everything necessary to make all the things in your user package db work together.
I very recently installed Hoogle locally, on a fresh system, so I'm fairly confident it's still possible without too many headaches :).
--Rogan
participants (3)
-
Alejandro Serrano Mena
-
Clint Moore
-
Rogan Creswick