ghci can't continue in a situation (HXml Toolbox)

Simon David Foster s.d.f at btinternet.com
Thu Mar 11 18:46:05 EST 2004


I had to remove POpen from HXT to make it work correctly with GHC 6.2. I
think this because posix now includes popen and so it conflicts with the
version in HXT. Try removing POpen.hs and doing it again, make sure you
load package posix.

-Si.

On Thu, 2004-03-11 at 16:44, Ferenc Wagner wrote:
>                Hello,
> 
> Please have a look at the transcript below.  GHC happily
> compiles the file with the Makefile, while GHCi chokes on
> it.  I would be grateful for any insight into the problem.
> 
> Feri.
> 
> tba:~/haskell/xml/ $ cat xml2wiki.hs
> import System
> 
> import XmlInput
> import XmlTree
> import XmlState
> 
> getLength :: String -> XState () Int
> getLength file = do [xmlTree] <- getXmlContents $ newDocument file
>                     io $ putStr $ show xmlTree
>                     return 14
> 
> main :: IO ()
> main = do [xmlFile] <- getArgs
>           l <- run' $ getLength xmlFile
>           putStrLn (show l)
> 
> ----------------------------------------------------------------------
> 
> tba:~/haskell/xml/ $ cat Makefile
> HXT := $(HOME)/haskell/xml/HXmlToolbox-3.01
> INCLUDES := $(HXT)/hdom:$(HXT)/hparser:$(HXT)/http:$(HXT)/popen:$(HXT)/parsec:$(HOME)/haskell/HTTP
> PACKAGES := -package util -package net
> 
> xml2wiki: xml2wiki.hs
>         ghc -o $@ --make -i$(INCLUDES) $(PACKAGES) $<
> 
> ----------------------------------------------------------------------
> 
> tba:~/haskell/xml/ $ cat .ghci
> :set -package net -package util
> :set -i/home/wferi/haskell/xml/HXmlToolbox-3.01/hdom:/home/wferi/haskell/xml/HXmlToolbox-3.01/hparser:/home/wferi/haskell/xml/HXmlToolbox-3.01/http:/home/wferi/haskell/xml/HXmlToolbox-3.01/popen:/home/wferi/haskell/xml/HXmlToolbox-3.01/parsec:/home/wferi/haskell/HTTP
> 
> ----------------------------------------------------------------------
> 
> tba:~/haskell/xml/ $ ghci xml2wiki
>    ___         ___ _
>   / _ \ /\  /\/ __(_)
>  / /_\// /_/ / /  | |      GHC Interactive, version 6.2, for Haskell 98.
> / /_\\/ __  / /___| |      http://www.haskell.org/ghc/
> \____/\/ /_/\____/|_|      Type :? for help.
> 
> Loading package base ... linking ... done.
> Loading package lang ... linking ... done.
> Loading package concurrent ... linking ... done.
> Loading package QuickCheck ... linking ... done.
> Loading package readline ... linking ... done.
> Loading package unix ... linking ... done.
> Loading package posix ... linking ... done.
> Loading package util ... linking ... done.
> Loading package network ... linking ... done.
> Loading package net ... linking ... done.
> Skipping  Zord64_HARD      ( /home/wferi/haskell/HTTP/Zord64_HARD.lhs, /home/wferi/haskell/HTTP/Zord64_HARD.o )
> Skipping  ParsecPos        ( /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecPos.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecPos.o )
> Skipping  ParsecError      ( /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecError.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecError.o )
> Skipping  ParsecPrim       ( /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecPrim.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecPrim.o )
> Skipping  ParsecChar       ( /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecChar.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecChar.o )
> Skipping  ParsecCombinator ( /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecCombinator.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/ParsecCombinator.o )
> Skipping  Base64           ( /home/wferi/haskell/xml/HXmlToolbox-3.01/http/Base64.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/http/Base64.o )
> Skipping  MD5              ( /home/wferi/haskell/HTTP/MD5.lhs, /home/wferi/haskell/HTTP/MD5.o )
> Skipping  AssocList        ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/AssocList.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/AssocList.o )
> Skipping  NTree            ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/NTree.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/NTree.o )
> Skipping  Util             ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/Util.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/Util.o )
> Skipping  Unicode          ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/Unicode.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/Unicode.o )
> Skipping  Parsec           ( /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/Parsec.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/parsec/Parsec.o )
> Skipping  XmlCharParser    ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/XmlCharParser.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/XmlCharParser.o )
> Skipping  POpen            ( /home/wferi/haskell/xml/HXmlToolbox-3.01/popen/POpen.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/popen/POpen.o )
> Skipping  HTTP             ( /home/wferi/haskell/xml/HXmlToolbox-3.01/http/HTTP.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/http/HTTP.o )
> Skipping  Browser          ( /home/wferi/haskell/xml/HXmlToolbox-3.01/http/Browser.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/http/Browser.o )
> Skipping  XmlTreeTypes     ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlTreeTypes.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlTreeTypes.o )
> Skipping  XmlKeywords      ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlKeywords.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlKeywords.o )
> Skipping  XmlTreeFunctions ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlTreeFunctions.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlTreeFunctions.o )
> Skipping  XmlTreeFilter    ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlTreeFilter.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlTreeFilter.o )
> Skipping  MonadStateIO     ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/MonadStateIO.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/MonadStateIO.o )
> Skipping  XmlTree          ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlTree.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlTree.o )
> Skipping  XmlState         ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlState.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/XmlState.o )
> Skipping  FormatXmlTree    ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/FormatXmlTree.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hdom/FormatXmlTree.o )
> Skipping  XmlOutput        ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/XmlOutput.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/XmlOutput.o )
> Skipping  XmlParser        ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/XmlParser.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/XmlParser.o )
> Skipping  XmlInput         ( /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/XmlInput.hs, /home/wferi/haskell/xml/HXmlToolbox-3.01/hparser/XmlInput.o )
> Compiling Main             ( xml2wiki.hs, interpreted )
> Ok, modules loaded: Main, XmlInput, XmlParser, XmlOutput, FormatXmlTree, XmlState, XmlTree, MonadStateIO, XmlTreeFilter, XmlTreeFunctions, XmlKeywords, XmlTreeTypes, Browser, HTTP, POpen, XmlCharParser, Parsec, Unicode, Util, NTree, AssocList, MD5, Base64, ParsecCombinator, ParsecChar, ParsecPrim, ParsecError, ParsecPos, Zord64_HARD.
> *Main> run' $ getLength "texi2/lilypond.xml"
> Loading package haskell98 ... linking ... done.
> 
> 
> GHCi runtime linker: fatal error: I found a duplicate definition for symbol
>    __stginit_POpen
> whilst processing object file
>    /home/wferi/haskell/xml/HXmlToolbox-3.01/popen/POpen.o
> This could be caused by:
>    * Loading two different object files which export the same symbol
>    * Specifying the same object file twice on the GHCi command line
>    * An incorrect `package.conf' entry, causing some object to be
>      loaded twice.
> GHCi cannot safely continue in this situation.  Exiting now.  Sorry.
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



More information about the Glasgow-haskell-users mailing list