GHC 6.2.1 and FedoraCore2: ar-related build problem, looked like readline problem

Henrik Nilsson nhn at Cs.Nott.AC.UK
Fri Sep 3 10:34:31 EDT 2004


Hi,

Simon M. wrote:

 > Could someone with one of these offending ar's please hack up a fix to
 > the configure script?  Maybe just grepping for the error message in
 > the output  of ar would be sufficient.

What about the following?

----------------------------------------------------------

dd if=/dev/zero of=archive_member bs=1024 count=10 \
    >/dev/null 2>/dev/null
echo archive_member > ar_input
$ArCmd conftest.a -input ar_input >/dev/null 2>/dev/null
if [ -n "`find conftest.a -size +10k`" ]; then
     ArSupportsInput='-input'
else
     ArSupportsInput=''
fi
rm -rf conftest* archive_member ar_input

----------------------------------------------------------

Thus, the idea is to test whether the ar command seems
to do what it is supposed to to by looking at the
size of the resulting archive file, which should be
about 10k if the command succeeds.

However:

* I don't know what commands/flags are portable enough to go
   into scripts like this (I've only tried it on a Solaris machine
   in addition to my Linux box).

* In any case, I confess that I'm not great at writing shell scripts:
   there are probably easier/better ways of creating a file of a certain
   size, and of testing the file size? (The "test" command, and its
   shorthands, which seemed like the obvious choice at first, only seem
   to allow testing for files being longer than 0.)

Best,

/Henrik

-- 
Henrik Nilsson
School of Computer Science and Information Technology
The University of Nottingham
nhn at cs.nott.ac.uk

This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks.  Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.




More information about the Glasgow-haskell-bugs mailing list