
I'm trying to help a non-Haskell person build wyvern (shameless plug
in case you like go: http://dmwit.com/wyvern), but (s)he's having
trouble building the "encoding" library. Has any Windows person done
it successfully or is willing to try it?
I tried contacting the "encoding" maintainer a few days ago, but
haven't heard back.
Thanks!
~d
P.S. I thought it might just be a missing library, but the encoding
library itself comes with "system_encoding.h".
----- Forwarded message from wilemien@googlemail.com -----
Date: Thu, 25 Mar 2010 09:36:43 +0000
From: Willemien
Quoting Willemien
: Tried cabal install sgf error some packages failed to install encoding-0.6.3 failed during the configure step
Ah, yes! I knew about this problem, and totally forgot. The "encoding" package uses some tools, but can't depend on them properly (bad!). Try this (capitalization matters):
cabal install HaXml cabal install sgf
Does that work? I'll update the website shortly. ~d
Sorry no cabal install HaXml goes well (but takes longer than 2 minutes) Cabal install sgf not more specific: last lines are Configuring encoding-0.6.3... Setup.exe Missing dependency on foreign library: * Missing Header file: System_encoding.h This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is Allready installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. CABAL: Error: some packages failed to install: encoding-0.6.3 failed during the configure step. The exception was: exit: ExitFailure 1 sgf-0.1.1 depends on encoding 0.6.3 which faild to install. Hope you can solve it Willemien ----- End forwarded message -----

Hello Building this on widows might be a bit of a challenge... Generally I'd be advise building with "runhaskell Setup.hs ..." from MinGW, the first step of which would be something like:
runhaskell Setup.hs configure --extra-include-dirs=C:\\msys\\1.0\\home\\stephen\\encoding-0.6.3 --extra-lib-dirs=C:\\msys\\1.0\\home\\stephen\\encoding-0.6.3
Above should be all one line - no doubt it will get split somewhere.
Paths are separated with double slash, they don't need to be in double
quotes.
On my system, even though the path supplied via the --extra-*
directives was correct Cabal was telling me:
Configuring encoding-0.6.3...
Setup.hs: Missing dependency on a foreign library:
* Missing header file: system_encoding.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
This is actually due to a missing header file included *by*
system_encoding.h rather than Cabal not finding system_encoding.h. It
took to me a while to spot that one! [note to self - always check for
this in future].
The missing header is

Quoting Stephen Tetley
This is actually due to a missing header file included *by* system_encoding.h rather than Cabal not finding system_encoding.h. It took to me a while to spot that one! [note to self - always check for this in future].
The missing header is
- where it originates I don't know, as I don't have it with either Msys/MinGW or Cygwin and my Cygwin is pretty large these days.
Ah, nice catch.
Generally I'd be advise building with "runhaskell Setup.hs ..." from MinGW, the first step of which would be something like:
runhaskell Setup.hs configure --extra-include-dirs=C:\\msys\\1.0\\home\\stephen\\encoding-0.6.3 --extra-lib-dirs=C:\\msys\\1.0\\home\\stephen\\encoding-0.6.3
Whooo, boy, I sure don't fancy explaining Msys/MinGW or Cygwin to a non-technical person and giving sufficiently detailed installation/usage instructions. It looks like langinfo.h is all about detecting the user's locale. I'm using the encoding library for a task where the encoding is always specified exactly, so maybe the right thing to do here is figure out if I can get away with a gutted version of the library that doesn't need system_encoding.h, and if so, add a build flag that can disable it. In any case, thanks for the pointers! ~d

wagnerdm@seas.upenn.edu wrote:
Whooo, boy, I sure don't fancy explaining Msys/MinGW or Cygwin to a non-technical person and giving sufficiently detailed installation/usage instructions.
I still dislike the idea of needing to install MSYS, MinGW, Cygwin or similar tools to get anything remotely interesting from Hackage to build on Windows. Actually, I've been looking into the feasibility of building precompiled Windows binaries, Gtk2hs style, for all the "interesting" Haskell packages that are depended on my a lot of stuff. Currently I'm still struggling with convincing NSIS to do my diabolical bidding. (Jesus, I thought NSIS was supposed to make the job *easier*, not harder!) I haven't even got around to trying to make the awkward packages build so I can make installers.

The haskell platform should take care of a lot of installation pain, specially for the non-technical users. A new version is due to be release pretty soon (somewhere begin april). It has Mingw and Msys included, and also some pre-built binaries like cabal and haddock. It should be possible for a lot of packages to say 'cabal install <package>' at the command prompt to get your package up and running. I think that this is pretty cool, and most non-technical users should be able to get this to work without a lot of pain. Cheers, Han Joosten -- View this message in context: http://old.nabble.com/building-%22encoding%22-on-Windows--tp28072747p2808165... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

Han Joosten wrote:
The haskell platform should take care of a lot of installation pain, specially for the non-technical users.
I note with dismay that there's a proposal to remove OpenGL from HP. Assuming this gets approved, that'll be one less library that you can use on Windows. I thought the idea of HP was to add new stuff, not remove existing stuff...
A new version is due to be release pretty soon (somewhere begin april). It has Mingw and Msys included, and also some pre-built binaries like cabal and haddock.
Plain GHC has included Haddock for a while now. It seems to me that including the entirity of MinGW and MSYS is overkill, but what do I know about the matter? I was however under the impression that to use Unix emulators such as these, you have to run everything from a seperate shell rather than the usual Windows shell.
It should be possible for a lot of packages to say 'cabal install <package>' at the command prompt to get your package up and running. I think that this is pretty cool, and most non-technical users should be able to get this to work without a lot of pain.
Having gone through the pain of setting up OpenSUSE and convincing it to install GHC, it was quite impressive to use. On Linux, it seems you can actually type "cabal install zlib" and reasonably expect it to actually work. Typically, it'll crash and say "install zlib-devel". You install that, rerun the command, and somehow it knows that you've installed the headers and where you've put them, and It Just Works(tm). Which is quite impressive. What isn't impressive is that if you ask to install something, and one of its dependencies fails to build, the failure message will get burried in amoungst several pages of other stuff. At the end it will say something like "package Foo failed to build. The build failure was: exit code 1." Yeah, that's really helpful. Fortunately, if you just rebuild, it will only try to rebuild the missing dependences, so you can usually catch the real error message scroll past (invariably some C headers not installed). I also have a personal wish that more tools would make use of coloured text output to make it easier to see what's happening in the sea of text scrolling past. (We even have a fully portable Haskell library for doing this - and it even builds cleanly on Windows!) My hope is that the more useful C libraries will get added to HP so that I can start using them. (E.g., I'd love to be able to do sound synthesis using Haskell, but there aren't any libraries for accessing the sound hardware...)
participants (4)
-
Andrew Coppin
-
Han Joosten
-
Stephen Tetley
-
wagnerdm@seas.upenn.edu