Thread: Bug PgSQL Symbol umoddi hpux (fwd)

Bug PgSQL Symbol umoddi hpux (fwd)

From
Heiko Lehmann
Date:
Hallo Developer!

I would like to install apache with php3 and pgsql on a hpux-10.20.
But it does not want to function simply.
What can I do?

regards Heiko



   +----------------------------------------------------------------+
   |  Name:      Heiko Lehmann                                      |
   |  Anschrift: FHL-HRZ, Groszenhainer Str. 57, 01968 Senftenberg  |
   |  Telephon:  03573/85/358                            \\|//      |
   |  E-Mail:    hlehmann@fh-lausitz.de                  (o^o)      |
   +--------------------------------------------------oo0-(_)-0oo---+


030212.prob.pgsql.umoddi      Problem __umoddi3 hp-ux

(s.a. 030211.prob.umoddi,030107.postgresql-7.3.1,021212.apache.php.mysql.dbd)

- Problem:
  - apache startet nicht mit php3-modul auf HP-UX:
    apache does not start with php3-modul on HP-UX:
---%<---
# /usr/local/apache/bin/httpd
/usr/lib/dld.sl: Unresolved symbol: __umoddi3 (code)  from /usr/local/pgsql/lib/
libpq.sl
Syntax error on line 236 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp3.so into server: Not enough space
---%<---

- Ursache:
  - php3 verwendet postgres.
    in postgres ist das Symbol umoddi3 enthalten. 
    hp-ux kennt kein umoddi3.
    php3 uses postgres.
    into postgres the symbol umoddi3 is contained.  
    hp-ux no umoddi3 knows.
---%<---
# nm /usr/local/pgsql/lib/libpq.sl | grep umoddi
__umoddi3           |          |undef |code   |
__umoddi3           |     94624|uext  |stub   |
# chatr /usr/local/pgsql/lib/libpq.sl
/usr/local/pgsql/lib/libpq.sl:
         shared library
         shared library dynamic path search:
             SHLIB_PATH     disabled  second
             embedded path  disabled  first  Not Defined
         internal name:
             libpq.sl.3
         static branch prediction disabled
         data page size: 4K
         instruction page size: 4K
---%<---


- Frage: 
  - Warum wird das Symbol umoddi3 verwendet? 
    Im Postgres-Source ist nichts zu finden.
  - Why is the symbol umoddi3 used? In the
    Postgres SOURCE nothing is to be found.
  - Wie kann man einen Code ohne umoddi3 erzeugen?
    How can one produce a code without umoddi3?

- Sys-Konfig:
  gcc version 3.2
  HP-UX B.10.20
  postgresql-7.3.2 (postgresql-7.3.1)
  php-3.0.18
  Server version: Apache/1.3.27 (Unix)


- compile postgresql (Auszug aus 030107.postgresql-7.3.1):
  - Da libcrypto.sl auch das Symbol umoddi3 enthaelt,
     wurde es schon ohne -openssl und -zlib probiert. 
---%<---
pgver="7.3.2"           ## Feb  3 2003  10932k
cd postgresql-$pgver
OPTIONS="";
OPTIONS="$OPTIONS --with-perl"  ## Perl modules
#OPTIONS="$OPTIONS --with-python" ## Python modules
#OPTIONS="$OPTIONS --with-java"  ## JDBC, REQ: Ant (JDK)
#OPTIONS="$OPTIONS --with-openssl=/usr/local/lib/ssl" ## support for SSl modules
OPTIONS="$OPTIONS --without-openssl"  ## Test: kein support for SSl modules
OPTIONS="$OPTIONS --without-readline"  ## Solaris hat keine readline-lib
OPTIONS="$OPTIONS --prefix=$pgprefix"
#OPTIONS="$OPTIONS --with-includes=/opt/zlib/include" ## nur bei hpux
OPTIONS="$OPTIONS --without-zlib"    ## Test: no zlib on hpux
echo `date` pgsql ./configure $OPTIONS >> /tmp/install.log
./configure $OPTIONS | tee -a configure.out
gmake && gmake install
---%<---

- compile php (Auszug aus 021212.apache.php.mysql.dbd):
---%<---
cd php-$VerPHP
gunzip -c ../php3.mime.c.diff-3.0.gz| patch -d functions;ls -l functions/mime*
OPTIONS=""      ## clean
OPTIONS="$OPTIONS --with-dbase" ## kein Prefix (builtin)
OPTIONS="$OPTIONS --with-pgsql=$PrefixPSQL"
#OPTIONS="$OPTIONS --with-mysql=$PrefixMYSQL"
#OPTIONS="$OPTIONS --with-ldap=$PrefixOLDAP"
#OPTIONS="$OPTIONS --with-openssl" ## noetig, wenn DB mit ssl compiliert
OPTIONS="$OPTIONS --with-config-file-path=$PrefixAPACHE/conf"
OPTIONS="$OPTIONS --with-apxs=$PrefixAPACHE/bin/apxs" # APache eXtenSion tool
# --enable-versioning when you want to use both php-modules
# hpux10.20: versioning... configure: error: versioning is not supported...
#OPTIONS="$OPTIONS --enable-versioning --enable-track-vars"
#OPTIONS="$OPTIONS --with-xml"
echo "`date` php-$VerPHP configure $OPTIONS" >> $LogFile
./configure $OPTIONS | tee configure.out
gmake
## Lib auf Vollstaendigkeit pruefen:
 ldd ./libphp3.so | grep libpq
 ldd ./libphp3.so | grep libmysql
make install    ## kopiert module to $PrefixAPACHE/libexec/ (aus httpd.conf)
---%<---

Re: Bug PgSQL Symbol umoddi hpux (fwd)

From
Tom Lane
Date:
Heiko Lehmann <hlehmann@fh-lausitz.de> writes:
> /usr/lib/dld.sl: Unresolved symbol: __umoddi3 (code)  from /usr/local/pgsql/lib/libpq.sl

You might find it helps to explicitly link libgcc.a into libpq.sl when
building the latter.  This sort of thing is common when you mix gcc and
HP-cc output files ...

            regards, tom lane

Re: Bug PgSQL Symbol umoddi hpux (fwd)

From
Tom Lane
Date:
Heiko Lehmann <hlehmann@fh-lausitz.de> writes:
> - pgsql-7.3.2:
>  libgcc_libpath=`gcc --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'`
>  LDFLAGS="-L$libgcc_libpath" LIBS="-lgcc" \
>  ./configure $OPTIONS | tee -a configure.out

> 3. - Unfortunately the problem of __umoddi3 cannot be  repaired with 2.

[ looks at code ... ]  Ah.  You would also need to add -lgcc to this
step in src/interfaces/libpq/Makefile

# Add libraries that libpq depends (or might depend) on into the
# shared library link.  (The order in which you list them here doesn't
# matter.)
SHLIB_LINK += $(filter -lcrypt -ldes -lkrb -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv -lintl,
$(LIBS))

            regards, tom lane

Re: Bug PgSQL Symbol umoddi hpux (fwd)

From
Heiko Lehmann
Date:
On Wed, 12 Feb 2003, Tom Lane wrote:

> Heiko Lehmann <hlehmann@fh-lausitz.de> writes:
> > /usr/lib/dld.sl: Unresolved symbol: __umoddi3 (code)  from /usr/local/pgsql/lib/libpq.sl
>
> You might find it helps to explicitly link libgcc.a into libpq.sl when
> building the latter.  This sort of thing is common when you mix gcc and
> HP-cc output files ...
>
>             regards, tom lane
>
Thanks for the information.
I tried it, but only  partially with success.

1. I found an option enable-libgcc. This is however not used everywhere:
   php-4     knows option --enable-libgcc
   php-3.0.18     unknown option --enable-libgcc
   pgsql-7.3.2     unknown option --enable-libgcc

2. fix 1. (extract from php4-configure)

- php3 :
 libgcc_libpath=`gcc --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'`
 EXTRA_LIBS="-L$libgcc_libpath" LDFLAGS="-L$libgcc_libpath" LIBS="-lgcc" \
 ./configure $OPTIONS | tee -a configure.out
 ## EXTRA_LIBS required

- pgsql-7.3.2:
 libgcc_libpath=`gcc --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'`
 LDFLAGS="-L$libgcc_libpath" LIBS="-lgcc" \
 ./configure $OPTIONS | tee -a configure.out


3. - Unfortunately the problem of __umoddi3 cannot be  repaired with 2.
   - I use reliably no HP-cc.
     As I can read which libs was used?


What can I still test around this problem to  eliminate?


regards Heiko

   +----------------------------------------------------------------+
   |  Name:      Heiko Lehmann                                      |
   |  Anschrift: FHL-HRZ, Groszenhainer Str. 57, 01968 Senftenberg  |
   |  Telephon:  03573/85/358                            \\|//      |
   |  E-Mail:    hlehmann@fh-lausitz.de                  (o^o)      |
   +--------------------------------------------------oo0-(_)-0oo---+



Re: Bug PgSQL Symbol umoddi hpux (fwd)

From
Heiko Lehmann
Date:
On Thu, 13 Feb 2003, Tom Lane wrote:

> [ looks at code ... ]  Ah.  You would also need to add -lgcc to this
> step in src/interfaces/libpq/Makefile
>
> # Add libraries that libpq depends (or might depend) on into the
> # shared library link.  (The order in which you list them here doesn't
> # matter.)
> SHLIB_LINK += $(filter -lcrypt -ldes -lkrb -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv -lintl,
$(LIBS))
>
>             regards, tom lane
>
Heureka!

Now the error message is no longer present.

- Summary:
---%<---
## src/interfaces/libpq/Makefile patchen (kann vor configure erfolgen)
cat ../postgresql-7.3.2.patch-libpq-lgcc | patch -p1  ## no "-p 1"
## Variable LDFLAGS LIBS vorbelegen
libgcc_libpath=`gcc --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'`
LDFLAGS="-L$libgcc_libpath" LIBS="-lgcc" \
 ./configure $OPTIONS | tee -a configure.out
gmake clean && gmake && gmake install
---%<---

- print Symbol:
---%<---
# nm ./src/interfaces/libpq/libpq.sl | grep umoddi
__umoddi3           |     95696|uext  |stub   |
__umoddi3           |     98616|extern|entry  |
__umoddi3           |     98640|extern|code   |$CODE$
---%<---


This call can be closed.

regards Heiko


Attachment