#32591 [Opn->Csd]: Unsatisfied symbols: ntohs
| From: | sniper@php.net | Date: | Thu, 07 Apr 2005 22:24:50 +0000 |
| Subject: | #32591 [Opn->Csd]: Unsatisfied symbols: ntohs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76507@lists.php.net to get a copy of this message | ||
ID: 32591
Updated by: sniper@php.net
Reported By: admin at iut-info dot ens dot univ-reims dot fr
-Status: Open
+Status: Closed
Bug Type: Compile Failure
Operating System: HP-UX
PHP Version: 5.0.4
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-04-05 17:56:58] admin at iut-info dot ens dot univ-reims dot fr
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 this bug report at http://bugs.php.net/?id=32591&edit=1