On Tue, 9 Sep 2008, James Keenan via RT wrote:

> On Tue Sep 09 15:14:36 2008, [EMAIL PROTECTED] wrote:
> 
> > 
> > Generally agreed. In this case, hold this ticket for the I/O milestone, 
> > which is next (sometime in the next few days). I've added it to the I/O 
> > tasklist.
> > 
> > In the meantime, let's get Andy's patch applied (if it isn't already).
> > 
> 
> I extracted the attached patch from email text and applied it in r30946.
>  All
> tests pass, but note that I still don't get correct detection of AIO
> capabilities on Darwin/PPC (OS X 10.4).  The message I get with
> verbose-step=auto::aio is in the second attachment.

> auto::aio -           Does your platform support AIO...
> /usr/bin/gcc [-options ... ] -I./include -c test_19186.c 
> c++ -undefined dynamic_lookup test_19186.o  -o test_19186  -lm -lrt
> /usr/bin/ld: can't locate file for: -lrt

That's another easy one.  The test assumes that all platforms have -lrt 
and that all platforms have to link with it for this test.  Your system 
clearly doesn't have -lrt, so the link fails.  If you just delete the line 
that adds in -lrt, I'll bet the test succeeds.

Generally, Configure shouldn't be unconditionally adding libraries.  A 
better idiom is probably to try without, and then try with only if 
necessary.  Something like this:

diff -r -u parrot-svn/config/auto/aio.pm parrot-cc/config/auto/aio.pm
--- parrot-svn/config/auto/aio.pm       2008-09-10 11:06:19.000000000 -0400
+++ parrot-cc/config/auto/aio.pm        2008-09-10 11:53:31.000000000 -0400
@@ -45,9 +45,14 @@
 
     my $verbose = $conf->options->get('verbose');
     my $libs    = $conf->data->get('libs');
-    $conf->data->add( ' ', libs => '-lrt' );
-
     my $errormsg = _first_probe_for_aio($conf, $verbose);
+    if ($errormsg) {
+        # Linux, at least, needs to add -lrt to $libs.
+        print " (Trying again with -lrt) " if $verbose;
+        $conf->data->add( ' ', libs => '-lrt' );
+        $errormsg = _first_probe_for_aio($conf, $verbose);
+    }
+
     if ( ! $errormsg ) {
         my $test = $conf->cc_run();
 

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to