PHP 4.0 Bug #3386 Updated: Unresolved symbol: ifx_checkAPI
| From: | Bug Database | Date: | Tue, 30 May 2000 01:01:58 +0000 |
| Subject: | PHP 4.0 Bug #3386 Updated: Unresolved symbol: ifx_checkAPI | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19721@lists.php.net to get a copy of this message | ||
ID: 3386
Updated by: afalout
Reported By: petr.husak@meiller.com
Status: Feedback
Bug Type: Other
Assigned To: afalout
Comments:
In short, problem was caused by not using esql/c to link, so checkapi.o was not included. The
fix/workaround (for this and many other missing libs issues re:Informix driver in PHP) is to include
them explicitly:
IFX_LIBDIR="-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql"
IFX_INCDIR="$INFORMIXDIR/incl/esql"
IFX_LIBS="$INFORMIXDIR/lib/esql/libifsql.a \
$INFORMIXDIR/lib/libifasf.a \
$INFORMIXDIR/lib/esql/libifgen.a \
$INFORMIXDIR/lib/esql/libifos.a \
$INFORMIXDIR/lib/esql/libifgls.a \
-lgen -lgls -lm -ldl $INFORMIXDIR/lib/esql/checkapi.o \
$INFORMIXDIR/lib/esql/libifglx.a"
export IFX_LIBDIR IFX_INCDIR IFX_LIBS
./configure --with-informix=yes \
... and the rest ...
I cannot see why this should not be in makefiles. If nobody complains about it in week or so, I will
put that in makefiles and close this.
Andrej Falout
(The folowing is partial discussion from computers.databases.informix newsgroup discussion. See
DejaNews for details.)
---------------------------------------------------
From Danny Heijl:
I use PHP3 and PHP4 with the 2.40 CSDK on Linux, but only with a statically
built Apache/modphp.
If you use the Informix shared libraries, you can not run your httpd binary
on a machine with a different ESQL/C runtime than the one you compiled your
httpd on, which does not help with deployment.
People using a dso version of modphp + Informix have been complaining about
this "checkapi.o" problem, but I did not realize that CSDK 2.40 was the
cause.
I have in the past built modphp3 as a DSO, even with php3_ifx.dso as a
seperately loadable module, but that was a long time ago and I don't
remember the CSDK version I used at the time. It is possible that it no
longer works.
Danny
---
----- Original Message -----
From: "Andrej Falout" <afalout@xtra.co.nz>
To: "Richard Puchalsky" <rpuchalsky@att.net>; <petr.husak@meiller.com>;
<danny.heijl@pandora.be>
Sent: Tuesday, May 16, 2000 9:58 AM
Subject: Re: PHP/Informix consultant?
> [This followup was posted to comp.databases.informix and a copy was sent
> to the cited author.]
>
> In article <TEKT4.66788$fV.4095282@bgtnsc05-news.ops.worldnet.att.net>,
> rpuchalsky@att.net says...
>
> ...snip...
>
> > esql set. I even tried setting INFORMIXC=gcc. The symbol ifx_checkAPI
is
> > defined in /opt/informix/lib/esql/checkapi.o (according to Informix tech
>
> A little C&P from ESQL/C manual
>
> ESQL/C uses an Informix function that is called checkapi() to perform
> this check. The checkapi() function is in the checkapi.o object file,
> which is contained in the $INFORMIXDIR/lib/esql directory. The esql
> command automatically links this checkapi.o object file with every
> executable that it creates.
>
> To determine the API version of the library that the application uses,
> ESQL/C checks the values of special macro definitions in the executable
> file. When the ESQL/C preprocessor processes a source file, it copies
> the macro definitions from the sqlhdr.h header file into the C source
> file (.c) that it generates. The following example shows sample values
> for these macros:
>
>
> #define CLIENT_GEN_VER 710
> #define CLIENT_OS_VER 710
> #define CLIENT_SQLI_VER 710
> #define CLIENT_GLS_VER 710
>
> Tip: The ESQL/C preprocessor automatically includes the sqlhdr.h file
> in all ESQL/C executable files that it generates.
> If the API version of the libraries in this executable file are not
> compatible, ESQL/C returns a runtime error that indicates which library
> is not compatible. You must recompile your ESQL/C application to link
> the new release-version of the shared library.
> If you do not use esql to link one of the shared Informix general
> libraries with your ESQL/C application, you must explicitly link the
> checkapi.o file with your application. Otherwise, ESQL/C might generate
> an error at link time of the form:
>
>
> undefined ifx_checkAPI()
>
> OK, lets try this:
>
> IFX_LIBDIR="-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql"
> IFX_INCDIR="$INFORMIXDIR/incl/esql"
> IFX_LIBS="$INFORMIXDIR/lib/esql/libifsql.a \
> $INFORMIXDIR/lib/libifasf.a \
> $INFORMIXDIR/lib/esql/libifgen.a \
> $INFORMIXDIR/lib/esql/libifos.a \
> $INFORMIXDIR/lib/esql/libifgls.a \
> -lgen -lgls -lm -ldl $INFORMIXDIR/lib/esql/checkapi.o \
> $INFORMIXDIR/lib/esql/libifglx.a"
>
> export IFX_LIBDIR IFX_INCDIR IFX_LIBS
>
> CFLAGS="-O2 -s -DEAPI " \
> ./configure --with-informix=yes \
> ... and the rest ...
>
> > I'm using:
> > Caldera OpenLinux eServer 2.3
> > Informix Foundation 2000
> > Informix Client SDK 2.40.UC1-2
>
> Not sure about this, but is it possible that ifx_checkAPI() cannot load
> because API is realy changed? I use 2.10.UC2-1 CSDK so cannot help here.
> So, is anyone using PHP3 with 2.40 SDK?
>
> More C&P, this time bugs.php.net
>
> ---start----
>
> When I use function ifx_connect(), httpd instance crashes and in the
> logfile appears
> record:
>
> /usr/lib/dld.sl: Unresolved symbol: ifx_checkAPI (code) from
> /apl/informix/lib/
> esql/libifsql.sl
>
> I use Iformix SE 7.22 and Inf. client sdk v2.40 uc11.
> I've compiled php4 with informix support and the phpinfo() shows
> information about the
> informix extension well.
>
> ----end----
>
> Again 2.40
>
> There is another under http://bugs.php.net/bugs.php3?id=3765
> but it does
> not state CSDK version.
>
> Danny, what do you say?
>
>
> --
> Yours, Andrej Falout, http://www.falout.com ICQ 7628616
> ++64.21.607517
> #-----------------------------------------------------------------
> globals "std_disclaimer.4gl"
>
> Ask yourself just one question: ¿ Qué más se puede hacer y aprender ?
> - Propellerhead ReBirth RB-338 manual
>
Full Bug description available at: http://bugs.php.net/version4/?id=3386