php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32591 Unsatisfied symbols: ntohs
Submitted: 2005-04-05 17:56 UTC Modified: 2005-04-08 00:24 UTC
From: admin at iut-info dot ens dot univ-reims dot fr Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.0.4 OS: HP-UX
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: admin at iut-info dot ens dot univ-reims dot fr
New email:
PHP Version: OS:

 

 [2005-04-05 17:56 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-08 00:24 UTC] sniper@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 12 21:01:26 2024 UTC