Re: [wxhaskell-users] problems with cabal-installed wxHaskell and ghci (WinXP)

2010-02-06 Thread Eric Y. Kow
On Thu, Jan 28, 2010 at 03:15:28 +0100, Günther Schmidt wrote:
 this seems to be a known bug, it's documented in the ghc bug list, has 
 been for a while ...

Do you mean this ticket?
  http://hackage.haskell.org/trac/ghc/ticket/3798

It seems like the ticket is mainly about the panic:

$ ghc -package wx Hello.hs -o bin
Binary: Int64 truncated to fit in 32 bit Int
ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.4 for i386-unknown-linux):
Prelude.chr: bad argument

Whereas the second issue (which is what interests me) seems unrelated.

-- 
Eric Kow http://www.nltg.brighton.ac.uk/home/Eric.Kow
PGP Key ID: 08AC04F9


pgp7WgwRwYJ5Q.pgp
Description: PGP signature
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] problems with cabal-installed wxHaskell and ghci (WinXP)

2010-01-27 Thread Jeremy O'Donoghue
Hi Guenther,

[x-posting to wxhaskell-devel, in case any of the other committers has a
clue...]

On Wed, 27 Jan 2010 17:04 +0100, Günther Schmidt gue.schm...@web.de
wrote:

 I managed to cabal-install wxWidgets on WinXP last night.
 
 Now something strange happens when I test via ghci or runghc:
 
   could not find stdc++ dll
 
 Now I did copy the wxmsu ... dll into the path ie. C:\windows\system32
 and when I run the compiled program it works.

This is a problem which has had me stumped for several weeks now. I'll
explain as best I can.

The root cause of the problem is related to the MinGW gcc installation
which is part of GHC, and which does C/C++ compilation and *all* linking
for both GHC and GHCi. The basic problem is this: for some reason,
almost all libraries in MinGW are dynamically linked *except* libstdc++,
which is *always* statically linked(*).

When compiling for GHC, this is no problem. the linker notices that
there is only a static version of libstdc++ available and uses it.
However, GHCi assumes (I think) that any libraries given to it on the
command line need to be loaded dynamically.

The incantation for which libraries to load when a package is loaded
comes from the package definition (in this case from the cabal
installation of wxcore). The problem is that I'm not sure of the best
way forward on this, and I've tried quite a few things.

What I really need is a coherent explanation of exactly how linking,
compilation and package loading is implemented by GHC and GHCi - I
understand the underlying gcc and gnu ld implementations well enough.

I'll eventually get around to a more complete description of the problem
and post to one of the GHC lists - but haven't done so as yet.

Regards
Jeremy
-- 
  Jeremy O'Donoghue
  jeremy.odonog...@gmail.com


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] problems with cabal-installed wxHaskell and ghci (WinXP)

2010-01-27 Thread Günther Schmidt
Hi all,

this seems to be a known bug, it's documented in the ghc bug list, has 
been for a while ...


Günther



--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users