Skip Menu |

This queue is for tickets about the TDB_File CPAN distribution.

Report information
The Basics
Id: 14243
Status: resolved
Priority: 0/
Queue: TDB_File

People
Owner: Nobody in particular
Requestors: csburris [...] earthlink.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.90
Fixed in: (no value)



Subject: TDB_File.xs errors
In file included from TDB_File.xs:8: const-c.inc: In function `constant': const-c.inc:278: error: `TDB_ERR_LOCK_TIMEOUT' undeclared (first use in this function) const-c.inc:278: error: (Each undeclared identifier is reported only once I've gotten the same results on SuSE Linux and Mac OS X, so I don't believe this is a platform problem I get the following errors: const-c.inc:278: error: for each function it appears in.) TDB_File.xs:14:18: '#' is not followed by a macro parameter TDB_File.xs: In function `XS_TDB_File_open': TDB_File.xs:280: error: `tdb_hash_func' undeclared (first use in this function) TDB_File.xs:280: error: parse error before "hash_func" TDB_File.xs:287: error: `hash_func' undeclared (first use in this function) TDB_File.xs:304: error: too many arguments to function `tdb_open_ex' TDB_File.c: In function `XS_TDB_File_printfreelist': TDB_File.c:852: error: void value not ignored as it ought to be Looking through tdb-1.06 (the release version) these are indeed undefined. I'm wondering what this was compiled against.
Date: Sun, 21 Aug 2005 20:57:24 +1000
From: Angus Lees <gus [...] inodes.org>
To: bug-TDB_File [...] rt.cpan.org
Subject: Re: [cpan #14243] TDB_File.xs errors
RT-Send-Cc:
At Sat, 20 Aug 2005 14:13:05 -0400 (EDT), Guest via RT wrote: Show quoted text
> In file included from TDB_File.xs:8: > const-c.inc: In function `constant': > const-c.inc:278: error: `TDB_ERR_LOCK_TIMEOUT' undeclared (first use in this function) > const-c.inc:278: error: (Each undeclared identifier is reported only once > I've gotten the same results on SuSE Linux and Mac OS X, so I don't believe this is a platform problem
Hrm, ok. Just remove TDB_ERR_LOCK_TIMEOUT from the list in Makefile.PL and ensure ExtUtils::Constant is available - unfortunately there isn't an easy way I can test for this case, without doing a compile attempt or something.. Show quoted text
> I get the following errors: > > const-c.inc:278: error: for each function it appears in.) > TDB_File.xs:14:18: '#' is not followed by a macro parameter > TDB_File.xs: In function `XS_TDB_File_open': > TDB_File.xs:280: error: `tdb_hash_func' undeclared (first use in this function) > TDB_File.xs:280: error: parse error before "hash_func" > TDB_File.xs:287: error: `hash_func' undeclared (first use in this function) > TDB_File.xs:304: error: too many arguments to function `tdb_open_ex'
I'm a bit confused by tdb_hash_func being undeclared, since the typedef at line ~18 should have declared it for you. You didn't pass "has_hash_func" to Makefile.PL by any chance did you? Show quoted text
> TDB_File.c: In function `XS_TDB_File_printfreelist': > TDB_File.c:852: error: void value not ignored as it ought to be
This one is easy to fix too - just change the "int" before tdb_printfreelist in TDB_File.xs to "void" (line 333). Show quoted text
> Looking through tdb-1.06 (the release version) these are indeed > undefined. I'm wondering what this was compiled against.
I've developed it against the Debian libtdb package, which also claims to be version 1.0.6. The problem is that (at least this package) has changed the arguments to tdb_open_ex without changing the declared version, so I added a "has_hash_func" argument to Makefile.PL (as mentioned in README) to switch between the two versions of (Debian) tdb that I have had exposure to. Sorry for the inconvenience. I'll make sure I grab a pristine tdb version directly from the primary site and test against that as well as the Debian version in future. I can see I'll have to have words with both the upstream tdb maintainer and the Debian packager and come up with some better solution to these compatibility issues :( (It's complicated by the fact that the tdb in samba has changed slightly too) -- - Gus
On Sun Aug 21 06:56:54 2005, gus@inodes.org wrote: Show quoted text
> At Sat, 20 Aug 2005 14:13:05 -0400 (EDT), Guest via RT wrote:
> > In file included from TDB_File.xs:8: > > const-c.inc: In function `constant': > > const-c.inc:278: error: `TDB_ERR_LOCK_TIMEOUT' undeclared (first use
> in this function)
> > const-c.inc:278: error: (Each undeclared identifier is reported only
> once
> > I've gotten the same results on SuSE Linux and Mac OS X, so I don't
> believe this is a platform problem > > Hrm, ok. Just remove TDB_ERR_LOCK_TIMEOUT from the list in > Makefile.PL and ensure ExtUtils::Constant is available - unfortunately > there isn't an easy way I can test for this case, without doing a > compile attempt or something.. >
> > I get the following errors: > > > > const-c.inc:278: error: for each function it appears in.) > > TDB_File.xs:14:18: '#' is not followed by a macro parameter > > TDB_File.xs: In function `XS_TDB_File_open': > > TDB_File.xs:280: error: `tdb_hash_func' undeclared (first use in
> this function)
> > TDB_File.xs:280: error: parse error before "hash_func" > > TDB_File.xs:287: error: `hash_func' undeclared (first use in this
> function)
> > TDB_File.xs:304: error: too many arguments to function `tdb_open_ex'
> > I'm a bit confused by tdb_hash_func being undeclared, since the > typedef at line ~18 should have declared it for you. You didn't pass > "has_hash_func" to Makefile.PL by any chance did you? >
> > TDB_File.c: In function `XS_TDB_File_printfreelist': > > TDB_File.c:852: error: void value not ignored as it ought to be
> > This one is easy to fix too - just change the "int" before > tdb_printfreelist in TDB_File.xs to "void" (line 333). >
> > Looking through tdb-1.06 (the release version) these are indeed > > undefined. I'm wondering what this was compiled against.
> > I've developed it against the Debian libtdb package, which also claims > to be version 1.0.6. The problem is that (at least this package) has > changed the arguments to tdb_open_ex without changing the declared > version, so I added a "has_hash_func" argument to Makefile.PL (as > mentioned in README) to switch between the two versions of (Debian) > tdb that I have had exposure to. > > Sorry for the inconvenience. I'll make sure I grab a pristine tdb > version directly from the primary site and test against that as well > as the Debian version in future. > > I can see I'll have to have words with both the upstream tdb > maintainer and the Debian packager and come up with some better > solution to these compatibility issues :( > (It's complicated by the fact that the tdb in samba has changed > slightly too) >
0.95 should work with all the tdb 1.0.6 versions I know about. I have explicitly tested against the latest sourceforge version.