php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22574 unsatisfied symbols freeaddrinfo and getaddrinfo
Submitted: 2003-03-06 14:44 UTC Modified: 2003-06-09 08:43 UTC
Votes:3
Avg. Score:3.0 ± 1.6
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: john345 at earthlink dot net Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 4.3.2-dev OS: SCO OpenServer 5.0.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
24 + 21 = ?
Subscribe to this entry?

 
 [2003-03-06 14:44 UTC] john345 at earthlink dot net
After a successful run of configure, I ran make. The compile failed with two unsatisfied symbols, freeaddrinfo and getaddrinfo, first referenced in main/network.lo.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-06 16:05 UTC] john345 at earthlink dot net
Tried php4-STABLE-latest.tar.gz and the still get the unsatisfied symbols freeaddrinfo and getaddrinfo.
 [2003-03-06 22:01 UTC] sniper@php.net
Check main/php_config.h for line with HAVE_GETADDRINFO
and add it here.


 [2003-03-09 17:21 UTC] john345 at earthlink dot net
Add "it". And what "it" would you be refering to? Can you please be a bit more specific. I am a Java programmer and haven't done anything with C or C++ in a long time. I'll be glad to give anything a try. Thanks.
 [2003-03-09 17:43 UTC] sniper@php.net
rephrased: Search main/php_config.h for line with text HAVE_GETADDRINFO and add that line to this bug report.

 [2003-03-10 08:16 UTC] john345 at earthlink dot net
My DUH. Sorry. This is the line from main/php_config.h.

#define HAVE_GETADDRINFO 1
 [2003-03-10 09:20 UTC] sniper@php.net
So the configure detects that your system has getaddrinfo()
but during compile/link, it fails. 

Try this:

# rm config.cache
# ./configure --disable-all --disable-cli 
# make clean && make

And if it fails, paste the last 20 lines of the output from 'make' here. Including the exact error.

 [2003-03-10 09:21 UTC] sniper@php.net
Get the latest stable snapshot first!

 [2003-03-11 16:33 UTC] john345 at earthlink dot net
I copied from the last gcc to the end from the output of make.


gcc  -Imain/ -I/home/john/downloads/php/php4-STABLE-200303101630/main/ -DPHP_ATOM_INC -I/home/john/downloads/php/php4-STABLE-200303101630/include -I/home/john/downloads/php/php4-STABLE-200303101630/main -I/home/john/downloads/php/php4-STABLE-200303101630 -I/home/john/downloads/php/php4-STABLE-200303101630/Zend  -I/home/john/downloads/php/php4-STABLE-200303101630/TSRM  -g -O2  -c main/internal_functions.c -o main/internal_functions.o  && echo > main/internal_functions.lo
/bin/ksh /home/john/downloads/php/php4-STABLE-200303101630/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -g -O2     ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/streams.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/memory_streams.lo main/user_streams.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cgi/cgi_main.lo sapi/cgi/getopt.lo main/internal_functions.lo -lm -lsocket  -o sapi/cgi/php
Undefined                       first referenced
 symbol                             in file
freeaddrinfo                        main/network.o
getaddrinfo                         main/network.o
sapi/cgi/php: fatal error: Symbol referencing errors. No output written to sapi/cgi/php
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1
 [2003-03-11 21:00 UTC] sniper@php.net
Okay, so in configure it's detected correctly, but during
compile, it's somehow not found..check your config.log
for this:

"checking for getaddrinfo"

And paste 2 lines before and after that line here.


 [2003-03-13 06:56 UTC] john345 at earthlink dot net
Here are the lines from config.log you requested.

configure:14379: checking for vsnprintf
configure:14407: gcc -o conftest -g -O2   conftest.c -lm -lsocket  1>&5
configure:14433: checking for getaddrinfo
configure:14445: gcc -c -g -O2  conftest.c 1>&5
configure:14468: checking for strlcat
 [2003-03-18 08:37 UTC] john345 at earthlink dot net
Any ideas yet?
 [2003-03-20 18:36 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

There were some libtool/SCO related changes, please try it out..

 [2003-03-24 04:16 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-03-24 07:52 UTC] john345 at earthlink dot net
Sorry for no feedback. I was not here to do any testing.

The make still fails with the same two missing symbols. Here are the lines from config.log on either side of "checking for getaddrinfo".

configure:14396: checking for vsnprintf
configure:14424: gcc -o conftest -g -O2   conftest.c -lm -lsocket  1>&5
configure:14450: checking for getaddrinfo
configure:14462: gcc -c -g -O2  conftest.c 1>&5
configure:14485: checking for strlcat
configure:14513: gcc -o conftest -g -O2   conftest.c -lm -lsocket  1>&5
 [2003-04-11 16:43 UTC] john345 at earthlink dot net
Got download. Won't be able to do compile until Monday.
 [2003-04-11 19:18 UTC] magnus@php.net
Please leave as Feedback until you can provide requested information. Thank you.
 [2003-04-16 12:12 UTC] john345 at earthlink dot net
Still get same two unsatisfied symbols, freeaddrinfo and getaddrinfo, but this time it is reported that they are first referenced in main/network.o.
 [2003-05-01 19:43 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

You might have got the one with broken configure.
Also, does your libsocket.* contain these missing functions?

 [2003-05-09 13:03 UTC] john345 at earthlink dot net
Same error during make.

Undefined                       first referenced
 symbol                             in file
freeaddrinfo                        main/network.lo
getaddrinfo                         main/network.lo
sapi/cli/php: fatal error: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

Yes, the system has freeaddrinfo and getaddrinfo. Here is part of the man page entry:

  getaddrinfo(SLIB)
  *****************

  ____________________________________________________________________________
  getaddrinfo -- nodename-to-address translation in protocol-independent
  manner

  freeaddrinfo- nodename-to-address translation in protocol-independent manner

  gai_strerror- nodename-to-address translation in protocol-independent manner

  Syntax
  ======

     cc ... -lsocket

     #include <sys/socket.h>
     #include <netdb.h>

     int
     getaddrinfo(const char *nodename, const char *servname,
             const struct addrinfo *hints, struct addrinfo **res);
     void
     freeaddrinfo(struct addrinfo *ai);

     char *
     gai_strerror(int ecode);


  Description
  ===========

     The getaddrinfo() function is defined for protocol-independent nodename-
     to-address translation.  It performs functionality of gethostbyname(SLIB)
     and getservbyname(SLIB),  in more sophisticated manner.

     The addrinfo structure is defined as a result of including the <netdb.h>
     header:
...
 [2003-06-04 07:31 UTC] john345 at earthlink dot net
Any new developments on this front?
 [2003-06-04 23:05 UTC] sniper@php.net
Can not fix this as I do not have access to any machine with SCO. Try find out what lib contains these functions..

 [2003-06-09 08:43 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-06-21 08:47 UTC] jmdubois at ibcfrance dot fr
Same problem. In fact /usr/include/netdb.h declares getaddrinfo and freeaddrinfo but the functions not are included in the libraries. It's a SCO problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 05 12:01:29 2024 UTC