Skip Menu |

This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id: 59840
Status: resolved
Priority: 0/
Queue: DBI

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

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



Subject: Compilation fails with 5.13.3
The discussion has been opened on perl5-porters under the subject line "branch blead, updated. v5.13.3-20-gcfef31b". It has been suggested that DBI should switch to PL_* for yes/no/dirty/stack_base. Since my smokers are currently stalled on everything depending on DBI I'd like to get a working DBI back. Is the attached patch the right way to go? It fixes the compilation issues with perl 5.13.3 and still keeps compatibility with 5.8.9. I haven't tried older perls. Thanks,
Subject: DBI-1.613-ANDK-01.patch
Common subdirectories: DBI-1.613-bWbBDZ//blib and DBI-1.613-newnew//blib diff -u DBI-1.613-bWbBDZ//dbipport.h DBI-1.613-newnew//dbipport.h --- DBI-1.613-bWbBDZ//dbipport.h 2009-09-14 15:24:36.000000000 +0200 +++ DBI-1.613-newnew//dbipport.h 2010-07-29 22:31:52.000000000 +0200 @@ -4103,7 +4103,6 @@ # define PL_debstash debstash # define PL_defgv defgv # define PL_diehook diehook -# define PL_dirty dirty # define PL_dowarn dowarn # define PL_errgv errgv # define PL_error_count error_count @@ -4120,14 +4119,11 @@ # define PL_perldb perldb # define PL_rsfp_filters rsfp_filters # define PL_rsfp rsfp -# define PL_stack_base stack_base # define PL_stack_sp stack_sp # define PL_statcache statcache # define PL_stdingv stdingv # define PL_sv_arenaroot sv_arenaroot -# define PL_sv_no sv_no # define PL_sv_undef sv_undef -# define PL_sv_yes sv_yes # define PL_tainted tainted # define PL_tainting tainting # define PL_tokenbuf tokenbuf Only in DBI-1.613-newnew/: dbiprof Only in DBI-1.613-newnew/: dbi.prof.prev Only in DBI-1.613-newnew/: dbiproxy Only in DBI-1.613-newnew/: dbitrace.log diff -u DBI-1.613-bWbBDZ//DBI.xs DBI-1.613-newnew//DBI.xs --- DBI-1.613-bWbBDZ//DBI.xs 2010-07-02 16:14:46.000000000 +0200 +++ DBI-1.613-newnew//DBI.xs 2010-07-29 22:33:31.000000000 +0200 @@ -3430,16 +3430,16 @@ (void)(*CvXSUB(xscv))(aTHXo_ xscv); /* Call the C code directly */ if (gimme == G_SCALAR) { /* Enforce sanity in scalar context */ - if (++markix != PL_stack_sp - stack_base ) { - if (markix > PL_stack_sp - stack_base) - *(stack_base + markix) = &PL_sv_undef; - else *(stack_base + markix) = *PL_stack_sp; - PL_stack_sp = stack_base + markix; + if (++markix != PL_stack_sp - PL_stack_base ) { + if (markix > PL_stack_sp - PL_stack_base) + *(PL_stack_base + markix) = &PL_sv_undef; + else *(PL_stack_base + markix) = *PL_stack_sp; + PL_stack_sp = PL_stack_base + markix; } outitems = 1; } else { - outitems = PL_stack_sp - (stack_base + markix); + outitems = PL_stack_sp - (PL_stack_base + markix); } } @@ -3452,7 +3452,7 @@ /* XXX restore local vars so ST(n) works below */ SP -= outitems; - ax = (SP - stack_base) + 1; + ax = (SP - PL_stack_base) + 1; #ifdef DBI_save_hv_fetch_ent if (is_FETCH) diff -u DBI-1.613-bWbBDZ//Driver.xst DBI-1.613-newnew//Driver.xst --- DBI-1.613-bWbBDZ//Driver.xst 2009-09-02 12:13:15.000000000 +0200 +++ DBI-1.613-newnew//Driver.xst 2010-07-29 22:30:00.000000000 +0200 @@ -47,7 +47,7 @@ CODE: D_imp_drh(drh); if (0) ix = ix; /* avoid unused variable warning */ - ST(0) = dbd_discon_all(drh, imp_drh) ? &sv_yes : &sv_no; + ST(0) = dbd_discon_all(drh, imp_drh) ? &PL_sv_yes : &PL_sv_no; #endif /* dbd_discon_all */ @@ -95,11 +95,11 @@ char *u = (SvOK(username)) ? SvPV(username,lna) : ""; char *p = (SvOK(password)) ? SvPV(password,lna) : ""; #ifdef dbd_db_login6_sv - ST(0) = dbd_db_login6_sv(dbh, imp_dbh, dbname, username, password, attribs) ? &sv_yes : &sv_no; + ST(0) = dbd_db_login6_sv(dbh, imp_dbh, dbname, username, password, attribs) ? &PL_sv_yes : &PL_sv_no; #elif defined(dbd_db_login6) - ST(0) = dbd_db_login6(dbh, imp_dbh, SvPV_nolen(dbname), u, p, attribs) ? &sv_yes : &sv_no; + ST(0) = dbd_db_login6(dbh, imp_dbh, SvPV_nolen(dbname), u, p, attribs) ? &PL_sv_yes : &PL_sv_no; #else - ST(0) = dbd_db_login( dbh, imp_dbh, SvPV_nolen(dbname), u, p) ? &sv_yes : &sv_no; + ST(0) = dbd_db_login( dbh, imp_dbh, SvPV_nolen(dbname), u, p) ? &PL_sv_yes : &PL_sv_no; #endif } @@ -274,7 +274,7 @@ D_imp_dbh(dbh); if (DBIc_has(imp_dbh,DBIcf_AutoCommit) && DBIc_WARN(imp_dbh)) warn("commit ineffective with AutoCommit enabled"); - ST(0) = dbd_db_commit(dbh, imp_dbh) ? &sv_yes : &sv_no; + ST(0) = dbd_db_commit(dbh, imp_dbh) ? &PL_sv_yes : &PL_sv_no; void @@ -284,7 +284,7 @@ D_imp_dbh(dbh); if (DBIc_has(imp_dbh,DBIcf_AutoCommit) && DBIc_WARN(imp_dbh)) warn("rollback ineffective with AutoCommit enabled"); - ST(0) = dbd_db_rollback(dbh, imp_dbh) ? &sv_yes : &sv_no; + ST(0) = dbd_db_rollback(dbh, imp_dbh) ? &PL_sv_yes : &PL_sv_no; void @@ -297,14 +297,14 @@ } /* Check for disconnect() being called whilst refs to cursors */ /* still exists. This possibly needs some more thought. */ - if (DBIc_ACTIVE_KIDS(imp_dbh) && DBIc_WARN(imp_dbh) && !dirty) { + if (DBIc_ACTIVE_KIDS(imp_dbh) && DBIc_WARN(imp_dbh) && !PL_dirty) { STRLEN lna; char *plural = (DBIc_ACTIVE_KIDS(imp_dbh)==1) ? "" : "s"; warn("%s->disconnect invalidates %d active statement handle%s %s", SvPV(dbh,lna), (int)DBIc_ACTIVE_KIDS(imp_dbh), plural, "(either destroy statement handles or call finish on them before disconnecting)"); } - ST(0) = dbd_db_disconnect(dbh, imp_dbh) ? &sv_yes : &sv_no; + ST(0) = dbd_db_disconnect(dbh, imp_dbh) ? &PL_sv_yes : &PL_sv_no; DBIc_ACTIVE_off(imp_dbh); /* ensure it's off, regardless */ @@ -317,10 +317,10 @@ D_imp_dbh(dbh); if (SvGMAGICAL(valuesv)) mg_get(valuesv); - ST(0) = &sv_yes; + ST(0) = &PL_sv_yes; if (!dbd_db_STORE_attrib(dbh, imp_dbh, keysv, valuesv)) if (!DBIc_DBISTATE(imp_dbh)->set_attr(dbh, keysv, valuesv)) - ST(0) = &sv_no; + ST(0) = &PL_sv_no; void @@ -341,10 +341,10 @@ PPCODE: /* keep in sync with default DESTROY in DBI.xs */ D_imp_dbh(dbh); - ST(0) = &sv_yes; + ST(0) = &PL_sv_yes; if (!DBIc_IMPSET(imp_dbh)) { /* was never fully set up */ STRLEN lna; - if (DBIc_WARN(imp_dbh) && !dirty && DBIc_DBISTATE(imp_dbh)->debug >= 2) + if (DBIc_WARN(imp_dbh) && !PL_dirty && DBIc_DBISTATE(imp_dbh)->debug >= 2) PerlIO_printf(DBIc_LOGPIO(imp_dbh), " DESTROY for %s ignored - handle not initialised\n", SvPV(dbh,lna)); @@ -370,7 +370,7 @@ if (DBIc_WARN(imp_dbh) /* only warn if likely to be useful... */ && DBIc_is(imp_dbh, DBIcf_Executed) /* has not just called commit/rollback */ /* && !DBIc_is(imp_dbh, DBIcf_ReadOnly) -- is not read only */ - && (!dirty || DBIc_DBISTATE(imp_dbh)->debug >= 3) + && (!PL_dirty || DBIc_DBISTATE(imp_dbh)->debug >= 3) ) { warn("Issuing rollback() due to DESTROY without explicit disconnect() of %s handle %s", SvPV_nolen(*hv_fetch((HV*)SvRV(dbh), "ImplementorClass", 16, 1)), @@ -449,9 +449,9 @@ D_imp_sth(sth); DBD_ATTRIBS_CHECK("_prepare", sth, attribs); #ifdef dbd_st_prepare_sv - ST(0) = dbd_st_prepare_sv(sth, imp_sth, statement, attribs) ? &sv_yes : &sv_no; + ST(0) = dbd_st_prepare_sv(sth, imp_sth, statement, attribs) ? &PL_sv_yes : &PL_sv_no; #else - ST(0) = dbd_st_prepare(sth, imp_sth, SvPV_nolen(statement), attribs) ? &sv_yes : &sv_no; + ST(0) = dbd_st_prepare(sth, imp_sth, SvPV_nolen(statement), attribs) ? &PL_sv_yes : &PL_sv_no; #endif } @@ -495,13 +495,13 @@ } } switch(dbd_st_bind_col(sth, imp_sth, col, ref, sql_type, attribs)) { - case 2: ST(0) = &sv_yes; /* job done completely */ + case 2: ST(0) = &PL_sv_yes; /* job done completely */ break; case 1: /* fallback to DBI default */ ST(0) = (DBIc_DBISTATE(imp_sth)->bind_col(sth, col, ref, attribs)) - ? &sv_yes : &sv_no; + ? &PL_sv_yes : &PL_sv_no; break; - default: ST(0) = &sv_no; /* dbd_st_bind_col has called set_err */ + default: ST(0) = &PL_sv_no; /* dbd_st_bind_col has called set_err */ break; } } @@ -533,7 +533,7 @@ } } ST(0) = dbd_bind_ph(sth, imp_sth, param, value, sql_type, attribs, FALSE, 0) - ? &sv_yes : &sv_no; + ? &PL_sv_yes : &PL_sv_no; } @@ -568,7 +568,7 @@ } } ST(0) = dbd_bind_ph(sth, imp_sth, param, value, sql_type, attribs, TRUE, maxlen) - ? &sv_yes : &sv_no; + ? &PL_sv_yes : &PL_sv_no; } @@ -679,9 +679,9 @@ XSRETURN_YES; } #ifdef dbd_st_finish3 - ST(0) = dbd_st_finish3(sth, imp_sth, 0) ? &sv_yes : &sv_no; + ST(0) = dbd_st_finish3(sth, imp_sth, 0) ? &PL_sv_yes : &PL_sv_no; #else - ST(0) = dbd_st_finish(sth, imp_sth) ? &sv_yes : &sv_no; + ST(0) = dbd_st_finish(sth, imp_sth) ? &PL_sv_yes : &PL_sv_no; #endif @@ -713,10 +713,10 @@ D_imp_sth(sth); if (SvGMAGICAL(valuesv)) mg_get(valuesv); - ST(0) = &sv_yes; + ST(0) = &PL_sv_yes; if (!dbd_st_STORE_attrib(sth, imp_sth, keysv, valuesv)) if (!DBIc_DBISTATE(imp_sth)->set_attr(sth, keysv, valuesv)) - ST(0) = &sv_no; + ST(0) = &PL_sv_no; # FETCH renamed and ALIAS'd to avoid case clash on VMS :-( @@ -742,10 +742,10 @@ PPCODE: /* keep in sync with default DESTROY in DBI.xs */ D_imp_sth(sth); - ST(0) = &sv_yes; + ST(0) = &PL_sv_yes; if (!DBIc_IMPSET(imp_sth)) { /* was never fully set up */ STRLEN lna; - if (DBIc_WARN(imp_sth) && !dirty && DBIc_DBISTATE(imp_sth)->debug >= 2) + if (DBIc_WARN(imp_sth) && !PL_dirty && DBIc_DBISTATE(imp_sth)->debug >= 2) PerlIO_printf(DBIc_LOGPIO(imp_sth), " DESTROY for %s ignored - handle not initialised\n", SvPV(sth,lna)); @@ -758,7 +758,7 @@ } if (DBIc_ACTIVE(imp_sth)) { D_imp_dbh_from_sth; - if (!dirty && DBIc_ACTIVE(imp_dbh)) { + if (!PL_dirty && DBIc_ACTIVE(imp_dbh)) { #ifdef dbd_st_finish3 dbd_st_finish3(sth, imp_sth, 1); #else
Many thanks Andreas! Applied and uploaded as DBI-1.613_80
Subject: Re: [rt.cpan.org #59840] Compilation fails with 5.13.3
Date: Sat, 31 Jul 2010 22:48:37 +0200
To: bug-DBI [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Thu, 29 Jul 2010 16:57:51 -0400, "Andreas Koenig via RT" <bug-DBI@rt.cpan.org> wrote: Show quoted text
> Thu Jul 29 16:57:50 2010: Request 59840 was acted upon. > Transaction: Ticket created by ANDK > Queue: DBI > Subject: Compilation fails with 5.13.3 > Broken in: 1.613 > Severity: Important > Owner: Nobody > Requestors: ANDK@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=59840 > > > > The discussion has been opened on perl5-porters under the subject line > "branch blead, updated. v5.13.3-20-gcfef31b". It has been suggested that > DBI should switch to PL_* for yes/no/dirty/stack_base. > > Since my smokers are currently stalled on everything depending on DBI > I'd like to get a working DBI back. Is the attached patch the right way > to go? > > It fixes the compilation issues with perl 5.13.3 and still keeps > compatibility with 5.8.9. I haven't tried older perls.
Tested git-svn-id: http://svn.perl.org/modules/dbi/trunk@14298 50811bd7-b8ce-0310-adc1-d9db26280581 with Module::Release for --8<--- .releaserc cpan_user HMBRAND automated_testing 1 skip_kwalitee 1 skip_prereqs 1 allow_glob_in_perls 1 perls /pro/bin/perl:/pro/bin/perl5.8.8:/usr/bin/perl:/media/Tux/perls/bin/perl5.8.[1-9]:/media/Tux/perls/bin/perl5.1[0123]* -->8--- ============Testing with /media/Tux/perls/bin/perl5.8.1 Cleaning directory... no Makefile---skipping Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.8.2 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.8.3 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.8.4 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.8.5 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.8.6 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.8.7 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /pro/bin/perl5.8.8 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.8.8 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.8.9 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.10.0 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.10.1 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.11.0 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.11.1 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.11.2 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.11.3 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.11.4 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.11.5 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.12.0 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.12.1 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.13.0 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.13.1 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.13.2 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /media/Tux/perls/bin/perl5.13.3 Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /usr/bin/perl Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass ============Testing with /pro/bin/perl Cleaning directory... done Recreating make file... done Running make... done Checking make test... all tests pass Making tgzdist... Command [make tgzdist 2>&1 < /dev/null] didn't close cleanly: 512 at /pro/bin/release line 379 Use of uninitialized value $guess in concatenation (.) or string at /pro/bin/release line 386. Couldn't guess distname from dist output at /pro/bin/release line 389 Exit 9 -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Re-closing, believe fixed.