On Thu, 10 Jan 2002, Jonathan Leffler wrote:
>-------- Original Message --------
>Subject: Can't load
>'/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/auto/DBD/Informix/Informix.so
>
>Date: Mon, 7 Jan 2002 14:44:18 -0500
>From: "Ray Jenkins" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>
Sorry for the delay responding.
The answer is at the bottom - the rest of the commentary is how I got to
the final answer.
>This is my first post so if I leave some stuff out or have made any
>mistakes in posting "protocol" please let me know....
>
>I'm currently encountering a TYPE C failure when trying to use
>DBD-Informix and I suspect I know what the problem is but have been
>unable to verify that it is so... I don't believe it is actually a
>DBD-Informix problem but rather a result of the environment I've built
>it in..... I have seen Jonathan answer similar questions but
>unfortunately haven't been able to gleem the answer from those
>posts....If someone could confirm my suspicions for me or perhaps point
>me in the right direction it would be most appreciated....
>
>A few caveats though...
>
>1.) I do not have root access on the box I am building Informix-DBD
>on...
That makes life trickier. Depending on the context, you can rig the
system to build and install your own version of Perl and simply use that
(it's what I do all the time), or you can follow the guidelines about
how to install modules in a directory outside the main Perl installation
hierarchy -- such guidelines must exist, but I don't have a good
reference to cite.
>2.) I have been forced to use a "prebuilt" version of perl... this is
>for various reasons but namely the firm I work for offers a Perl API for
>it's application which contains perl modules that act as wrappers to one
>of those ummmm...yeah... nice java based "pub/sub message bus"
>technologies which my firms app resides upon... The pub/sub stuff is
>compiled with cc and we do not have the source for it therefore my perl
>distro is built with solaris "cc" (see #4)
So, you need to find the guidelines I referred to.
>3.) I do not have admin privledges to the databases...(The box I am
>building DBD-Informix on is a clients production server... It is for
>Cisco Wan Manager... that uses informix as it underlying database....)
>Therefore I have not created a "stores" database.... But can access the
>server Cisco Wan Manager databases just fine using dbaccess......
That's a nuisance, but not insuperable.
There's the kludge - you can probably create a database just for the
purposes of testing, or get the DBAs to create one for you. It won't
grow very big; I've not done the measurements, but if it grew to 1 MB
over the size of the system catalog, I'd be astonished. However,
creating one for yourself may get you into hot water. Failing that, if
there is a database where you have RESOURCE privilege instead of DBA
privilege, you may be able to get enough tests to run sufficiently well
to give you some confidence that things would work OK. If you are only
allowed CONNECT privilege to databases, then the existing test suite
will not work well. Note, incidentally, that a couple of the tests do
create and drop databases, just to make sure you can.
>4.) My pre-built version of perl has been compiled with solaris "cc"....
OK; you must have access to the Solaris cc compiler. If you don't have that,
you are sunk -- 100% completely sunk.
>5.) The box that I am building DBD-Informix on does not have cc.... so I
>am using GNU gcc to build DBD-Informix....
Won't work. There are too many minor differences to even start thinking
about it. To install software to work with Perl, you need privileges to
install software, and you need the correct C compiler. Those are more
or less non-negotiable; anything else is ludicrous. Tell them that it
would be as easy to do your job if they tied you up in a room with no
electricity as to do it without the correct equipment.
>------------------------------------------------------------------------
>
>DBI and DBD both build fine and make install without any problems....
Really? You must have done some kludging since GCC does not like the
Solaris -KPIC or -Kpic option (it uses -fPIC or -fpic).
>I have changes "stores7" to an actual database on my informix server
>that I can access using "dbaccess"....when I execute the following perl
>script I get the error message listed below....
>
>
>#!/opt/OpenRiver/Solaris2/contrib/perl/bin/perl
>#
># DBD::Informix Example 1 - fetchall_arrayref
>#
># @(#)$Id: x01fetchall.pl,v 61.1 1998/10/27 19:14:59 jleffler Exp $
>#
># Jonathan Leffler ([EMAIL PROTECTED])
>
>use DBI;
>$dbh = DBI->connect("DBI:Informix:stratacom");
>$sth = $dbh->prepare(q%SELECT * from node%);
>$sth->execute(106);
>$ref = $sth->fetchall_arrayref();
>for $row (@$ref)
>{
> print "Name: $$row[0] $$row[1], Phone: $$row[2]\n";
>}
>$dbh->disconnect;
>
>install_driver(Informix) failed: Can't load
>'/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-s
>olaris/auto/DBD/Informix/Informix.so' for module DBD::Informix: ld.so.1:
>perl: fatal: relocation error: file
>
>/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/au
>to/DBD/Informix/Informix.so: symbol
> SQLSTATE: referenced symbol not found at
>/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solari
>s/DynaLoader.pm line 169, chunk 140.
OK, can't find SQLSTATE. Could mean any of a number of things.
Question: which version of ESQL/C are you using. The server version
(from DB-Access) is 9.20 (and should probably be upgraded, but that's
another story), and the version of ESQL/C is 9.30 - a long way down the
message - corresponding to CSDK 9.40. I assume that the same version of
ESQL/C (CSDK) is installed on the target machine (a no-op no-brainer if
it is the same as the build machine).
You're using DBD::Informix 0.95; please upgrade to DBD::Informix
1.00.PC1. That version is itself fairly antique, dating to March 2000,
but it is the current official release (there's an unofficial 1.01.PC1
release, but it doesn't provide anything to fix this problem).
>------------------------------------------------------------------------
>
>DynaLoader complains about not being able to load the Informix.so
>module.... It also errors out when looking for SQLSTATE in the symbol
>table when it can't open it....
>
>Just to make sure I checked Informix.so and SQLSTATE is defined.....
>
>nm Informix.so
>[588] | 0| 0|NOTY |GLOB |0 |UNDEF |SQLSTATE
The question is - which of the Informix libraries in $INFORMIXDIR/lib
and $INFORMIXDIR/lib/esql provides that definition, and the answer
should be lib/esql/libixsql.so (it is on my copy).
Did you build with DBD_INFORMIX_RELOCATABLE_INFORMIXDIR set? If not, then
it should not matter what is set in LD_LIBRARY_PATH as the library locations
are fixed at compile time via the -R flags. If you omitted these in your
build, then you might need to put them back in.
>I think the problem is that perl is built with "cc" and the informix.so
>shared object has been created with "gcc"... and perhaps there is some
>discrepancy between what dynaloader expects the symbol table to look
>like... assuming it was built with cc rather than gcc.......
Does your version of GCC use the Solaris linker (ld) or the GNU version?
If it uses the GNU version, you will need to be very worried. If it uses
the Solaris version, then you should be OK since the Solaris C compiler also
uses that.
>Any Help in this matter would be greatly appreciated....
Get the correct C compiler. This is the simplest solution. By far.
The next simplest solution is to rebuild Perl with the GNU C compiler.
Either of those should make the problems vanish automatically. While
you're kludging your way around the incompatibilities between Solaris
and GNU C compilers, anything could go wrong and lots probably will.
>Best Regs,
>Ray Jenkins
>Technical Architect
>Riversoft Inc.
>678-852-8873
>www.riversoft.com
>
>
>Output requested from bug.reports......
>
>------------------------------------------------------------------------
>------
>
>SECTION 1:
>
>esql -V :
>
>INFORMIX-ESQL Version 9.30.UC1
>Software Serial Number AAC#J859236
>
>
>perl -V :
>
>Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
> Platform:
> osname=solaris, osvers=2.6, archname=sun4-solaris
> uname='sunos chang 5.6 generic_105181-10 sun4u sparc sunw,ultra-5_10
>'
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=undef useperlio=undef d_sfio=undef
> Compiler:
> cc='cc', optimize='-O', gccversion=
> cppflags=''
> ccflags =''
> stdchar='unsigned char', d_stdstdio=define, usevfork=false
> intsize=4, longsize=4, ptrsize=4, doublesize=8
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
> alignbytes=8, usemymalloc=y, prototype=define
> Linker and Libraries:
> ld='cc', ldflags =''
> libpth=/lib /usr/lib /usr/ccs/lib
> libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
> libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
> cccdlflags='-KPIC', lddlflags='-G'
>Characteristics of this binary (from libperl):
> Built under solaris
> Compiled at Sep 1 2000 14:43:53
> %ENV:
> PERL="/opt/OpenRiver/Solaris2/contrib/perl"
>
>PERLLIB="/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-sol
>aris:/opt/OpenRiver/Solaris2/con
>trib/perl/lib/site_perl/sun4-solaris"
> @INC:
> /opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
> /opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/sun4-solaris
> /opt/OpenRiver/Solaris2/contrib/perl/lib/5.00503/sun4-solaris
> /opt/OpenRiver/Solaris2/contrib/perl/lib/5.00503
>
>/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris
> /opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005
>
>
>dbacess -V:
>
>DB-Access Version 9.20.UC3
>Software Serial Number AAC#J859235
>
>------------------------------------------------------------------------
>-------------------------------
>SECTION 2:
>
>env | sort :
>
>DBD_INFORMIX_DATABASE=stratacom
>DBD_INFORMIX_PASSWORD=xxxxxxxx
>DBD_INFORMIX_USERNAME=xxxxxxxx
>DBI_DBNAME=stratacom
>EDITOR=vi
>HISTSIZE=10000
>HOME=/users/riversoft
>INFORMIXDIR=/usr/users/informix
>INFORMIXSERVER=totlccwm1
>LD_LIBRARY_PATH=/usr/users/informix/lib/esql:/usr/users/informix/lib:/op
>t/OpenRiver/Solaris2/contrib/perl/li
>b/site_perl/5.005/sun4-solaris/auto/DBD/Informix:.
>LOGNAME=riversoft
>MAIL=/var/mail/riversoft
>O=/local/OpenRiver/Solaris2
>ORV_DOMAIN=NMS
>ORV_HOME=/local/OpenRiver/Solaris2
>PATH=/usr/users/informix:/usr/users/informix/bin:/opt/OpenRiver/Solaris2
>/contrib/perl/bin:/usr/bin:/usr/ucb:
>/etc:/usr/sbin:/usr/ucb:/etc:/opt/SUNWspro/bin:/usr/local/bin:/usr/openw
>in/bin:/usr/dt/bin:/usr/opt/SUNWmd/s
>bin:/usr/ccs/bin:/usr/platform/sun4u/sbin/:/opt/NSCPcom:/usr/atria/bin:/
>usr/bin/nsr:/usr/sbin/nsr:/opt/SUNWv
>xva/bin:/usr/local/etc:/opt/Omnibus/bin:/opt/perl/bin:/opt/perl/lib:/usr
>/local/bin:/usr/local/netscape:/loca
>l/OpenRiver/Solaris2/bin:/local/OpenRiver/Solaris2/plug-ins:/local/OpenR
>iver/Solaris2/scripts:/opt/rv/bin:/o
>pt/perl/bin:/opt/perl/lib:/opt/perl/man:/local/OpenRiver/Solaris2/contri
>b:/usr/local/bin/:/local/OpenRiver/S
>olaris2/apache/bin:/var/opt/oracle/app/oracle/product/8.0.5/bin
>PERL=/opt/OpenRiver/Solaris2/contrib/perl
>PERLLIB=/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-so
>laris/DBD:/opt/OpenRiver/Solaris2/co
>ntrib/perl/lib/site_perl/5.005/sun4-solaris/Bundle/DBD:/opt/OpenRiver/So
>laris2/contrib/perl/lib/site_perl/5.
>005/sun4-solaris/auto/DBD/Informix:/opt/OpenRiver/Solaris2/contrib/perl/
>lib/perl5/5.00503/sun4-solaris:/opt/
>OpenRiver/Solaris2/contrib/perl/lib/site_perl/sun4-solaris
>PS1=$UNAME@$PWD>
>PWD=/users/riversoft/DBD-Informix-0.95
>RV=/opt/rv
>SHELL=/bin/ksh
>SSH_CLIENT=207.225.133.50 3413 22
>SSH_TTY=/dev/pts/9
>TERM=xterm
>TZ=US/Central
>UNAME=totlccwm1
>USER=riversoft
>_=/usr/bin/env
>
>------------------------------------------------------------------------
>----------------------------------
>SECTION 3:
>
>Error Message:
>
>install_driver(Informix) failed: Can't load
>'/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-s
>olaris/auto/DBD/Informix/Informix.so' for module DBD::Informix: ld.so.1:
>perl: fatal: relocation error: file
>
>/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/au
>to/DBD/Informix/Informix.so: symbol
> SQLSTATE: referenced symbol not found at
>/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solari
>s/DynaLoader.pm line 169, chunk 140.
>
>
>nm
>/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/au
>to/DBD/Informix/Informix.so | gre
>p SQL
>
>[588] | 0| 0|NOTY |GLOB |0 |UNDEF |SQLSTATE
>
>------------------------------------------------------------------------
>-----
>
>SECTION 4:
>
>more Makefile.PL.out
>
>Configuring DBD::Informix version 0.95...
> You are using DBI version 1.20 and Perl version 5.00503
>Remember to actually read the README file!
>
>Perl: perl5.00503 sun4-solaris dl_dlopen.xs
>System: sunos chang 5.6 generic_105181-10 sun4u sparc sunw,ultra-5_10
>Compiler: cc -O
>
>Using INFORMIX-ESQL Version 9.30.UC1 from /usr/users/informix
>
>Beware: DBD::Informix is not yet aware of all the new IUS data types.
>
>Assert macro will be disabled!
>
>Testing whether your Informix test environment will work...
>ESQLTEST Program Running:
>@(#)$Id: esqltest.ec,v 95.2 1999/12/30 23:08:49 jleffler Exp $
> $DBI_DBNAME set to 'stratacom'.
> $DBD_INFORMIX_DATABASE set to 'stratacom'.
> $DBD_INFORMIX_DATABASE2 unset - defaulting to 'stratacom'.
> $DBD_INFORMIX_USERNAME is set to 'svplus'.
> $DBD_INFORMIX_USERNAME2 is unset.
> $DBD_INFORMIX_PASSWORD is unset.
> $DBD_INFORMIX_PASSWORD2 is unset.
>Testing connection to stratacom
>!!! DBD_INFORMIX_USERNAME & DBD_INFORMIX_PASSWORD are ignored
> unless both variables are set.
> CONNECT - no user info (connection_1)
>Testing concurrent connection to stratacom
> CONNECT - no user info (connection_2)
>Your Informix environment is (probably) OK
>
>Checking if your kit is complete...
>Looks good
>Using DBI 1.20 installed in
>/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/au
>to/DBI
>Writing Makefile for DBD::Informix
>
>------------------------------------------------------------------------
>------
>SECTION 5:
>
>more make.stdout
>
>mkdir blib
>mkdir blib/lib
>mkdir blib/lib/DBD
>mkdir blib/arch
>mkdir blib/arch/auto
>mkdir blib/arch/auto/DBD
>mkdir blib/arch/auto/DBD/Informix
>mkdir blib/lib/auto
>mkdir blib/lib/auto/DBD
>mkdir blib/lib/auto/DBD/Informix
>mkdir blib/man3
>cp Informix.pm blib/lib/DBD/Informix.pm
>cp lib/Bundle/DBD/Informix.pm blib/lib/Bundle/DBD/Informix.pm
>/opt/OpenRiver/Solaris2/contrib/perl/bin/perl -p -e
>"s/~DRIVER~/Informix/g" < /opt/OpenRiver/Solaris2/contri
>b/perl/lib/site_perl/5.005/sun4-solaris/auto/DBI/Driver.xst >
>Informix.xsi
>/opt/OpenRiver/Solaris2/contrib/perl/bin/perl
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-
>solaris -I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503
>/opt/OpenRiver/Solaris2/contrib/perl/lib/pe
>rl5/5.00503/ExtUtils/xsubpp -typemap
>/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/ExtUtils/typema
>p Informix.xs >xstmp.c && mv xstmp.c Informix.c
>gcc -c -I/usr/users/informix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
>/auto/DBI
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/
>auto/DBI -O -DVERSION
>=\"0.95\" -DXS_VERSION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
>/CORE -DESQLC_VERSION=930 -DNDEBUG Informix.c
>INFORMIXC="/opt/OpenRiver/Solaris2/contrib/perl/bin/perl esqlcc"
>ESQLCC="gcc" esql -c -shared -I/usr/users/i
>nformix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/au
>to/DBI -I/opt/Open
>River/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/auto/DBI
>-O -DVERSION=\"0.95\" -DXS_VERS
>ION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/CO
>RE -DESQLC_VERSIO
>N=930 -DNDEBUG dbdimp.ec
>rm -f dbdimp.c
>INFORMIXC="/opt/OpenRiver/Solaris2/contrib/perl/bin/perl esqlcc"
>ESQLCC="gcc" esql -c -shared -I/usr/users/i
>nformix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/au
>to/DBI -I/opt/Open
>River/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/auto/DBI
>-O -DVERSION=\"0.95\" -DXS_VERS
>ION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/CO
>RE -DESQLC_VERSIO
>N=930 -DNDEBUG dbdattr.ec
>rm -f dbdattr.c
>gcc -c -I/usr/users/informix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
>/auto/DBI
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/
>auto/DBI -O -DVERSION
>=\"0.95\" -DXS_VERSION=\"0.95\" -fPIC/CORE -DESQLC_VERSION=930 -DNDEBUG
>sqltoken.c
>INFORMIXC="/opt/OpenRiver/Solaris2/contrib/perl/bin/perl esqlcc"
>ESQLCC="gcc" esql -c -shared -I/usr/users/i
>nformix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/au
>to/DBI -I/opt/Open
>River/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/auto/DBI
>-O -DVERSION=\"0.95\" -DXS_VERS
>ION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/CO
>RE -DESQLC_VERSIO
>N=930 -DNDEBUG sqltype.ec
>rm -f sqltype.c
>INFORMIXC="/opt/OpenRiver/Solaris2/contrib/perl/bin/perl esqlcc"
>ESQLCC="gcc" esql -c -shared -I/usr/users/i
>nformix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/au
>to/DBI -I/opt/Open
>River/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/auto/DBI
>-O -DVERSION=\"0.95\" -DXS_VERS
>ION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/CO
>RE -DESQLC_VERSIO
>N=930 -DNDEBUG ixblob.ec
>rm -f ixblob.c
>gcc -c -I/usr/users/informix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
>/auto/DBI
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/
>auto/DBI -O -DVERSION
>=\"0.95\" -DXS_VERSION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
>/CORE -DESQLC_VERSION=930 -DNDEBUG decsci.c
>gcc -c -I/usr/users/informix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
>/auto/DBI
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/
>auto/DBI -O -DVERSION
>=\"0.95\" -DXS_VERSION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
>/CORE -DESQLC_VERSION=930 -DNDEBUG odbctype.c
>gcc -c -I/usr/users/informix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
>/auto/DBI
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/
>auto/DBI -O -DVERSION
>=\"0.95\" -DXS_VERSION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris
>/CORE -DESQLC_VERSION=930 -DNDEBUG link.c
>INFORMIXC="/opt/OpenRiver/Solaris2/contrib/perl/bin/perl esqlcc"
>ESQLCC="gcc" esql -c -shared -I/usr/users/i
>nformix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/au
>to/DBI
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/
>auto/DBI -O -DVERSION=\"0.95\" -DXS_VERS
>ION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/CO
>RE -DESQLC_VERSIO
>N=930 -DNDEBUG esqlcver.ec
>rm -f esqlcver.c
>INFORMIXC="/opt/OpenRiver/Solaris2/contrib/perl/bin/perl esqlcc"
>ESQLCC="gcc" esql -c -shared -I/usr/users/i
>nformix/incl/esql
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/au
>to/DBI -I/opt/Open
>River/Solaris2/contrib/perl/lib/site_perl/5.005/sun4-solaris/auto/DBI
>-O -DVERSION=\"0.95\" -DXS_VERS
>ION=\"0.95\" -fPIC
>-I/opt/OpenRiver/Solaris2/contrib/perl/lib/perl5/5.00503/sun4-solaris/CO
>RE -DESQLC_VERSIO
>N=930 -DNDEBUG esqlc_v6.ec
>rm -f esqlc_v6.c
>Running Mkbootstrap for DBD::Informix ()
>chmod 644 Informix.bs
>LD_RUN_PATH="" gcc -o blib/arch/auto/DBD/Informix/Informix.so -G
>Informix.o dbdimp.o dbdattr.o sqltoken.o s
>qltype.o ixblob.o decsci.o odbctype.o link.o esqlcver.o esqlc_v6.o
>-R/usr/users/informix/lib -R/usr/users/in
>formix/lib/esql
>chmod 755 blib/arch/auto/DBD/Informix/Informix.so
>cp Informix.bs blib/arch/auto/DBD/Informix/Informix.bs
>chmod 644 blib/arch/auto/DBD/Informix/Informix.bs
>Manifying blib/man3/Bundle::DBD::Informix.3
>Manifying blib/man3/DBD::Informix.3
FWIW, on my Perl 5.6.1 installation of DBD::Informix 1.00.PC1 with GCC
and ESQL/C 9.51.UC1 (CSDK 2.60 - not the most recent), the linkage line
is:
LD_RUN_PATH="" INFORMIXC='/usr/perl/v5.6.1/bin/perl esqlld' \
ESQLLD='gcc -G -L/usr/gnu/lib' esql -G -L/usr/gnu/lib Informix.o \
dbdimp.o dbdattr.o sqltoken.o sqltype.o ixblob.o decsci.o \
odbctype.o link.o esqlcver.o esqlc_v6.o \
-R/usr/informix/9.30.UC1/lib -R/usr/informix/9.30.UC1/lib/esql -o \
blib/arch/auto/DBD/Informix/Informix.so
When I set DBD_INFORMIX_DEBUG_ESQLLD=yes in the environment, the actual
gcc command line is:
gcc -G -L/usr/gnu/lib -g -L/usr/gnu/lib Informix.o dbdimp.o \
dbdattr.o sqltoken.o sqltype.o ixblob.o decsci.o odbctype.o \
link.o esqlcver.o esqlc_v6.o -R/usr/informix/9.30.UC1/lib \
-R/usr/informix/9.30.UC1/lib/esql -o \
blib/arch/auto/DBD/Informix/Informix.so \
-L/usr/informix/9.30.UC1/lib -L/usr/informix/9.30.UC1/lib/esql \
/usr/informix/9.30.UC1/lib/esql/libifsql.so \
/usr/informix/9.30.UC1/lib/libifasf.so \
/usr/informix/9.30.UC1/lib/esql/libifgen.so \
/usr/informix/9.30.UC1/lib/esql/libifos.so \
/usr/informix/9.30.UC1/lib/esql/libifgls.so -lnsl -lsocket -laio \
-lm -ldl -lelf /usr/informix/9.30.UC1/lib/esql/checkapi.o \
/usr/informix/9.30.UC1/lib/esql/libifglx.so -lc
The -L/usr/gnu/lib part is a peculiarity of my machine (/usr/local is
NFS-mounted readonly so I can't use it). Your command only lists -R
options and no -L options -- I'm surprised it worked. Mine has '-g' in
the line to include debug info; that shouldn't matter.
You don't include any of the Informix libraries in the command line --
that does matter. In fact, it is the cause of trouble.
Rework your gcc line that builds the shared object Informix.so to
include the Informix libraries.
--
Jonathan Leffler #include <disclaimer.h>
STSM, IBM Data Management Solutions. Phone: +1 650-926-6921
Email: [EMAIL PROTECTED], [EMAIL PROTECTED]
Guardian of DBD::Informix v1.00.PC1 -- http://dbi.perl.org
"I don't suffer from insanity; I enjoy every minute of it!"