Unix Technical Forum

PHP compile help ifx_checkAPI error

This is a discussion on PHP compile help ifx_checkAPI error within the Informix forums, part of the Database Server Software category; --> I am trying to use PHP 5.0.4 on Solaris 9 (Sparc) with SDK 2.81.UC3. When I fire up httpd ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 09:23 AM
Gary Quiring
 
Posts: n/a
Default PHP compile help ifx_checkAPI error

I am trying to use PHP 5.0.4 on Solaris 9 (Sparc) with SDK 2.81.UC3. When I
fire up httpd I get the following error:

Cannot load /usr/apache/libexec/libphp5.so into server: ld.so.1: httpd: fatal: r
elocation error: file /u/informix/lib/esql/libifsql.so: symbol ifx_checkAPI: ref
erenced symbol not found

environment:
IFX_LIBDIR=-L/u/informix/lib -L/u/informix/lib/esql
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/var/local/lib:/opt/SUNWspro/lib:/usr/op
enwin/lib:/u/informix/lib:/u/informix/lib/esql:/u/informix/lib/tools/
INFORMIXSQLHOSTS=/u/informix/etc/sqlhosts
INFORMIXSERVER=dev1
IFX_INCDIR=/u/informix/incl/sql
INFORMIXDIR=/u/informix
IFX_LIBS=/u/informix/lib/esq/libifsql.a \
/u/informix/lib/libifasf.a \
/u/informix/lib/esql/libifgena \
/u/informix/lib/esql/libifos. \
/u/informix/lib/esql/libifglsa \
-lgen -lgls -lm -ldl /u/informix/lib/esql/checkapio \
/u/informix/lib/esql/libifglxa
PATH=.:/usr/local/bin:/usr/xpg4/bin:/usr/sbin:/usr/bin:/u/bin:/opt/SUNWspro/bin:
/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/u/informix/bin:/usr/tbin:/usr/openw
in/bin:/opt/VRTS/bin:/usr/local/samba/bin

Thanks
Gary Quiring


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 09:23 AM
Bernhard \(Berlin\)
 
Posts: n/a
Default Re: PHP compile help ifx_checkAPI error / newer CSDK helps ?

Which CSDK did you use.
I had a similar error and downloaded the newest CSDK (2.90)

"Gary Quiring" <gquiring@msn.com> schrieb im Newsbeitrag
news:mktb91dp1rlb0sor5f7jnp3n1ncmt0gpo8@4ax.com...
>I am trying to use PHP 5.0.4 on Solaris 9 (Sparc) with SDK 2.81.UC3. When
>I
> fire up httpd I get the following error:
>
> Cannot load /usr/apache/libexec/libphp5.so into server: ld.so.1: httpd:
> fatal: r
> elocation error: file /u/informix/lib/esql/libifsql.so: symbol
> ifx_checkAPI: ref
> erenced symbol not found
>
> environment:
> IFX_LIBDIR=-L/u/informix/lib -L/u/informix/lib/esql
> LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/var/local/lib:/opt/SUNWspro/lib:/usr/op
> enwin/lib:/u/informix/lib:/u/informix/lib/esql:/u/informix/lib/tools/
> INFORMIXSQLHOSTS=/u/informix/etc/sqlhosts
> INFORMIXSERVER=dev1
> IFX_INCDIR=/u/informix/incl/sql
> INFORMIXDIR=/u/informix



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 09:23 AM
Gary Quiring
 
Posts: n/a
Default Re: PHP compile help ifx_checkAPI error / newer CSDK helps ?

On Thu, 26 May 2005 20:25:51 +0200, "Bernhard \(Berlin\)" <news@gramberg.de>
wrote:
I tried 2.81 UC3 and 2.90FC1.

>Which CSDK did you use.
>I had a similar error and downloaded the newest CSDK (2.90)
>
>"Gary Quiring" <gquiring@msn.com> schrieb im Newsbeitrag
>news:mktb91dp1rlb0sor5f7jnp3n1ncmt0gpo8@4ax.com.. .
>>I am trying to use PHP 5.0.4 on Solaris 9 (Sparc) with SDK 2.81.UC3. When
>>I
>> fire up httpd I get the following error:
>>
>> Cannot load /usr/apache/libexec/libphp5.so into server: ld.so.1: httpd:
>> fatal: r
>> elocation error: file /u/informix/lib/esql/libifsql.so: symbol
>> ifx_checkAPI: ref
>> erenced symbol not found
>>
>> environment:
>> IFX_LIBDIR=-L/u/informix/lib -L/u/informix/lib/esql
>> LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/var/local/lib:/opt/SUNWspro/lib:/usr/op
>> enwin/lib:/u/informix/lib:/u/informix/lib/esql:/u/informix/lib/tools/
>> INFORMIXSQLHOSTS=/u/informix/etc/sqlhosts
>> INFORMIXSERVER=dev1
>> IFX_INCDIR=/u/informix/incl/sql
>> INFORMIXDIR=/u/informix

>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 09:23 AM
Gary Quiring
 
Posts: n/a
Default Re: PHP compile help ifx_checkAPI error

On Thu, 26 May 2005 12:26:16 -0400, Gary Quiring <gquiring@msn.com> wrote:

>I am trying to use PHP 5.0.4 on Solaris 9 (Sparc) with SDK 2.81.UC3. When I
>fire up httpd I get the following error:
>
>Cannot load /usr/apache/libexec/libphp5.so into server: ld.so.1: httpd: fatal: r
>elocation error: file /u/informix/lib/esql/libifsql.so: symbol ifx_checkAPI: ref
>erenced symbol not found
>
>environment:
>IFX_LIBDIR=-L/u/informix/lib -L/u/informix/lib/esql
>LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/var/local/lib:/opt/SUNWspro/lib:/usr/op
>enwin/lib:/u/informix/lib:/u/informix/lib/esql:/u/informix/lib/tools/
>INFORMIXSQLHOSTS=/u/informix/etc/sqlhosts
>INFORMIXSERVER=dev1
>IFX_INCDIR=/u/informix/incl/sql
>INFORMIXDIR=/u/informix
>IFX_LIBS=/u/informix/lib/esq/libifsql.a \
>/u/informix/lib/libifasf.a \
>/u/informix/lib/esql/libifgena \
>/u/informix/lib/esql/libifos. \
>/u/informix/lib/esql/libifglsa \
>-lgen -lgls -lm -ldl /u/informix/lib/esql/checkapio \
>/u/informix/lib/esql/libifglxa
>PATH=.:/usr/local/bin:/usr/xpg4/bin:/usr/sbin:/usr/bin:/u/bin:/opt/SUNWspro/bin:
>/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/u/informix/bin:/usr/tbin:/usr/openw
>in/bin:/opt/VRTS/bin:/usr/local/samba/bin
>
>Thanks
>Gary Quiring
>

I found this note:
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:


Anyone have ideas on how to fix this?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 09:23 AM
Jonathan Leffler
 
Posts: n/a
Default Re: PHP compile help ifx_checkAPI error

Gary Quiring wrote:
> On Thu, 26 May 2005 12:26:16 -0400, Gary Quiring <gquiring@msn.com> wrote:
>
>
>>I am trying to use PHP 5.0.4 on Solaris 9 (Sparc) with SDK 2.81.UC3. When I
>>fire up httpd I get the following error:
>>
>>Cannot load /usr/apache/libexec/libphp5.so into server: ld.so.1: httpd: fatal: r
>>elocation error: file /u/informix/lib/esql/libifsql.so: symbol ifx_checkAPI: ref
>>erenced symbol not found
>>
>>environment:
>>IFX_LIBDIR=-L/u/informix/lib -L/u/informix/lib/esql
>>LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/var/local/lib:/opt/SUNWspro/lib:/usr/op
>>enwin/lib:/u/informix/lib:/u/informix/lib/esql:/u/informix/lib/tools/
>>INFORMIXSQLHOSTS=/u/informix/etc/sqlhosts
>>INFORMIXSERVER=dev1
>>IFX_INCDIR=/u/informix/incl/sql
>>INFORMIXDIR=/u/informix
>>IFX_LIBS=/u/informix/lib/esq/libifsql.a \
>>/u/informix/lib/libifasf.a \
>>/u/informix/lib/esql/libifgena \
>>/u/informix/lib/esql/libifos. \
>>/u/informix/lib/esql/libifglsa \
>>-lgen -lgls -lm -ldl /u/informix/lib/esql/checkapio \
>>/u/informix/lib/esql/libifglxa
>>PATH=.:/usr/local/bin:/usr/xpg4/bin:/usr/sbin:/usr/bin:/u/bin:/opt/SUNWspro/bin:
>>/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/u/informix/bin:/usr/tbin:/usr/openw
>>in/bin:/opt/VRTS/bin:/usr/local/samba/bin
>>
>>Thanks
>>Gary Quiring
>>

>
> I found this note:
> 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:
>
>
> Anyone have ideas on how to fix this?


I suspect that the trouble is that the PHP build is not attempting to
link the relevant object file - ifxchkapi.o or some such name - as well
as the libraries. If you look at the linker line for an ESQL/C program
with shared libraries, you see that the object file is also linked; and
I'd be relatively surprised, given the error message, if the PHP module
is built with the object file included.

Work out how to build/link the PHP shared object with the esql script -
or how to get the object file included in the link line.



--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.01 -- http://dbi.perl.org/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 09:24 AM
Paul Watson
 
Posts: n/a
Default Re: PHP compile help ifx_checkAPI error

Was this a download php or did you build it yourself ?

Gary Quiring wrote:

> I am trying to use PHP 5.0.4 on Solaris 9 (Sparc) with SDK 2.81.UC3. When I
> fire up httpd I get the following error:
>
> Cannot load /usr/apache/libexec/libphp5.so into server: ld.so.1: httpd: fatal: r
> elocation error: file /u/informix/lib/esql/libifsql.so: symbol ifx_checkAPI: ref
> erenced symbol not found
>
> environment:
> IFX_LIBDIR=-L/u/informix/lib -L/u/informix/lib/esql
> LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/var/local/lib:/opt/SUNWspro/lib:/usr/op
> enwin/lib:/u/informix/lib:/u/informix/lib/esql:/u/informix/lib/tools/
> INFORMIXSQLHOSTS=/u/informix/etc/sqlhosts
> INFORMIXSERVER=dev1
> IFX_INCDIR=/u/informix/incl/sql
> INFORMIXDIR=/u/informix
> IFX_LIBS=/u/informix/lib/esq/libifsql.a \
> /u/informix/lib/libifasf.a \
> /u/informix/lib/esql/libifgena \
> /u/informix/lib/esql/libifos. \
> /u/informix/lib/esql/libifglsa \
> -lgen -lgls -lm -ldl /u/informix/lib/esql/checkapio \
> /u/informix/lib/esql/libifglxa
> PATH=.:/usr/local/bin:/usr/xpg4/bin:/usr/sbin:/usr/bin:/u/bin:/opt/SUNWspro/bin:
> /usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/u/informix/bin:/usr/tbin:/usr/openw
> in/bin:/opt/VRTS/bin:/usr/local/samba/bin
>
> Thanks
> Gary Quiring
>
>



--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-20-2008, 09:27 AM
Gary Quiring
 
Posts: n/a
Default Re: PHP compile help ifx_checkAPI error

On Sat, 28 May 2005 09:49:48 +0100, Paul Watson <paul@oninit.com> wrote:

>Was this a download php or did you build it yourself ?
>

I downloaded the source from php.net. I still have no idea how to fix it.

Gary

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-20-2008, 09:29 AM
Gary Quiring
 
Posts: n/a
Default Re: PHP compile help ifx_checkAPI error

On Fri, 27 May 2005 08:26:20 GMT, Jonathan Leffler
<jleffler@earthlink.net> wrote:


>I suspect that the trouble is that the PHP build is not attempting to
>link the relevant object file - ifxchkapi.o or some such name - as well
>as the libraries. If you look at the linker line for an ESQL/C program
>with shared libraries, you see that the object file is also linked; and
>I'd be relatively surprised, given the error message, if the PHP module
>is built with the object file included.
>
>Work out how to build/link the PHP shared object with the esql script -
>or how to get the object file included in the link line.

I am still struggling with this. I greped inside checkapi.o and see
ifx_checkapi. I found the Informix Makefile for ifx.c. It appears to
call esql and link the correct library. What I don't understand is it
works with Fedora. I compared the Makefiles between the two and don't
see a difference.

IFX_LIBOBJS = /u/informix/lib/esql/checkapi.o
$(srcdir)/ifx.c: $(srcdir)/ifx.ec $(builddir)/libphpifx.a
(if test -d $(INFORMIXDIR); then \
THREADLIB=POSIX $(INFORMIXDIR)/bin/esql -e $(IFX_ESQL_FLAGS)
$(srcdir
)/ifx.ec; mv ifx.c $@; \
THREADLIB=POSIX $(INFORMIXDIR)/bin/esql -e $(IFX_ESQL_FLAGS)
$(srcdir
)/ifx.ec; \
mv ifx.c $@ || true; \
else \
touch $@; \
fi)

$(builddir)/libphpifx.a:
$(LIBTOOL) --mode=link $(CC) $(IFX_LIBOBJS) -o $@

Thanks,
Gary Quiring


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-20-2008, 09:32 AM
Gary Quiring
 
Posts: n/a
Default Re: PHP compile help ifx_checkAPI error

On Fri, 27 May 2005 08:26:20 GMT, Jonathan Leffler <jleffler@earthlink.net>
wrote:


>I suspect that the trouble is that the PHP build is not attempting to
>link the relevant object file - ifxchkapi.o or some such name - as well
>as the libraries. If you look at the linker line for an ESQL/C program
>with shared libraries, you see that the object file is also linked; and
>I'd be relatively surprised, given the error message, if the PHP module
>is built with the object file included.
>
>Work out how to build/link the PHP shared object with the esql script -
>or how to get the object file included in the link line.

I modified and confirmed that PHP is compiling using ESQL. I changed the link
line to include checkapi.o. Same error. At this point either the error message
is misleading or the checkapi.o for Solaris is busted. I have googled this to
death and cannot find a solution.

Gary Quiring

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:01 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com