
Dear all, Giving a try to GHC 6.8.1 under Windows, I stumble upon the following issue (yes, I'm struggling with HDirect), which did not occur with the 6.6 version : the linking phase of my project fails with $ C:/ghc/ghc-6.8.1/bin/ghc -o ihc.exe -fglasgow-exts -static -fvia-C -Rghc-timing -Wall -recomp AbsHUtils.o AbstractH.o Attribute.o Bag.o [... lots of files, among which we have CoreUtils.o ...] CoreUtils.o(.text+0x15066):ghc2436_0.hc: undefined reference to `containerszm0zi1zi0zi0_DataziGraph_stronglyConnComp_closure' CoreUtils.o(.text+0x150b0):ghc2436_0.hc: undefined reference to `containerszm0zi1zi0zi0_DataziGraph_stronglyConnComp_closure' CoreUtils.o(.text+0x1ac23):ghc2436_0.hc: undefined reference to `__stginit_containerszm0zi1zi0zi0_DataziGraph_' IDLUtils.o(.text+0x6026):ghc768_0.hc: undefined reference to `containerszm0zi1zi0zi0_DataziGraph_stronglyConnComp_closure' IDLUtils.o(.text+0x6070):ghc768_0.hc: undefined reference to `containerszm0zi1zi0zi0_DataziGraph_stronglyConnComp_closure' IDLUtils.o(.text+0xc607):ghc768_0.hc: undefined reference to `__stginit_containerszm0zi1zi0zi0_DataziGraph_' collect2: ld returned 1 exit status Indeed, that symbol is undefined in the CoreUtils file : $ nm CoreUtils.o | grep strongl U _containerszm0zi1zi0zi0_DataziGraph_stronglyConnComp_closure As far as I understand, this is a reference to the Data.Graph function stronglyConnComp (which can be seen in the « containers-0.1.0.0/Data/Graph.hi » interface file ; according to the haddock documentation of GHC, that function is indeed in the Data.Graph module, which is imported by the CoreUtils.lhs file). What is strange to me is that $ nm libHSghc.a | grep strongl gives : 00000598 D _ghczm6zi8zi1_Digraph_stronglyConnComp_closure which could explain why that function is not found. May be I'm looking at the wrong file, I don't know much of the linking and name-mangling process at hand here (Digraph vs. DataziGraph ?). What I do not understand is what causes that issue, which seems to only concern the Data.Graph module so far. Hopes this makes sense to you, Sincerely yours, Samuel

Fernand a écrit :
Dear all,
Giving a try to GHC 6.8.1 under Windows, I stumble upon the following issue (yes, I'm struggling with HDirect), which did not occur with the 6.6 version : the linking phase of my project fails with Actually, the issue appears with the following program :
module Oops where import Data.Graph
ds_groups :: [SCC String] ds_groups = stronglyConnComp ([] :: [(String, Int, [Int])])
main = do putStrLn "Oops!" return ()
$ C:/ghc/ghc-6.8.1/bin/ghc.exe -main-is Oops Oops.hs -o oops.exe Oops.o(.text+0x46):fake: undefined reference to `containerszm0zi1zi0zi0_DataziGraph_stronglyConnComp_closure' Oops.o(.text+0x2db):fake: undefined reference to `__stginit_containerszm0zi1zi0zi0_DataziGraph_' Oops.o(.data+0x0):fake: undefined reference to `containerszm0zi1zi0zi0_DataziGraph_stronglyConnComp_closure' collect2: ld returned 1 exit status Compiling that same program with GHC-6.6 (same command line) works fine. Do I need to submit a bug or did something changed in the librairies' structure that I missed somewhere ? Sincerely yours, Samuel

Fernand wrote:
Fernand a écrit :
Dear all,
Giving a try to GHC 6.8.1 under Windows, I stumble upon the following issue (yes, I'm struggling with HDirect), which did not occur with the 6.6 version : the linking phase of my project fails with Actually, the issue appears with the following program :
module Oops where import Data.Graph
ds_groups :: [SCC String] ds_groups = stronglyConnComp ([] :: [(String, Int, [Int])])
main = do putStrLn "Oops!" return ()
$ C:/ghc/ghc-6.8.1/bin/ghc.exe -main-is Oops Oops.hs -o oops.exe Oops.o(.text+0x46):fake: undefined reference to `containerszm0zi1zi0zi0_DataziGraph_stronglyConnComp_closure' Oops.o(.text+0x2db):fake: undefined reference to `__stginit_containerszm0zi1zi0zi0_DataziGraph_' Oops.o(.data+0x0):fake: undefined reference to `containerszm0zi1zi0zi0_DataziGraph_stronglyConnComp_closure' collect2: ld returned 1 exit status
Compiling that same program with GHC-6.6 (same command line) works fine.
Do I need to submit a bug or did something changed in the librairies' structure that I missed somewhere ?
You haven't told GHC that you want to link the containers package. Try adding -package containers, or using --make which does this automatically. Cheers, Simon

Simon Marlow a écrit :
Compiling that same program with GHC-6.6 (same command line) works fine.
Do I need to submit a bug or did something changed in the librairies' structure that I missed somewhere ?
You haven't told GHC that you want to link the containers package. Try adding -package containers, or using --make which does this automatically.
Cheers, Simon
Hello, Thank you. Indeed, I found the answer too this morning. Sorry for the bandwidth. BTW, my patched HDirect compiles with GHC 6.8.1, though I still have some strange behavior with typelibs support (Excel automation works fine, but I cannot manage to have Word to work ; I desesperately get « unsupported interface » errors, whatever I try). Sincerely yours, sL
participants (2)
-
Fernand
-
Simon Marlow