Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 70815
Status: resolved
Priority: 0/
Queue: DBD-SQLite

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

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



Subject: DBD::SQLite 1.33 build is broken under Solaris using Sun C compiler
Date: Thu, 08 Sep 2011 20:53:02 +0400
To: <bug-DBD-SQLite [...] rt.cpan.org>
From: Alexander Tokarev <nohuhu [...] nohuhu.org>
Makefile.PL has '-O2' compiler flag hardcoded, which doesn't work with Sun C Compiler. Removing this option does the trick. Regards, Alex.
Hi. Could you paste the result of "perl -V" to let us know the details of your environment? Kenichi On Thu Sep 08 12:53:17 2011, nohuhu@nohuhu.org wrote: Show quoted text
> Makefile.PL has '-O2' compiler flag hardcoded, which doesn't work
with Sun C Show quoted text
> Compiler. Removing this option does the trick. > > Regards, > Alex. > >
Subject: Re: [rt.cpan.org #70815] DBD::SQLite 1.33 build is broken under Solaris using Sun C compiler
Date: Thu, 08 Sep 2011 22:04:51 +0400
To: <bug-DBD-SQLite [...] rt.cpan.org>
From: Alexander Tokarev <nohuhu [...] nohuhu.org>
This is from Perl that comes with the system (Solaris 9). Solaris 10 has Perl 5.8.4 on board but AFAIK it is built with the same compiler using the same options. I'm pretty sure of that since I have checked it some time ago. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=solaris, osvers=2.9, archname=sun4-solaris-64int uname='sunos localhost 5.9 sun4u sparc sunw,ultra-1' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef Compiler: cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-xO3 -xdepend', cppflags='' ccversion='Sun WorkShop', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='' libpth=/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE' cccdlflags='-KPIC', lddlflags='-G' Characteristics of this binary (from libperl): Compile-time options: USE_64_BIT_INT USE_LARGE_FILES Locally applied patches: 9676 Port the OpenBSD glob() security patch 9678 Addendum to #9676: some missing changes from OpenBSD glob.c 9679 Up $File::Glob::VERSION, add OpenBSD glob version note 9693 $VERSION and Version() on same line provokes CPAN.pm warning 9706 #7210 broke .packlist generation 9707 ExtUtils::Installed doesn't quote regex metacharacters in paths 9775 Typo in utf8.h 9950 Revert integration of #8254,#8255 in #8620 (causes coredump) 10021 Insecure regexes 10091 $ref1 == $ref2 behaves unpredictably if not NV_PRESERVES_UV 10093 Incorrect line numbers in AutoSplit 10100 [20010514.027] PL_last_in_gv may not be GV if stale filehandle 10145 [20010515.004] Segfaults from premature GC 10203 Don't think about UTF8 10250 [20010422.005] perl -e '{s//${}/; //}' segfaults 10394 Leakage of file scope lexicals into predeclared subroutines 10404 eval.t was relying on pre-#10394 buggy behavior 10412 Rationalize locale handling to fix bugs uncovered by #10394 10422 Potential buffer overrun if the radix separator > 1 byte 10448 Lexicals outside eval weren't resolved correctly pre-#10394 10450 Optimize #10448 slightly 10543 Add LC_MESSAGES constant to POSIX module 10667 #10449 broke visibility of lexicals inside DB::DB() 10739 C<eval "/x$\r\n/x"> fails to compile correctly 10939 Proposed fix for Pod::Man 11169 Doc patch for Tie::Hash 11374 Make h2ph grok ccsymbols fo the form 1234L, 1234ULL etc 11427 t/harness wasn't picking up all the tests 11428 run/runenv.t needs fflushNULL sanity 11431 pod/*.t tests not picked up by t/TEST either 11510 eval 'format foo=' would loop indefinitely 11713 UTF8 wasn't printing for PVMGs 11716 UTF8 flag should be meaningful only when POK 11808 [20010831.002] Bug in Term::Cap on Solaris ansi terminal 11847 Typo in perl_clone() code causes local(*foo) breakage 12005 [20010912.007] substr reference core dump 12024 Fix local() precedence bug in #8311 12303 Fix 'local $!=0;undef*STDOUT;' segfault 12304 Pod::Html makes a poor guess at author 12350 Typo in IO::Seekable doc 12496 Carp::shortmess_heavy() doesn't notice trailing newline 12549 readline() doesn't work with 'our' variables 12550 #12549 wasn't aware of strictures 12752 croak(Nullch) wasn't printing the contents of ERRSV 12811 [20011101.069] \stat('.') gives 'free unref scalar' error 12812 Slight modification of #12811 13149 Integrate #13147 from mainline (fixes nit in #10091) 13261 Integrate #8340,#13260 from mainline Built under solaris Compiled at Apr 6 2002 14:45:34 @INC: /usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib /usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1 /usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int /usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl . Regards, Alex.
Hi. I set up Solaris 10/OpenSolaris VMs and spent some time to see what is the best way to fix this issue. As the cpantesters is not fully recovered at the moment, I don't know what other testers do, but in both cases I got various errors and ended up installing gcc, which, of course, doesn't complain about the "-O2". The easiest fix for your report should be to remove -O2 flag if $^O equals to 'solaris', but I'm not sure if it makes things better (than, for example, to recommend people to use gcc). Thoughts? On Fri Sep 09 03:05:06 2011, nohuhu@nohuhu.org wrote: Show quoted text
> This is from Perl that comes with the system (Solaris 9). Solaris 10
has Show quoted text
> Perl 5.8.4 on board but AFAIK it is built with the same compiler
using the Show quoted text
> same options. I'm pretty sure of that since I have checked it some
time Show quoted text
> ago. > > Summary of my perl5 (revision 5.0 version 6 subversion 1)
configuration: Show quoted text
> Platform: > osname=solaris, osvers=2.9, archname=sun4-solaris-64int > uname='sunos localhost 5.9 sun4u sparc sunw,ultra-1' > config_args='' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef use5005threads=undef useithreads=undef > usemultiplicity=undef > useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=define use64bitall=undef uselongdouble=undef > Compiler: > cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', > optimize='-xO3 -xdepend', > cppflags='' > ccversion='Sun WorkShop', gccversion='', gccosandvers='' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321 > d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16 Show quoted text
> ivtype='long long', ivsize=8, nvtype='double', nvsize=8, > Off_t='off_t', lseeksize=8 > alignbytes=8, usemymalloc=n, prototype=define > Linker and Libraries: > ld='cc', ldflags ='' > libpth=/lib /usr/lib /usr/ccs/lib > libs=-lsocket -lnsl -ldl -lm -lc > perllibs=-lsocket -lnsl -ldl -lm -lc > libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R > /usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE' > cccdlflags='-KPIC', lddlflags='-G' > > > Characteristics of this binary (from libperl): > Compile-time options: USE_64_BIT_INT USE_LARGE_FILES > Locally applied patches: > 9676 Port the OpenBSD glob() security patch > 9678 Addendum to #9676: some missing changes from OpenBSD glob.c > 9679 Up $File::Glob::VERSION, add OpenBSD glob version note > 9693 $VERSION and Version() on same line provokes CPAN.pm warning > 9706 #7210 broke .packlist generation > 9707 ExtUtils::Installed doesn't quote regex metacharacters in
paths Show quoted text
> 9775 Typo in utf8.h > 9950 Revert integration of #8254,#8255 in #8620 (causes coredump) > 10021 Insecure regexes > 10091 $ref1 == $ref2 behaves unpredictably if not NV_PRESERVES_UV > 10093 Incorrect line numbers in AutoSplit > 10100 [20010514.027] PL_last_in_gv may not be GV if stale
filehandle Show quoted text
> 10145 [20010515.004] Segfaults from premature GC > 10203 Don't think about UTF8 > 10250 [20010422.005] perl -e '{s//${}/; //}' segfaults > 10394 Leakage of file scope lexicals into predeclared subroutines > 10404 eval.t was relying on pre-#10394 buggy behavior > 10412 Rationalize locale handling to fix bugs uncovered by #10394 > 10422 Potential buffer overrun if the radix separator > 1 byte > 10448 Lexicals outside eval weren't resolved correctly pre-#10394 > 10450 Optimize #10448 slightly > 10543 Add LC_MESSAGES constant to POSIX module > 10667 #10449 broke visibility of lexicals inside DB::DB() > 10739 C<eval "/x$\r\n/x"> fails to compile correctly > 10939 Proposed fix for Pod::Man > 11169 Doc patch for Tie::Hash > 11374 Make h2ph grok ccsymbols fo the form 1234L, 1234ULL etc > 11427 t/harness wasn't picking up all the tests > 11428 run/runenv.t needs fflushNULL sanity > 11431 pod/*.t tests not picked up by t/TEST either > 11510 eval 'format foo=' would loop indefinitely > 11713 UTF8 wasn't printing for PVMGs > 11716 UTF8 flag should be meaningful only when POK > 11808 [20010831.002] Bug in Term::Cap on Solaris ansi terminal > 11847 Typo in perl_clone() code causes local(*foo) breakage > 12005 [20010912.007] substr reference core dump > 12024 Fix local() precedence bug in #8311 > 12303 Fix 'local $!=0;undef*STDOUT;' segfault > 12304 Pod::Html makes a poor guess at author > 12350 Typo in IO::Seekable doc > 12496 Carp::shortmess_heavy() doesn't notice trailing newline > 12549 readline() doesn't work with 'our' variables > 12550 #12549 wasn't aware of strictures > 12752 croak(Nullch) wasn't printing the contents of ERRSV > 12811 [20011101.069] \stat('.') gives 'free unref scalar' error > 12812 Slight modification of #12811 > 13149 Integrate #13147 from mainline (fixes nit in #10091) > 13261 Integrate #8340,#13260 from mainline > Built under solaris > Compiled at Apr 6 2002 14:45:34 > @INC: > /usr/perl5/5.6.1/lib/sun4-solaris-64int > /usr/perl5/5.6.1/lib > /usr/perl5/site_perl/5.6.1/sun4-solaris-64int > /usr/perl5/site_perl/5.6.1 > /usr/perl5/site_perl > /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int > /usr/perl5/vendor_perl/5.6.1 > /usr/perl5/vendor_perl > . > > > Regards, > Alex. > >
Subject: Re: [rt.cpan.org #70815] DBD::SQLite 1.33 build is broken under Solaris using Sun C compiler
Date: Sun, 11 Sep 2011 11:23:24 +0400
To: <bug-DBD-SQLite [...] rt.cpan.org>
From: Alexander Tokarev <nohuhu [...] nohuhu.org>
I think the easiest way to deal with this would be to check if we're using GCC since -O2 is GCC-specific anyway: ------------------------------- 8< ------------------------------- 313c313 < OPTIMIZE => '-O2', --- Show quoted text
> OPTIMIZE => ( $Config{'ccversion'} =~ /gcc/ ? '-O2' : '' ),
------------------------------- 8< ------------------------------- With patched Makefile.PL it compiles all right. Thanks for giving me the opportunity to learn more about Config.pm by the way. :) Regards, Alex.
Looking for the string "gcc" doesn't always work, even in $Config{cc} (instead of $Config{ccversion}, which is for a version of the compiler used to build perl), as "cc" stored in $Config{cc} is just an alias for gcc in many cases. It may be better to see if $Config{ccversion} contains the string "Sun", but anyway, I'll wait until the cpantesters' reports are back online. On Sun Sep 11 16:23:42 2011, nohuhu@nohuhu.org wrote: Show quoted text
> I think the easiest way to deal with this would be to check if we're
using Show quoted text
> GCC since -O2 is GCC-specific anyway: > > ------------------------------- 8< ------------------------------- > 313c313 > < OPTIMIZE => '-O2', > ---
> > OPTIMIZE => ( $Config{'ccversion'} =~ /gcc/ ? '-O2' :
'' ), Show quoted text
> ------------------------------- 8< ------------------------------- > > > > With patched Makefile.PL it compiles all right. > > Thanks for giving me the opportunity to learn more about Config.pm by
the Show quoted text
> way. :) > > Regards, > Alex. > >
The attached patch fixes this solaris/cc issue and also keeps the debugging -g flag, which was ignored when being overridden with -O2. checking for gcc (or the compat. clang) is done with $Config{gccversion} solaris cc uses -xO4, and my 'OPTIMIZE' => $Config{optimize} . (($^O eq 'solaris' and !$Config{gccversion}) ? "" : " -O2"), keeps this. previous non-solaris perl optimization levels are overriden by the subsequent -O2. Tested ok with solaris/cc => cc -c -I. -I/usr/perl5/site_perl/5.12/i86pc-solaris-64int/auto/DBI -DPTR_IS_LONG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -xO4 -DVERSION=\"1.38_02\" -DXS_VERSION=\"1.38_02\" -KPIC "-I/usr/perl5/5.12/lib/i86pc-solaris-64int/CORE" -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_STAT3 -DNDEBUG=1 -DHAVE_USLEEP=1 -DTHREADSAFE=0 SQLite.c On Mon Sep 12 14:21:14 2011, ISHIGAKI wrote: Show quoted text
> Looking for the string "gcc" doesn't always work, even in $Config{cc} > (instead of $Config{ccversion}, which is for a version of the compiler > used to build perl), as "cc" stored in $Config{cc} is just an alias for > gcc in many cases. It may be better to see if $Config{ccversion} > contains the string "Sun", but anyway, I'll wait until the cpantesters' > reports are back online. > > On Sun Sep 11 16:23:42 2011, nohuhu@nohuhu.org wrote:
> > I think the easiest way to deal with this would be to check if we're
> using
> > GCC since -O2 is GCC-specific anyway: > > > > ------------------------------- 8< ------------------------------- > > 313c313 > > < OPTIMIZE => '-O2', > > ---
> > > OPTIMIZE => ( $Config{'ccversion'} =~ /gcc/ ? '-O2' :
> '' ),
> > ------------------------------- 8< ------------------------------- > > > > > > > > With patched Makefile.PL it compiles all right. > > > > Thanks for giving me the opportunity to learn more about Config.pm by
> the
> > way. :) > > > > Regards, > > Alex. > > > >
> >
-- Reini Urban
Subject: rt_70815-solariscc.patch
Index: Makefile.PL =================================================================== --- Makefile.PL (revision 15751) +++ Makefile.PL (working copy) @@ -301,7 +301,7 @@ # this change broke a test under some environment, and thus, may # break other applications eventually. I'm not sure if this is # worth the trouble. - OPTIMIZE => '-O2', + OPTIMIZE => $Config{optimize} . (($^O eq 'solaris' and !$Config{gccversion}) ? "" : " -O2"), OPTIONAL( '6.48', MIN_PERL_VERSION => '5.006', ),
Applied to the trunk. Thanks. On Wed Apr 03 00:57:38 2013, RURBAN wrote: Show quoted text
> The attached patch fixes this solaris/cc issue and also keeps the > debugging -g flag, which was ignored when being overridden with > -O2. > checking for gcc (or the compat. clang) is done with > $Config{gccversion} > > solaris cc uses -xO4, and my > > 'OPTIMIZE' => $Config{optimize} . (($^O eq 'solaris' and > !$Config{gccversion}) ? "" : " -O2"), > > keeps this. > > previous non-solaris perl optimization levels are overriden by the > subsequent -O2. > > Tested ok with solaris/cc > => > cc -c -I. -I/usr/perl5/site_perl/5.12/i86pc-solaris-64int/auto/DBI > -DPTR_IS_LONG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -DPERL_USE_SAFE_PUTENV -xO4 -DVERSION=\"1.38_02\" > -DXS_VERSION=\"1.38_02\" -KPIC "-I/usr/perl5/5.12/lib/i86pc- > solaris-64int/CORE" -DSQLITE_ENABLE_FTS4 > -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE > -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_STAT3 -DNDEBUG=1 > -DHAVE_USLEEP=1 -DTHREADSAFE=0 SQLite.c > > > On Mon Sep 12 14:21:14 2011, ISHIGAKI wrote:
> > Looking for the string "gcc" doesn't always work, even in
> $Config{cc}
> > (instead of $Config{ccversion}, which is for a version of the
> compiler
> > used to build perl), as "cc" stored in $Config{cc} is just an alias
> for
> > gcc in many cases. It may be better to see if $Config{ccversion} > > contains the string "Sun", but anyway, I'll wait until the
> cpantesters'
> > reports are back online. > > > > On Sun Sep 11 16:23:42 2011, nohuhu@nohuhu.org wrote:
> > > I think the easiest way to deal with this would be to check if
> we're
> > using
> > > GCC since -O2 is GCC-specific anyway: > > > > > > ------------------------------- 8< ------------------------------- > > > 313c313 > > > < OPTIMIZE => '-O2', > > > ---
> > > > OPTIMIZE => ( $Config{'ccversion'} =~ /gcc/ ? '-
> O2' :
> > '' ),
> > > ------------------------------- 8< ------------------------------- > > > > > > > > > > > > With patched Makefile.PL it compiles all right. > > > > > > Thanks for giving me the opportunity to learn more about Config.pm
> by
> > the
> > > way. :) > > > > > > Regards, > > > Alex. > > > > > >
> > > >
>
Closed as DBD::SQLite 1.38_02 was out. Thanks. On Wed Apr 03 01:37:30 2013, ISHIGAKI wrote: Show quoted text
> Applied to the trunk. Thanks. > > On Wed Apr 03 00:57:38 2013, RURBAN wrote:
> > The attached patch fixes this solaris/cc issue and also keeps the > > debugging -g flag, which was ignored when being overridden with > > -O2. > > checking for gcc (or the compat. clang) is done with > > $Config{gccversion} > > > > solaris cc uses -xO4, and my > > > > 'OPTIMIZE' => $Config{optimize} . (($^O eq 'solaris' and > > !$Config{gccversion}) ? "" : " -O2"), > > > > keeps this. > > > > previous non-solaris perl optimization levels are overriden by the > > subsequent -O2. > > > > Tested ok with solaris/cc > > => > > cc -c -I. -I/usr/perl5/site_perl/5.12/i86pc-solaris-64int/auto/DBI > > -DPTR_IS_LONG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > > -DPERL_USE_SAFE_PUTENV -xO4 -DVERSION=\"1.38_02\" > > -DXS_VERSION=\"1.38_02\" -KPIC "-I/usr/perl5/5.12/lib/i86pc- > > solaris-64int/CORE" -DSQLITE_ENABLE_FTS4 > > -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE > > -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_STAT3 -DNDEBUG=1 > > -DHAVE_USLEEP=1 -DTHREADSAFE=0 SQLite.c > > > > > > On Mon Sep 12 14:21:14 2011, ISHIGAKI wrote:
> > > Looking for the string "gcc" doesn't always work, even in
> > $Config{cc}
> > > (instead of $Config{ccversion}, which is for a version of the
> > compiler
> > > used to build perl), as "cc" stored in $Config{cc} is just an alias
> > for
> > > gcc in many cases. It may be better to see if $Config{ccversion} > > > contains the string "Sun", but anyway, I'll wait until the
> > cpantesters'
> > > reports are back online. > > > > > > On Sun Sep 11 16:23:42 2011, nohuhu@nohuhu.org wrote:
> > > > I think the easiest way to deal with this would be to check if
> > we're
> > > using
> > > > GCC since -O2 is GCC-specific anyway: > > > > > > > > ------------------------------- 8< ------------------------------- > > > > 313c313 > > > > < OPTIMIZE => '-O2', > > > > ---
> > > > > OPTIMIZE => ( $Config{'ccversion'} =~ /gcc/ ? '-
> > O2' :
> > > '' ),
> > > > ------------------------------- 8< ------------------------------- > > > > > > > > > > > > > > > > With patched Makefile.PL it compiles all right. > > > > > > > > Thanks for giving me the opportunity to learn more about Config.pm
> > by
> > > the
> > > > way. :) > > > > > > > > Regards, > > > > Alex. > > > > > > > >
> > > > > >
> >
> >