Skip Menu |
 

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

Report information
The Basics
Id: 55100
Status: open
Priority: 0/
Queue: DBD-Informix

People
Owner: j.leffler [...] acm.org
Requestors: mstockin [...] bayerwald-fenster.de
Cc:
AdminCc:

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



Subject: Bug in Makefile.PL: C compiler not recognized
Date: Mon, 1 Mar 2010 12:53:18 +0100
To: bug-DBD-Informix [...] rt.cpan.org
From: Martin Stockinger <mstockin [...] bayerwald-fenster.de>
Download (untitled) / with headers
text/plain 835b
Hi, my configuration: - Linux uhuneu 2.6.31-gentoo-r6 #3 SMP Sat Feb 13 17:11:00 CET 2010 x86_64 Intel(R) Xeon(R) CPU X3460 @ 2.80GHz GenuineIntel GNU/Linux - perl, v5.8.8 built for x86_64-linux - DBI 1.609 - DBD-Informix 2008.0513 my problem: In the Makefile.PL line 723 there is the following statement: $Config{ld} !~ /cc$/ In my case $Config{ld} resolves to the following: $Config{ld} = "x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe" As you can see this doesn't match /cc$/ though it is a C-Compiler. The consequence is that I get the warning: "Uh oh! We're on a machine which does not use the C compiler to create shared libraries. ...." And the created shared Library "Informix.so" does not work. Please change the recognition of the C compiler. Thanks, Martin Stockinger mstockin [at] bayerwald-fenster.de
Subject: Re: [rt.cpan.org #55100] Bug in Makefile.PL: C compiler not recognized
Date: Mon, 1 Mar 2010 12:48:56 -0800
To: bug-DBD-Informix [...] rt.cpan.org, Martin Stockinger <mstockin [...] bayerwald-fenster.de>
From: Jonathan Leffler <jonathan.leffler [...] gmail.com>
Download (untitled) / with headers
text/plain 2.3k
Dear Martin, Please can you send me the details requested in the README file for a bug report. Specifically, I would like the 'perl -V' output, and also the build log. Even when the build process goes stroppy because it doesn't recognize the C compiler as a C compiler, it normally gets the right library list and things work anyway - just not as neatly as might be. I will do some work to get that fixed; it will clean up the build on MacOS X too. But, I would like to be moderately sure that I've nailed your problem. On Mon, Mar 1, 2010 at 5:41 AM, Martin Stockinger via RT < bug-DBD-Informix@rt.cpan.org> wrote: Show quoted text
> Mon Mar 01 08:41:08 2010: Request 55100 was acted upon. > Transaction: Ticket created by mstockin@bayerwald-fenster.de > Queue: DBD-Informix > Subject: Bug in Makefile.PL: C compiler not recognized > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: mstockin@bayerwald-fenster.de > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=55100 > > > > Hi, > > my configuration: > > - Linux uhuneu 2.6.31-gentoo-r6 #3 SMP Sat Feb 13 17:11:00 CET 2010 > x86_64 Intel(R) Xeon(R) CPU X3460 @ 2.80GHz GenuineIntel GNU/Linux > > - perl, v5.8.8 built for x86_64-linux > > - DBI 1.609 > > - DBD-Informix 2008.0513 > > > my problem: > > In the Makefile.PL line 723 there is the following statement: > > $Config{ld} !~ /cc$/ > > In my case $Config{ld} resolves to the following: > $Config{ld} = "x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe" > > As you can see this doesn't match /cc$/ though it is a C-Compiler. The > consequence is that I get the warning: > "Uh oh! We're on a machine which does not use the C compiler to > create shared libraries. ...." > > And the created shared Library "Informix.so" does not work. > > Please change the recognition of the C compiler. > > Thanks, > Martin Stockinger > mstockin [at] bayerwald-fenster.de >
On my Mac, the setting for 'ld' is: ld = env MACOSX_DEPLOYMENT_TARGET=10.3 cc -m64 I wonder if it is safe to use 'cc\b' in the regex? Or whether to give up on that and hope that the HP systems are better than they were when I added that message a decade or so ago. -- Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h> Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org "Blessed are we who can laugh at ourselves, for we shall never cease to be amused."
From: mstockin [...] bayerwald-fenster.de
Download (untitled) / with headers
text/plain 1.8k
Mo 01. Mar 2010, 15:50:14, jonathan.leffler@gmail.com wrote: Show quoted text
> Dear Martin, > > Please can you send me the details requested in the README file for a bug > report. > Specifically, I would like the 'perl -V' output, > and also the build log.
Hello Jonathan. thanks for your quick reply. I have attached the output of 'perl -V' and the build log. A 'ldd' of the generated Informix.so shows this: root# ldd blib/arch/auto/DBD/Informix/Informix.so linux-vdso.so.1 => (0x00007fffbf5ff000) libc.so.6 => /lib/libc.so.6 (0x00007f739a3b2000) /lib64/ld-linux-x86-64.so.2 (0x00007f739a949000) As you can see there are no links to the informix libraries. When I deleted line 723 - 799 in Makefile.PL the Informix.so is generated correct. A 'ldd' shows: root# ldd blib/arch/auto/DBD/Informix/Informix.so linux-vdso.so.1 => (0x00007fff47143000) /opt/informix/lib/esql/libifsql.so (0x00007f869a4cc000) /opt/informix/lib/libifasf.so (0x00007f869a382000) /opt/informix/lib/esql/libifgen.so (0x00007f869a21d000) /opt/informix/lib/esql/libifos.so (0x00007f869a0fb000) /opt/informix/lib/esql/libifgls.so (0x00007f8699fa9000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f8699d6c000) libm.so.6 => /lib/libm.so.6 (0x00007f8699ae9000) libdl.so.2 => /lib/libdl.so.2 (0x00007f86998e4000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f86996ac000) /opt/informix/lib/esql/libifglx.so (0x00007f86995ab000) libc.so.6 => /lib/libc.so.6 (0x00007f8699250000) /lib64/ld-linux-x86-64.so.2 (0x00007f869a840000) Show quoted text
> > On my Mac, the setting for 'ld' is: > > ld = env MACOSX_DEPLOYMENT_TARGET=10.3 cc -m64 > > I wonder if it is safe to use 'cc\b' in the regex?
Don't think so. See my ld: ld='x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe' Thanks, Martin
Subject: gentoo_DBD-Informix_build.log

Message body is not shown because it is too large.

Subject: esql_-libs.txt
Download esql_-libs.txt
text/plain 126b
root# esql -libs -lifsql -lifasf -lifgen -lifos -lifgls -lpthread -lm -ldl -lcrypt /opt/informix/lib/esql/checkapi.o -lifglx
Subject: perl_-V.txt
Download perl_-V.txt
text/plain 3k
root# perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.31-gentoo-r6, archname=x86_64-linux uname='linux uhuneu 2.6.31-gentoo-r6 #3 smp sat feb 13 17:11:00 cet 2010 x86_64 intel(r) xeon(r) cpu x3460 @ 2.80ghz genuineintel gnulinux ' config_args='-des -Darchname=x86_64-linux -Dcccdlflags=-fPIC -Dccdlflags=-rdynamic -Dcc=x86_64-pc-linux-gnu-gcc -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dlocincpth= -Doptimize=-march=core2 -O2 -pipe -Duselargefiles -Dd_semctl_semun -Dscriptdir=/usr/bin -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dinstallman1dir=/usr/share/man/man1 -Dinstallman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dinc_version_list=5.8.0 5.8.0/x86_64-linux 5.8.2 5.8.2/x86_64-linux 5.8.4 5.8.4/x86_64-linux 5.8.5 5.8.5/x86_64-linux 5.8.6 5.8.6/x86_64-linux 5.8.7 5.8.7/x86_64-linux -Dcf_by=Gentoo -Ud_csh -Dusenm -Di_ndbm -Di_gdbm -Di_db -Dusrinc=/usr/include -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='x86_64-pc-linux-gnu-gcc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-march=core2 -O2 -pipe', cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/include/gdbm' ccversion='', gccversion='4.3.4', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe', ldflags =' -L/usr/local/lib64' libpth=/usr/local/lib64 /lib64 /usr/lib64 libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.10.1.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.10.1' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib64' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO Built under linux Compiled at Mar 1 2010 11:06:22 %ENV: PERL5LIB="/global/common/perl" @INC: /global/common/perl /etc/perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux /usr/lib64/perl5/vendor_perl/5.8.8 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux /usr/lib64/perl5/site_perl/5.8.8 /usr/lib64/perl5/site_perl /usr/lib64/perl5/5.8.8/x86_64-linux /usr/lib64/perl5/5.8.8 /usr/local/lib/site_perl .
Subject: Re: [rt.cpan.org #55100] Bug in Makefile.PL: C compiler not recognized
Date: Mon, 1 Mar 2010 14:44:03 -0800
To: bug-DBD-Informix [...] rt.cpan.org, Martin Stockinger <mstockin [...] bayerwald-fenster.de>
From: Jonathan Leffler <jonathan.leffler [...] gmail.com>
Download (untitled) / with headers
text/plain 7.6k
Dear Martin, Thanks for providing the full diagnostic output - it definitely helps... On Mon, Mar 1, 2010 at 1:33 PM, Martin Stockinger via RT < bug-DBD-Informix@rt.cpan.org> wrote: Show quoted text
> Queue: DBD-Informix > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=55100 > > > Mo 01. Mar 2010, 15:50:14, jonathan.leffler@gmail.com wrote:
> > Dear Martin, > > > > Please can you send me the details requested in the README file for a bug > > report. > > Specifically, I would like the 'perl -V' output, > > and also the build log.
> > Hello Jonathan. > > thanks for your quick reply. > > I have attached the output of 'perl -V' and the build log. > A 'ldd' of the generated Informix.so shows this: > > root# ldd blib/arch/auto/DBD/Informix/Informix.so > linux-vdso.so.1 => (0x00007fffbf5ff000) > libc.so.6 => /lib/libc.so.6 (0x00007f739a3b2000) > /lib64/ld-linux-x86-64.so.2 (0x00007f739a949000) >
Ouch... Show quoted text
> As you can see there are no links to the informix libraries. > > When I deleted line 723 - 799 in Makefile.PL the Informix.so is > generated correct. A 'ldd' shows: > > root# ldd blib/arch/auto/DBD/Informix/Informix.so > linux-vdso.so.1 => (0x00007fff47143000) > /opt/informix/lib/esql/libifsql.so (0x00007f869a4cc000) > /opt/informix/lib/libifasf.so (0x00007f869a382000) > /opt/informix/lib/esql/libifgen.so (0x00007f869a21d000) > /opt/informix/lib/esql/libifos.so (0x00007f869a0fb000) > /opt/informix/lib/esql/libifgls.so (0x00007f8699fa9000) > libpthread.so.0 => /lib/libpthread.so.0 (0x00007f8699d6c000) > libm.so.6 => /lib/libm.so.6 (0x00007f8699ae9000) > libdl.so.2 => /lib/libdl.so.2 (0x00007f86998e4000) > libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f86996ac000) > /opt/informix/lib/esql/libifglx.so (0x00007f86995ab000) > libc.so.6 => /lib/libc.so.6 (0x00007f8699250000) > /lib64/ld-linux-x86-64.so.2 (0x00007f869a840000) > >
That's better... Show quoted text
> > On my Mac, the setting for 'ld' is: > > ld = env MACOSX_DEPLOYMENT_TARGET=10.3 cc -m64 > > I wonder if it is safe to use 'cc\b' in the regex?
Don't think so. See my ld: Show quoted text
> ld='x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe' >
Unless I'm misremembering, \b matches a word boundary, and therefore 'cc\b' would match the cc at the end of a word or at the end of the string. Show quoted text
> > root# ebuild > /usr/local/overlays/local/perl-gcpan/DBD-Informix/DBD-Informix-2008.0513.ebuild > compile
> >>> Existing ${T}/environment for 'DBD-Informix-2008.0513' will be > >>> sourced. Run 'clean' to start with a fresh environment.
> * DBD-Informix-2008.0513.tar.gz RMD160 SHA1 SHA256 size ;-) ... > > [ ok ] > *[...] > > Configuring IBM Informix Database Driver for Perl DBI Version 2008.0513 > (2008-05-13) (aka DBD::Informix) > You are using DBI version 1.609 and Perl version 5.008008 > Remember to actually read the README file! > > Perl: /usr/bin/perl5.8.8 v5.008008 x86_64-linux dl_dlopen.xs > System: linux uhuneu 2.6.31-gentoo-r6 #3 smp sat feb 13 17:11:00 cet 2010 > x86_64 intel(r) xeon(r) cpu x3460 @ 2.80ghz genuineintel gnulinux > *** Ideally, you should upgrade to Perl version 5.010000 or later. > > Using INFORMIXDIR=/opt/informix and ESQL/C compiler esql > Using IBM Informix CSDK Version 3.50, IBM Informix-ESQL Version 3.50.FC6 > from /opt/informix > > [...] > > Testing whether your Informix test environment will work... > esqltest.ec: In function 'ix_printerr': > esqltest.ec:90: warning: format '%ld' expects type 'long int', but > argument 3 has type 'int4' >
I'll need to fix that if I've not already done so. Show quoted text
> ESQLTEST Program Running: > @(#)$Id: esqltest.ec,v 2008.1 2008/05/13 23:13:10 jleffler Exp $ > $INFORMIXDIR is set to '/opt/informix'. > $INFORMIXSERVER is set to 'onltuxtcp'. > $DBI_DBNAME unset - defaulting to 'stores'. > $DBD_INFORMIX_DATABASE set to 'stores7'. > $DBD_INFORMIX_DATABASE2 unset - defaulting to 'stores7'. > $DBD_INFORMIX_USERNAME is set to 'dpauli'. > $DBD_INFORMIX_USERNAME2 is unset - defaulting to 'dpauli'. > $DBD_INFORMIX_PASSWORD is set. > $DBD_INFORMIX_PASSWORD2 is unset - defaulting to > $DBD_INFORMIX_PASSWORD. > Testing connection to stores7 > CONNECT TO 'stores7' with user info > Testing concurrent connection to stores7 > CONNECT TO 'stores7' with user info > Your Informix environment is (probably) OK > > Uh oh! We're on a machine which does not use the C compiler to > create shared libraries. Please consider recompiling Perl using > the C compiler to create shared libraries; it makes life much > easier for everyone! > Fortunately, you are using a new version of ESQL/C. We could > use 'esql -libs' to tell us which libraries to use, except that > some versions of the esql script are very Clintonian and do not > tell us the whole truth. So we have to do a fiddly workaround, > editing the esql script on the fly and feeding the edited > version to the shell and ... Oh, you really don't want to know > what we do; it's horrid but it works, usually! > ... We are going to use the library list: > -lifsql -lifasf -lifgen -lifos -lifgls -lpthread -lm -ldl -lcrypt > /opt/informix/lib/esql/checkapi.o -lifglx >
This list is correct - well, we can argue about why -lcrypt is in there, but that's not your fault (and -ldl is not necessary, and I'm not sure why the threads library is in there yet, but maybe you're building for a multi-threaded Perl in some guise. But the list is substantially correct. Show quoted text
> Checking if your kit is complete... > Looks good > Using DBI 1.609 (for perl 5.008008 on x86_64-linux) installed in > /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux/auto/DBI/ > Writing Makefile for DBD::Informix > make -j8 OTHERLDFLAGS=-Wl,-O1 > /usr/bin/perl5.8.8 -p -e "s/~DRIVER~/Informix/g" > /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux/auto/DBI/Driver.xst > > Informix.xsi > [...] > rm -f dbdimp.c > rm -f blib/arch/auto/DBD/Informix/Informix.so > x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -shared -L/usr/local/lib64 > Informix.o dbdimp.o dbdattr.o sqltoken.o sqltype.o ixblob.o odbctype.o > kludge.o link.o esqlcver.o esqlc_v6.o -Wl,-O1 -o > blib/arch/auto/DBD/Informix/Informix.so \ > \ > > chmod 755 blib/arch/auto/DBD/Informix/Informix.so >
Oh dear - what happened to that nice list of libraries that we generated? Short answer - they are MIA (missing in action). They should have been listed on the command line here that generates Informix.so. They're missing. Drat. Please can you send me a copy of the generated Makefile...it is about as dire as that sounds. The trouble is only marginally related to the complaints about linkers vs compilers for creating shared libraries. The reason for wanting to see the makefile is that there are a number of make macros used to supply the libraries to that command that have worked for a long time, but are now, apparently, invalid. I'm not dreadfully surprised (more like - I'm surprised it hasn't been a problem sooner), but I will need to see what is in the makefile to work out what I can do. Well, that and rescrutinizing the man pages (perldoc) for ExtUtils etc. Show quoted text
> Manifying blib/man1/InformixTechSupport.1 > [...] >
Thanks for the 'perl -V' information. It isn't a threaded Perl, leaving me wondering why ESQL/C is insisting on linking with -lpthread. However, I can't do an awful lot about that. But we can try to work out why the shared library command line is not including the Informix libraries, and probably we can give you a workaround to get you running. -- Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h> Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org "Blessed are we who can laugh at ourselves, for we shall never cease to be amused."
Download (untitled) / with headers
text/html 10.3k
From: mstockin [...] bayerwald-fenster.de
Download (untitled) / with headers
text/plain 2.5k
Dear Jonathan, Mo 01. Mär 2010, 17:45:25, jonathan.leffler@gmail.com wrote: Show quoted text
> > > > I wonder if it is safe to use 'cc\b' in the regex?
> > Don't think so. See my ld:
> > ld='x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe' > >
> > Unless I'm misremembering, \b matches a word boundary, and therefore > 'cc\b' > would match the cc at the end of a word or at the end of the string.
Yes you are right. I overlooked this. Show quoted text
> > ... We are going to use the library list: > > -lifsql -lifasf -lifgen -lifos -lifgls -lpthread -lm -ldl -lcrypt > > /opt/informix/lib/esql/checkapi.o -lifglx > >
> > This list is correct - well, we can argue about why -lcrypt is in > there, but >
> > x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -shared > > -L/usr/local/lib64 Informix.o dbdimp.o dbdattr.o sqltoken.o > > sqltype.o ixblob.o odbctype.o kludge.o link.o esqlcver.o > > esqlc_v6.o -Wl,-O1 -o blib/arch/auto/DBD/Informix/Informix.so
> > Oh dear - what happened to that nice list of libraries that we > generated? > Short answer - they are MIA (missing in action). They should have > been > listed on the command line here that generates Informix.so. They're > missing. > > Drat. > > Please can you send me a copy of the generated Makefile...it is about > as > dire as that sounds. > > The trouble is only marginally related to the complaints about linkers > vs > compilers for creating shared libraries.
I wanted to send you the "Makefile". So I reproduced the steps to get the Makefile. Doing so I found the reason for the missing informix links. It deals with the way of doing the configuration and compilation of 'gentoo'. Here is the excerpt of the important steps what the gentoo build system does: gentoo# perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor INSTALLMAN3DIR=none DESTDIR=/var/tmp/portage/perl-gcpan/DBD-Informix-2008.0513/image/ -> this produces the attached 'Makefile'. This 'Makefile' is not wrong, I think. But in the next step it comes: gentoo# make OTHERLDFLAGS=-Wl,-O1 -> make is called with 'OTHERLDFLAGS=-Wl,-O1' and all the wonderful informix libraries are gone, because they are in the same variable 'OTHERLDFLAGS' in the Makefile. I think there are two separat problems: 1. the C-Compiler is not reconized 2. the gentoo build system overwrites the OTHERLDFLAGS variable I don't know how to fix this best. Show quoted text
> probably we can give you a workaround to get you running
I have already a workaround. As posted before, I deleted the lines dealing with the recognition of the C-compiler in Makefile.PL and continued the gentoo build process manually. Thanks, Martin
Subject: Makefile
Download Makefile
application/octet-stream 35.4k

Message body not shown because it is not plain text.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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