how to install yesod on windows 7 with just the haskell platform

211 views
Skip to first unread message

kees Bleijenberg

unread,
Jul 31, 2014, 4:28:14 PM7/31/14
to yeso...@googlegroups.com
On stack overflow I posted a question about installing yesod on windows 7 64 bits.

Summarized: removed ghc and all packages, Installed the haskell platform. I now have ghc version 7.6.3, cabal 1.20.0.3 and (installed with msys) network  2.5.0.0.

The last suggestion of Michael Snoyman was:
cabal install yesod-platform yesod-bin --constraint parsec==3.1.3 --constraint network==2.4.1.2. Cabal complains about  system-fileio-0.3.13.

My newest aproach is:
cabal install yesod-platform yesod-bin --constraint parsec==3.1.3 --constraint network==2.4.1.2 --constraint system-fileio==0.3.13
The result:
Resolving dependencies...
Configuring system-fileio-0.3.13...
Building system-fileio-0.3.13...
Preprocessing library system-fileio-0.3.13...
[1 of 1] Compiling Filesystem       ( lib\Filesystem.hs, dist\dist-sandbox-f9c4de15\build\Filesystem.o )

lib\Filesystem.hs:79:1: Warning:
    The import of `Control.Monad' is redundant
      except perhaps to import instances from `Control.Monad'
    To import instances alone, use: import Control.Monad()

lib\Filesystem.hs:84:1: Warning:
    The import of `Foreign.Ptr' is redundant
      except perhaps to import instances from `Foreign.Ptr'
    To import instances alone, use: import Foreign.Ptr()

lib\Filesystem.hs:85:1: Warning:
    The import of `CString, withCAString'
    from module `Foreign.C' is redundant

lib\Filesystem.hs:95:1: Warning:
    The import of `System.IO.Error' is redundant
      except perhaps to import instances from `System.IO.Error'
    To import instances alone, use: import System.IO.Error()
lib\hssystemfileio-win32.c: In function 'hssystemfileio_copy_permissions':

lib\hssystemfileio-win32.c:10:17:
     error: storage size of 'st' isn't known

lib\hssystemfileio-win32.c:11:2:
     warning: implicit declaration of function '_wstat64'
Failed to install system-fileio-0.3.13
cabal: Error: some packages failed to install:
..... more errors

Searching on this error gives fileio on stackoverflow, Do I really have to do the proposed hack or ....?

This whole exercise is a bit embarrasing. I've installed the cleanest version of Haskell: the haskell platform and I can't get Yesod installed. But I have learned a lot about cabal.

Greetings,
Kees





Michael Snoyman

unread,
Jul 31, 2014, 8:36:15 PM7/31/14
to yeso...@googlegroups.com
Why are you constraining to an older version of system-filleio? From the github issue you link, it seems that bug you're encountering was fixed by the next release.
--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kees Bleijenberg

unread,
Aug 1, 2014, 2:32:07 AM8/1/14
to yeso...@googlegroups.com
Below is the output of
cabal install yesod-platform yesod-bin --constraint parsec==3.1.3 --constraint network==2.4.1.2 (so without the constraint on system-fileio)
cabal complains: .... system-fileio-0.3.13 which failed to install.
ghc-pkg list --user shows that system-fileio is at version 0.3.14. 
Maybe I don't understand this version logic enough.
fsnotify-0.1.0.2 depends on system-fileio-0.3.13 which failed to install.
hamlet-1.2.0 depends on system-fileio-0.3.13 which failed to install.
project-template-0.1.4.1 depends on system-fileio-0.3.13 which failed to
install.
shakespeare-2.0.0.3 depends on system-fileio-0.3.13 which failed to install.
shakespeare-css-1.1.0 depends on system-fileio-0.3.13 which failed to install.
shakespeare-i18n-1.1.0 depends on system-fileio-0.3.13 which failed to
install.
shakespeare-js-1.3.0 depends on system-fileio-0.3.13 which failed to install.
shakespeare-text-1.1.0 depends on system-fileio-0.3.13 which failed to
install.
system-fileio-0.3.13 failed during the building phase. The exception was:
ExitFailure 1
wai-app-static-2.0.1 depends on system-fileio-0.3.13 which failed to install.
yesod-1.2.5.2 depends on system-fileio-0.3.13 which failed to install.
yesod-auth-1.3.0.5 depends on system-fileio-0.3.13 which failed to install.
yesod-auth-hashdb-1.3.0.1 depends on system-fileio-0.3.13 which failed to
install.
yesod-bin-1.2.12 depends on system-fileio-0.3.13 which failed to install.
yesod-core-1.2.15.1 depends on system-fileio-0.3.13 which failed to install.
yesod-form-1.3.9 depends on system-fileio-0.3.13 which failed to install.
yesod-persistent-1.2.2.3 depends on system-fileio-0.3.13 which failed to
install.
yesod-platform-1.2.11 depends on system-fileio-0.3.13 which failed to install.
yesod-static-1.2.3 depends on system-fileio-0.3.13 which failed to install.
yesod-test-1.2.1.5 depends on system-fileio-0.3.13 which failed to install.

Michael Snoyman

unread,
Aug 1, 2014, 2:37:22 AM8/1/14
to yeso...@googlegroups.com
Alright. Try replacing yesod-platform with yesod-platform-1.2.12.2 in your command line.


kees Bleijenberg

unread,
Aug 1, 2014, 3:33:21 AM8/1/14
to yeso...@googlegroups.com, mic...@snoyman.com
I did cabal install yesod-platform-1.2.12.2 yesod-bin --constraint parsec==3.1.3 --constraint network==2.4.1.2. The result is below.
I don't fully understand the answer. Where can I read more about what this answer means and what to do about it?

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: aeson-0.7.0.6/installed-02d... (user goal)
next goal: yesod-platform (user goal)
rejecting: yesod-platform-1.2.12.2 (conflict: aeson =>
attoparsec==0.11.3.4/installed-dec..., yesod-platform => attoparsec==0.12.0.0)
rejecting: yesod-platform-1.2.12.1, 1.2.12, 1.2.11, 1.2.10, 1.2.9.3, 1.2.9.1,
1.2.9, 1.2.8.2, 1.2.8.1, 1.2.8, 1.2.7.2, 1.2.7.1, 1.2.7, 1.2.6.1, 1.2.6,
1.2.5.3, 1.2.5.2, 1.2.5.1, 1.2.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, 1.2.4.1, 1.2.4,
1.2.3, 1.2.2, 1.2.1, 1.2.0.1, 1.2.0, 1.1.9.2, 1.1.9.1, 1.1.9, 1.1.8, 1.1.7.2,
1.1.7.1, 1.1.7, 1.1.6.1, 1.1.6, 1.1.5, 1.1.4.1, 1.1.4, 1.1.3, 1.1.2, 1.1.1,
1.1.0, 1.0.6.1, 1.0.6, 1.0.5, 1.0.4.2, 1.0.4.1, 1.0.4, 1.0.3.4, 1.0.3.3,
1.0.3.2, 1.0.2, 1.0.1, 1.0.0, 0.10.3, 0.10.2 (global constraint requires
==1.2.12.2)
Backjump limit reached (change with --max-backjumps).

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

Michael Snoyman

unread,
Aug 1, 2014, 4:22:48 AM8/1/14
to yeso...@googlegroups.com
The error below means that cabal gave up early because it thought it had tried enough backjumps. That why you need to include the --max-backjumps=-1 argument.

kees Bleijenberg

unread,
Aug 1, 2014, 4:52:40 AM8/1/14
to yeso...@googlegroups.com, mic...@snoyman.com
I'am sorry. I forgot that part of the cabal command.
I tried cabal install yesod-platform-1.2.12.2 yesod-bin --constraint parsec==3.1.3 --constraint network==2.4.1.2 --max-backjumps=-1 --reorder-goals. The answer is below.
Does this mean that Attoparsec needs another version of Text then Parsec? It is not clear to me what to do. 

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: yesod-platform-1.2.12.2 (user goal)
next goal: yesod-test (dependency of yesod-platform-1.2.12.2)
rejecting: yesod-test-1.2.3.1 (conflict: yesod-platform => yesod-test==1.2.3)
trying: yesod-test-1.2.3
trying: yesod-static-1.2.4 (dependency of yesod-platform-1.2.12.2)
next goal: yesod-core (dependency of yesod-platform-1.2.12.2)
rejecting: yesod-core-1.2.19, 1.2.18, 1.2.17, 1.2.16.1 (conflict:
yesod-platform => yesod-core==1.2.16)
trying: yesod-core-1.2.16
next goal: attoparsec (user goal)
rejecting: attoparsec-0.11.3.4/installed-dec..., 0.10.4.0/installed-b7d...,
0.12.1.0 (conflict: yesod-platform => attoparsec==0.12.0.0)
trying: attoparsec-0.12.0.0
next goal: parsec (dependency of yesod-core-1.2.16)
rejecting: parsec-3.1.3/installed-a4d... (conflict: parsec =>
text==0.11.3.1/installed-a8e..., attoparsec => text>=1.1.1.3)
rejecting: parsec-3.1.5, 3.1.4 (global constraint requires ==3.1.3)
trying: parsec-3.1.3
next goal: text (dependency of yesod-test-1.2.3)
rejecting: text-0.11.3.1/installed-a8e... (conflict: attoparsec =>
text>=1.1.1.3)
rejecting: text-1.1.1.3 (conflict: parsec => text>=0.2 && <0.12)
rejecting: text-1.1.1.2, 1.1.1.1, 1.1.1.0, 1.1.0.1, 1.1.0.0, 1.0.0.1, 1.0.0.0,
0.11.3.1, 0.11.3.0, 0.11.2.3, 0.11.2.2, 0.11.2.1, 0.11.2.0, 0.11.1.13,
0.11.1.12, 0.11.1.11, 0.11.1.10, 0.11.1.9, 0.11.1.8, 0.11.1.7, 0.11.1.6,
0.11.1.5, 0.11.1.3, 0.11.1.2, 0.11.1.1, 0.11.1.0, 0.11.0.8, 0.11.0.7,
0.11.0.6, 0.11.0.5, 0.11.0.4, 0.11.0.3, 0.11.0.2, 0.11.0.1, 0.11.0.0,
0.10.0.2, 0.10.0.1, 0.10.0.0, 0.9.1.0, 0.9.0.1, 0.9.0.0 (conflict: attoparsec
=> text>=1.1.1.3)
rejecting: text-0.8.1.0, 0.8.0.0, 0.7.2.1, 0.7.1.0, 0.7.0.1, 0.7, 0.6, 0.5,
0.4, 0.3, 0.2, 0.1 (conflict: yesod-static => text>=0.9)
Dependency tree exhaustively searched.

Note: ...........

On Friday, August 1, 2014 10:22:48 AM UTC+2, Michael Snoyman wrote:
The error below means that cabal gave up early because it thought it had tried enough backjumps. That why you need to include the --max-backjumps=-1 argument.
............

Michael Snoyman

unread,
Aug 1, 2014, 4:57:10 AM8/1/14
to yeso...@googlegroups.com
Yup, that's the problem. There's not really a good solution to this situation with the current HP. It might make sense for you to give a shot at the new HP release candidate, or to just build your sandbox with msys, which will allow you to upgrade to a newer text, parsec, and network packages.

Thank you for trying out so many different combinations already, and for giving such good feedback. If I can ask for one more request for testing with the HP: what happens if you run `cabal install wreq`? I'm curious if it succeeds or not.


kees Bleijenberg

unread,
Aug 1, 2014, 5:37:42 AM8/1/14
to yeso...@googlegroups.com, mic...@snoyman.com

Michael, I've put my answers between the lines in your last reply.


On Friday, August 1, 2014 10:57:10 AM UTC+2, Michael Snoyman wrote:
Yup, that's the problem. There's not really a good solution to this situation with the current HP. It might make sense for you to give a shot at the new HP release candidate, or to just build your sandbox with msys, which will allow you to upgrade to a newer text, parsec, and network packages.

Does this mean I have to do exactly the same in the commandline of msys as I did with cmd? 
 

Thank you for trying out so many different combinations already, and for giving such good feedback. If I can ask for one more request for testing with the HP: what happens if you run `cabal install wreq`? I'm curious if it succeeds or not.

No problems. wreq-0.1.0.1 is installed.

For me, this yesod experiment is dissapointing. Obviously there is no easy way to install yesod on windows 7 64 bits. In a few weeks, I'll give it another try with the new Haskell Platform.
Thanks for all your help.

Kees

Michael Snoyman

unread,
Aug 1, 2014, 7:33:34 AM8/1/14
to yeso...@googlegroups.com
I've reopened a discussion that was started last year, which is really the heart of this problem[1]. Hopefully this will get resolved this time.

Greg Weber

unread,
Aug 1, 2014, 11:15:59 AM8/1/14
to Yesod Web Framework, Michael Snoyman
Haskell on Windows is going to be more difficult. I would highly recommend installing Virtualbox (free) or VMWare and using Linux.

Michael Snoyman

unread,
Aug 1, 2014, 11:24:56 AM8/1/14
to yeso...@googlegroups.com
Also, pull request 790[1] may have fixed the Windows issues you were experiencing, but I can't be certain.

I agree with Greg's recommendation in general, you'll also most likely be deploying in the end to a Linux-based server, so deving in the same environment makes sense.

[1] https://github.com/yesodweb/yesod/pull/790

kees Bleijenberg

unread,
Aug 2, 2014, 9:13:13 AM8/2/14
to yeso...@googlegroups.com
I don't understand what the pull request you mentioned, change things But  when I did:

cabal install yesod-platform-1.2.12.3 yesod-bin --constraint parsec==3.1.3 --constraint network==2.4.1.2 --max-backjumps=-1 --reorder-goals
(yesod platform version 1.2.12.3!)
I got another dependency problem (but as it seems no text problem): 

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: yesod-platform-1.2.12.3 (user goal)
next goal: yesod-core (dependency of yesod-platform-1.2.12.3)
rejecting: yesod-core-1.2.16/installed-8ca... (conflict: yesod-core =>
unix-compat==0.4.1.1/installed-587..., yesod-platform => unix-compat==0.4.1.3)
rejecting: yesod-core-1.2.19, 1.2.18, 1.2.17, 1.2.16.1 (conflict:
yesod-platform => yesod-core==1.2.16)
trying: yesod-core-1.2.16
trying: unix-compat-0.4.1.3/installed-52a... (dependency of
yesod-platform-1.2.12.3)
next goal: hspec (dependency of yesod-platform-1.2.12.3)
rejecting: hspec-1.9.5/installed-522... (conflict: tf-random==0.5, hspec =>
tf-random==0.5/installed-b2f...)
rejecting: hspec-1.11.0, 1.10.0.1, 1.10.0 (conflict: yesod-platform =>
hspec==1.9.5)
trying: hspec-1.9.5
trying: QuickCheck-2.6/installed-8b9... (dependency of hspec-1.9.5)
next goal: random (dependency of yesod-core-1.2.16)
rejecting: random-1.0.1.1/installed-66a... (conflict: unix-compat =>
time==1.4.2/installed-64c..., random => time==1.4.0.1/installed-ecf...)
rejecting: random-1.0.1.1, 1.0.1.0, 1.0.0.3, 1.0.0.2, 1.0.0.1, 1.0.0.0
(conflict: QuickCheck => random==1.0.1.1/installed-66a...)
Dependency tree exhaustively searched.

Michael Snoyman

unread,
Aug 3, 2014, 2:23:42 AM8/3/14
to yeso...@googlegroups.com
Is this from inside the sandbox? It looks like you have some previously-installed packages in the sandbox which are causing conflicts. It's prudent to just wipe out your current sandbox and start a new one from scratch to make sure that no existing packages cause conflicts.


kees Bleijenberg

unread,
Aug 3, 2014, 4:39:54 AM8/3/14
to yeso...@googlegroups.com, mic...@snoyman.com
Of course. I'am sorry.
I don't know if this gives you extra information or is it (for you) a waste of time (please let me know).
I deleted the map and started again with yesod init, cabal sandbox init and then
cabal install yesod-platform-1.2.12.3 yesod-bin --constraint parsec==3.1.3 --constraint network==2.4.1.2 --max-backjumps=-1 --reorder-goals


Resolving dependencies...
cabal: Could not resolve dependencies:
trying: yesod-platform-1.2.12.3 (user goal)
next goal: yesod-test (dependency of yesod-platform-1.2.12.3)
rejecting: yesod-test-1.2.3.1 (conflict: yesod-platform => yesod-test==1.2.3)
trying: yesod-test-1.2.3
next goal: yesod-core (dependency of yesod-platform-1.2.12.3)
rejecting: yesod-core-1.2.19, 1.2.18, 1.2.17, 1.2.16.1 (conflict:
yesod-platform => yesod-core==1.2.16)
trying: yesod-core-1.2.16
trying: x509-system-1.4.5 (dependency of yesod-platform-1.2.12.3)
next goal: Win32 (dependency of x509-system-1.4.5)
rejecting: Win32-2.3.0.0/installed-6e9... (conflict: unix-compat =>
Win32>=2.3.0.2)
trying: Win32-2.3.0.2
trying: random-1.0.1.1/installed-66a... (dependency of yesod-core-1.2.16)
next goal: time (dependency of yesod-test-1.2.3)
rejecting: time-1.4.0.1/installed-ecf... (conflict: Win32==2.3.0.2, time =>
rejecting: time-1.4.2, 1.4.1, 1.4.0.2, 1.4.0.1, 1.4, 1.3, 1.2.0.5, 1.2.0.4,
1.2.0.3, 1.2.0.2, 1.2.0.1, 1.2, 1.1.4, 1.1.3, 1.1.2.4, 1.1.2.3, 1.1.2.2,
1.1.2.1, 1.1.2.0, 1.0 (conflict: random => time==1.4.0.1/installed-ecf...)
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.


On Sunday, August 3, 2014 8:23:42 AM UTC+2, Michael Snoyman wrote:
Is this from inside the sandbox? It looks like you have some previously-installed packages in the sandbox which are causing conflicts. It's prudent to just wipe out your current sandbox and start a new one from scratch to make sure that no existing packages cause conflicts.
On Sat, Aug 2, 2014 at 4:13 PM, kees Bleijenberg <k.blei...@lijbrandt.nl> wrote:
I don't understand what the pull request you mentioned, change things But  when I did:

cabal install yesod-platform-1.2.12.3 yesod-bin --constraint parsec==3.1.3 --constraint network==2.4.1.2 --max-backjumps=-1 --reorder-goals
(yesod platform version 1.2.12.3!)
I got another dependency problem (but as it seems no text problem): 
.............

Michael Snoyman

unread,
Aug 3, 2014, 12:45:03 PM8/3/14
to yeso...@googlegroups.com
Wow, haskell-platform really ties our hands here...

I've uploaded a new yesod-platform without the unix-compat constraint. That might solve things. You may also want to try just skipping the yesod-platform in this case, and see if `cabal install` inside the generated scaffolding works.


kees Bleijenberg

unread,
Aug 4, 2014, 4:19:46 AM8/4/14
to yeso...@googlegroups.com, mic...@snoyman.com
Success! It builts fine.

Then yesod devel .... and I get the deja vue feeling. This is where it all started at stackoverlfow.
Again the missing data constructor AuthR.
In yesod init I've chosen 'simple' no DB no authorization.
The line ' [1;31mBuild failure, pausing... [0m ' seems a character encoding bug.
The user interrupt is from pressing ctrl+c.

When I open localhost:3000 in the browser I see a page telling that the application isn't built yet and shows motivational messages.

This is the output of yesod devel
Yesod devel server. Press ENTER to quit
Resolving dependencies...
Configuring testYesod-0.0.0...

Foundation.hs:83:19: Not in scope: data constructor `AuthR'
Forcing recompile for .\Foundation.hs because of config/routes
Forcing recompile for .\Foundation.hs because of messages/en.msg
Forcing recompile for .\Foundation.hs because of templates/default-layout-wrapper.hamlet
Forcing recompile for .\Foundation.hs because of templates/default-layout.hamlet
Forcing recompile for .\Handler\Home.hs because of templates/homepage.hamlet
Forcing recompile for .\Handler\Home.hs because of templates/homepage.julius
Forcing recompile for .\Handler\Home.hs because of templates/homepage.lucius
Rebuilding application... (using cabal)
[1;31mBuild failure, pausing... [0m
yesod: <stdin>: hGetLine: end of file
yesod: user interrupt

Michael Snoyman

unread,
Aug 4, 2014, 4:23:03 AM8/4/14
to yeso...@googlegroups.com
I caught that recently, and updated yesod-bin. You can safely delete that line.


kees Bleijenberg

unread,
Aug 4, 2014, 5:00:46 AM8/4/14
to yeso...@googlegroups.com, mic...@snoyman.com
I'am sorry: what line?

Michael Snoyman

unread,
Aug 4, 2014, 5:02:20 AM8/4/14
to yeso...@googlegroups.com
The line indicated by the error message:


> Foundation.hs:83:19: Not in scope: data constructor `AuthR'

kees Bleijenberg

unread,
Aug 4, 2014, 5:58:26 AM8/4/14
to yeso...@googlegroups.com, mic...@snoyman.com
Woops, silly me.
Everything works fine now. Thanks!
I'll start reading 'the book'.

Kees

Michael Snoyman

unread,
Aug 4, 2014, 6:00:29 AM8/4/14
to yeso...@googlegroups.com
Thanks for sticking through a painful cabal debugging experience. Hopefully the next HP will make this less painful.

kees Bleijenberg

unread,
Aug 11, 2014, 10:23:27 AM8/11/14
to yeso...@googlegroups.com
I've tried the intallation  for the new Haskell-Platform (32 bits on Windows on a 64 bits machine, because 64 bits doesn't support stdcall, which I need for creating dll's). 
I started in a fresh dir with cabal sandbox init
Then cabal install yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals (so without any restriction on versions). No problems!
The only strange thing is that yesod.exe is installed in the sandbox and therefore is not on the path.
Calling yesod init with the full path to yesod.exe worked.
then cd testYesod
cabal sandbox init
and now cabal install --enable-tests . yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals. Again no problems.
Finally <full qualified name to yesod>/yesod devel
Error: cabal: Cannot find the program 'ghc' at 'yesod-ghc-wrapper' or on the path (huh? Ghc is on the path)
I've add the full qualified path to yesod.exe to the path and now everything works fine.

That went a lot quicker than the old Haskell Platform.

Greg Weber

unread,
Aug 11, 2014, 12:38:35 PM8/11/14
to Yesod Web Framework
I am glad you have made some progress. the yesod executable calls a yesod-ghc-wrapper executable that is installed in the same directory. So you will want to copy both of those to your project sandbox or otherwise make sure both of them are in your PATH


Reply all
Reply to author
Forward
0 new messages