#32591 [NEW]: Unsatisfied symbols: ntohs

From: Date: Tue, 05 Apr 2005 15:56:59 +0000
Subject: #32591 [NEW]: Unsatisfied symbols: ntohs
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76393@lists.php.net to get a copy of this message
From:             admin at iut-info dot ens dot univ-reims dot fr
Operating system: HP-UX
PHP version:      5.0.4
PHP Bug Type:     Compile Failure
Bug description:  Unsatisfied symbols:   ntohs

Description:
------------
When compiling PHP-5.0.4 under HP-UX 11.11 i got a link error.

/usr/ccs/bin/ld: Unsatisfied symbols:
   ntohs (first referenced in ext/mysql/php_mysql.o) (code)

Using "-D_XOPEN_SOURCE_EXTENDED" ntohs is not defined in "netinet/in.h"
but in "arpa/inet.h".

Modifiying php_mysql.c to include it (as php_network.c) solve the
problem.

Here is the patch:
--- ext/mysql/php_mysql.c.old   2005-02-22 16:32:38 +0100
+++ ext/mysql/php_mysql.c       2005-04-05 17:50:45 +0200
@@ -52,6 +52,9 @@
 # endif
 # include <netdb.h>
 # include <netinet/in.h>
+#if HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
 #endif
 
 #include <mysql.h>


P.S. : i have also try with php5-STABLE-200504050630.

Reproduce code:
---------------
./configure                             \
        --prefix=/opt/APACHE/php        \
        --without-sqlite                \
        --with-oci8                     \
        --with-apache=../apache_1.3.33  \
        --with-gd                       \
        --with-jpeg-dir=/usr/local      \
        --with-png-dir=/usr/local       \
        --with-tiff-dir=/usr/local      \
        --with-freetype-dir=/usr/local  \
        --with-zlib                     \
        --with-bz2                      \
        --enable-sigchild               \
        --with-mysql=/opt/mysql         \
        --with-mysqli=/opt/mysql/bin/mysql_config       \
        --with-pgsql=/opt/pgsql         \
        --with-tsrm-pthreads            \
        --with-dom                      \
        --with-libxml                   \
        --with-xsl                      \
        --enable-ftp                    \
        --with-snmp=/usr/local          \
        --with-imap=/usr/local/imap     \
        --with-imap-ssl=/usr/local      \
        --with-openssl=/usr/local       \
        --with-ldap=/usr/local          \
        --enable-mbstring               \
        --enable-sockets


Expected result:
----------------
make failed.

Actual result:
--------------
build succes.

-- 
Edit bug report at http://bugs.php.net/?id=32591&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32591&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32591&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32591&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32591&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32591&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32591&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32591&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32591&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32591&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32591&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=32591&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=32591&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32591&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32591&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32591&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32591&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32591&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32591&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32591&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32591&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#76393) next »