Dear fellows,

for days I'm trying to make a php 4.2.3 module with oci8 and sapdb shared in an Apache 1.3.22 on a HPUX 11.11 .
In calling 'make' the compiler/linker sends some messages like this:


Warning: This library needs some functionality provided by -lsqlod.
I have the capability to make that library automatically link in when
you link to this library. But I can only do this if you have a
shared version of the library, which you do not appear to have.

...

Does it mean the linker misses shared libraries?

When calling 'make install' finally, the linker prints:


apxs:Error: libs/libphp4.sl is not a DSO

This problem may be fixed by renaming the .sl lib to .so and call the 'apxs -i -n ...' cmd line of php-make manually.

But the result isn't good enough for I can't start the apachectl : the OCI8- and SAPDB-routines aren't known in the libphp4.so .
When I try to start it will print:


/usr/lib/dld.sl: Unresolved symbol: OCICollAssignElem (code) from <my/path/to/lib/libphp4.so>

...

There had been some discussion about this problem in the past. Does anybody know where I can find a solution?
It would be very nice if someone could give me a hint.

Thank You very much
Kai Lorenz

    3 months later

    Have you been able to resolve this problem? I am having a simular problem.

      Which switches did you use when running configure ? Which gnu tools did you install prior to compiling php ?

        Dear fellows,

        after some days of trials with no success I've decided to build the php module as a compiled-in one - i. e. I linked it 'static'. Hence I have to load a huge executable whenever I start my apache (8,2 MšŸ˜Ž but there was no other possible way to go.
        I'm not quite sure - but I think I can remember a post in another forum stating that one cannot mix shared and static libraries on HPUX. It could be a possible explanation why I cannot link a database library statically to a PHP module which is built as a shared one. I had to notice the same effect for either SAPDB and Oracle OCI8 DB.

        Now for the details.
        I'm using Apache 1.3.27 and PHP 4.2.3 with Oracle 8.0.6 (and mod_SSL 2.8.12 + OpenSSL 0.9.7).

        After building an OpenSSL module I ran the following commands.

        cd <apache_dir>

        setenv CFLAGS ā€œ+DAportable +Zā€œ

        ./configure --prefix=$APACHE_HOME --enable-module=so \

        --enable-module=ssl --enable-shared=ssl --enable-rule=EAPI

        <edit> src/modules/ssl/Makefile : <change> -ldbm to -lc (at SSL_LIBS=…)

        make

        make certificate TYPE=custom (because of SSL)

        make install

        cd <php_dir>

        setenv EXTRA_INCLUDES -I<OCI8_DIR>/include

        <edit> ./configure :

        <insert> at line 41180: elif test -f $OCI8_DIR/lib/libcore4.a; then
        OCI8_VERSION=8.0
        <change> -lcrypt to -lc
        <change> -ltermcap to -lcurses
        (see http://www.geocrawler.com/mail/msg.php3?msg_id=10326846&list=254)

        ./configure --prefix=<php_dir> --with-apache=$APACHE_HOME \

        --with-openssl=$SSL_BASE --with-oci8=<OCI8_DIR> \
        --enable-shared=ssl --enable-track-vars \
        --with-config-file-path=/usr/local/lib

        <edit> ./config_vars.mk

        <goto line 73> (EXTRA_LIBS)
        <delete>: -lpam -lclntsh -lpsa -lcore4 -lnlsrtl3
        <insert>: $(OCI8_DIR)/lib/ssdbaed.o $(OCI8_DIR)/lib/kpudfo.o $(OCI8_DIR)/lib/nautab.o \
        $(OCI8_DIR)/lib/naeet.o $(OCI8_DIR)/lib/naect.o $(OCI8_DIR)/lib/naedhs.o \
        -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork \
        -lclient -lvsn -lcommon -lgeneric -lmm -lnlsrtl3 \
        -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lnetv2 -lnttcp \
        -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lclient \
        -lvsn -lcommon -lgeneric -lepc -lnlsrtl3 \
        -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lclient \
        -lvsn -lcommon -lgeneric -lnlsrtl3 \
        -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 \
        -l:libcl.a -l:librt.l -lpthread -l:libnss_dns.1 \
        -l:libdld.sl -lm -lc -lssl

        make

        make install

        cd <apache_dir>

        ./configure --prefix=$APACHE_HOME --enable-module=so \

        --activate-module=src/modules/php4/libphp4.a \
        --enable-module=ssl --enable-shared=ssl --enable-rule=EAPI

        <edit> src/modules/ssl/Makefile : <change> -ldbm to -lc (at SSL_LIBS=…)

        make

        make install

        <edit> conf/httpd.conf : set paths, names, port numbers etc.

        o.k.

        I'm looking forward to Your responses, answers and experiences.
        I by myself am now trying to bring the apache to work with mod_jk. It's a little bit boring for this does work just as little.

        I hope at least I could give You some useful hints.

        Best regards
        Kai Lorenz

          Dear fellows,

          unfortunately I made a mistake when sending the changed list of libraries to link. Please omit all the .o-files in the list of EXTRA_LIBS in <php_dir>/config_vars.mak !

          Sorry.
          Best regards

                 Kai Lorenz
            Write a Reply...