On Mon, 15 Aug 2005, Tim Bunce wrote:

> Configure.pl said
> 
> Determining if your platform supports gdbm.............................yes.
> 
> But t/dynclass/gdbmhash.t fails completely:
> 
> Failed Test           Stat Wstat Total Fail  Failed  List of Failed
> -------------------------------------------------------------------------------
> t/dynclass/gdbmhash.t   13  3328    13   13 100.00%  1-13
> 
> with errors like:
> 
> # './parrot  --gc-debug "/Users/timbo/perl/parrot/t/dynclass/gdbmhash_1.pir"' 
> failed with exit code 42
> t/dynclass/gdbmhash............NOK 2                                         
> #     Failed test (t/dynclass/gdbmhash.t at line 56)
> #          got: 'no extension: file 'libgdbm'
> # '

> This is on OSX 10.4 with a recent svn update:
> 
>       Last Changed Rev: 8966
>       Last Changed Date: 2005-08-15 04:57:58 +0100 (Mon, 15 Aug 2005)

Yes, I've been seeing that same failure for ages on Solaris.  The gdbmhash 
test has never worked for me; I had just assumed it was the same for 
everyone else too.

The error message is, at best, unhelpful.  I'd suggest applying the 
patch below and then rerunning the test.

Here's some of what's going on:  In src/dynext.c, get_path() tries to open 
"libgdbm".  It has the following algorithm:  First it tries to add an 
extension PARROT_LOAD_EXT to libgdbm.  (I'd guess that the extension used 
in config/init/hints doesn't match the extension used when gdbm was built 
for OS X.)  get_path() then calls src/library:Parrot_locate_runtime_file() 
to try to look in various standard paths.  That is failing.

Finally, after trying various prefixes, get_path() simply tries finding 
"libgdbm" without any extensions.  However, Parrot_locate_runtime_file()
throws the internal_exception "no extension" in that case, so it's 
pointless.

The patch below lets you call Parrot_locate_runtime_file() without any 
extension.  That will also fail to find a bare "libgdbm".  However, and 
here's the point, get_path() will report the result from dlerror(), and 
you'll get a useful error message back.

You can then take that error message, see what Parrot was looking for, and 
see what the libgdbm file is actually called on your system.

--- parrot-current/src/library.c        Tue Aug 16 13:22:34 2005
+++ parrot-andy/src/library.c   Tue Aug 16 15:46:49 2005
@@ -212,9 +212,11 @@
      * if the extension is given use it
      * TODO if not try extensions according to type
      */
+    /*
     if (!ext) {
         internal_exception(UNIMPLEMENTED, "no extension: file '%s'", 
file_name);
     }
+    */
 
     /* use absolute paths as is */
 #ifdef WIN32



-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to