[darcs-users] could you install zlib headers and libs on your darcs buildbot machine?
Thorkil Naur
naur at post11.tele.dk
Tue May 6 21:40:43 UTC 2008
Hello,
On Tuesday 06 May 2008 16:19, zooko wrote:
> ...
> Here is the config.log, which shows how the buildbot wasn't able to
> link to libz:
>
> http://allmydata.org/buildbot-darcs/builders/thorkil%20linux%
> 20Linux-2.6.13-15%20SUSE-%3F%20i686/builds/23/steps/configure/logs/
> config.log
Here we find the failing program to be:
> configure: failed program was:
> -- #line 6512 "configure"
> {-# OPTIONS -fffi -Werror #-}
> module Main where
>
> foreign import ccall unsafe "zlib.h deflate" fun :: Int -> Int -> Int
>
> main = fun `seq` putStrLn "hello world"
>
> end of failed program.
And this fails twice, once without and once with "-lz".
But notice the error message: In both cases, it is:
> conftest.hs:5:8: parse error on input `import'
This means that the FFI declaration is not being recognized. So the problem is
not related to whether zlib can be accessed or not.
Now, I am no expert in the use of the FFI, but I do know that FFI declarations
are not recognized, unless some language extension is being activated, in
this case, it is supposedly done by the "-fffi" option that follows OPTIONS
in the initial comment.
So what is wrong here?
I believe that the problem is that GHC-6.4.1 (which is used here) only
recognizes OPTIONS in the very first comment (or in the first line or
something like that) of a program. In this case, there is a comment or a line
before the one with the OPTIONS, i.e. the one that mentions the configure
line number. If that line is left out of the program, everything works fine.
I have attached an illustrative patch, not to be taken seriously as a
solution, but pointing out the problem, that corrects the problem on this
builder. Hopefully, someone will be able to find a more suitable correction
to this problem.
>
> If you could try to figure out why the one works and the other fails,
> that would be nice. Please post to darcs-users at darcs.net, with
> either answers about this or at least questions. :-)
>
> Thanks!
>
> Regards,
>
> Zooko
>
>
Best regards
Thorkil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Leave_out_initial_comment_of_Haskell_programs_to_activate_OPTIONS_that_may_follow_illustrative_only.dpatch.gz
Type: application/x-gzip
Size: 8049 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080506/2a1aad27/attachment-0001.bin
More information about the darcs-users
mailing list