Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DB_File CPAN distribution.

Report information
The Basics
Id:
96126
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
TONYC [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
1.832



Subject: build failure in blead
Building a non-threaded perl currently fails when building DB_File on NetBSD. It started failing in bafdc25d6fdf3143c875c3440a49861ff1e19000, but the failure is caused by a bug in DB_File (or at least some obsolete code.) perl.h defines dNOOP as: #define dNOOP extern int Perl___notused(void) when DB_VERSION_MAJOR is undefined, DB_File.xs defines dNOOP as: # define dNOOP extern int Perl___notused Perl's definition changed in bafdc25d6fdf3143c875c3440a49861ff1e19000 (June 2011). The reason Karl's commit started this failing: He introduced a new inline function to inline.h, which uses dTHX. That is replaced by dNOOP on non-threaded builds and then with extern int Perl___notused(void), so now a declaration of the function is visible to XS. After redefining dNOOP, DB_File.xs also uses dTHX, which is now replaced with "extern in Perl___notused" causing the error: DB_File.xs: In function 'btree_compare': DB_File.xs:590: error: 'Perl___notused' redeclared as different kind of symbol ../../inline.h:261: error: previous declaration of 'Perl___notused' was here *** [DB_File.o] Error code 1 The simplest solution is probably to use a different name when you redefine dNOOP, eg: #define dNOOP extern int DB_File___notused(void) which will conflict with neither the old variable declaration nor the newer function declaration. Tony
Why does DB_File even need its own definition of dNOOP? If it really does for some reason, then it needs to own the whole enchilada and track everything the core version does, which currently looks like: #ifdef __cplusplus #define dNOOP (void)0 #else #define dNOOP extern int Perl___notused(void) #endif As it is the core build is broken with clang++: DB_File.c:3023:5: error: declaration of 'DB_File___notused' has a different language linkage dVAR; dXSARGS; ^ ../../perl.h:157:17: note: expanded from macro 'dVAR'


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.