I successfully compiled happstack-server from darcs head on MacOS
10.5.8, and I was also able to compile gitit against it.
I noticed a bunch of compiler warnings when compiling happstack.
A lot of them seem really easy to fix -- e.g. things that are
imported and not used, or
"-XPatternSignatures is deprecated: use -XScopedTypeVariables".
Is there any reason not to fix them?
I also noticed that the link to the API documentation on the happstack
website goes to the docs for version 0.2.
John
On FreeBSD 7.2, I ran into trouble compiling sendfile (now a dependency
of happstack-server). I haven't had time to investigate further, but
here's the log:
Configuring sendfile-0.5...
Preprocessing library sendfile-0.5...
Building sendfile-0.5...
[1 of 3] Compiling Network.Socket.SendFile.FreeBSD (
src/Network/Socket/SendFile/FreeBSD.hs,
dist/build/Network/Socket/SendFile/FreeBSD.o )
[2 of 3] Compiling Network.Socket.SendFile.Internal (
src/Network/Socket/SendFile/Internal.hs,
dist/build/Network/Socket/SendFile/Internal.o )
src/Network/Socket/SendFile/Internal.hs:76:18:
Couldn't match expected type `Integer -> IO ()'
against inferred type `IO Integer'
In the first argument of `wrapSendFile'', namely `_sendFile'
In the expression: wrapSendFile' _sendFile out_fd in_fd off count
In the expression:
do let out_fd = Fd (fdSocket outs)
let in_fd = Fd (haFD inp')
wrapSendFile' _sendFile out_fd in_fd off count
src/Network/Socket/SendFile/Internal.hs:85:18:
Couldn't match expected type `Integer -> IO ()'
against inferred type `IO Integer'
In the first argument of `wrapSendFile'', namely `_sendFile'
In the expression: wrapSendFile' _sendFile out_fd in_fd off count
In the expression:
do let out_fd = Fd (haFD outp')
let in_fd = Fd (haFD inp')
wrapSendFile' _sendFile out_fd in_fd off count
cabal: Error: some packages failed to install:
happstack-server-0.4 depends on sendfile-0.5 which failed to install.
sendfile-0.5 failed during the building phase. The exception was:
exit: ExitFailure 1
Looks like _sendFile has a different type (even a different
number of arguments) in Network.Socket.SendFile.Linux and
in Network.Socket.SendFile.FreeBSD, but the calling module
Network.Socket.SendFile.Internal is not sensitive to this difference.
If someone sends a patch today, I can apply it and test on
my FreeBSD machine. (But I'll be away the rest of the week.)
John
I'm pretty sure that native sendfile is not working on *BSD systems in
0.5. You could try looking at the changes in the repository post the 0.5
release
http://patch-tag.com/r/mae/sendfile
to see if the OS-X support I added can be used as a template for fixing
up the FreeBSD version.
Or, try and install sendfile with the portable flag set, which uses the
Haskell version of the sendfile code, which should work, as it is the C
binding that needs some work.
HTH
Doug
I was able to compile sendfile with -fportable, and then
happstack-server 0.4 and gitit on top of that. Everything
seems to work just fine on FreeBSD. It woud be nice to get the
native sendfile working, but I don't know enough about it
to do it myself.
John
Would FreeBSD in a virtual machine be enough? I don't have FreeBSD,
but I could install it in a VM and give you root access. The problem
is that you need GHC installed, right? I don't know how easy that is.
Paulo
Easy. There's a binary package you can install using pkg_add.
Thanks, John, I'll try that. Matthew, I'll email you soon.
Paulo