php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16351 resolv.h deprecated on PHP4.2.0 from CVS
Submitted: 2002-03-29 15:19 UTC Modified: 2002-04-02 09:48 UTC
From: bariou at brasnah dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 4.1.2 OS: Solaris 8
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: bariou at brasnah dot com
New email:
PHP Version: OS:

 

 [2002-03-29 15:19 UTC] bariou at brasnah dot com
From the CVS branch I use the PHP 4.2.0, it works smartly on Red hat 7.2 but give the following Warning on Solaris 8

Warning message from ./buildconf

WARNING: using auxiliary files such as 'aconfig.h' 'config.h;bot' and 'config.h.top', to define template for 'config.h.in' is deprecated and iscouraged

Using the third argument of 'AC_DEFINE' and 'AC_DEFINE_UNQUOTED' allows to define a template with 'acconfig.h' ......


Warning message from configure
checking resolv.h presence... yes
configure: WARNING: resolv.h: present but cannot be compiled
configure: WARNING: resolv.h: check for missing prerequisite headers?
configure: WARNING: resolv.h: proceeding with the preprocessor's result

Here the configure command line
 
./configure --prefix=/usr/local/apache --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/php --with-gettext=shared --with-dom=/usr --with-iconv=/usr/local --enable-socket=shared --with-ttf --enable-inline-optimization --enable-magic-quotes --enable-trans-id --enable-bcmath --enable-memory-limit --enable-wddx --enable-sysvsem=shared --enable-sysvshm=shared --with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr/local --with-tiff-dir=/usr/local -with-zlib-dir=/usr --with-gd=/usr/local --enable-gd-native-ttf --with-mysql=/usr/local/mysql --enable-ftp --with-pdflib=/usr/local --with-xpm-dir=/usr/X11R6 --enable-xslt --with-xslt-sablot --with-expat-dir=/usr/local --with-zlib=/usr --with-xml-rpc --enable-libgcc

On Solaris gcc include, autoconf, m4 have been adjusted nd installed according to the requirement

Thanks for an idea

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-29 15:25 UTC] bariou at brasnah dot com
Here the followin step in the make

cyclopedia:</opt/xtra_targz/php420>make                                                                                      Making all in Zend                                                                                                            make[1]: Entering directory `/opt/xtra_targz/php420/Zend'                                                                     bison -y -p zend -v -d ./zend_language_parser.y -o zend_language_parser.c                                                     /bin/bash ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=280 -I../TSRM  -g -O2 -prefer-pic -c zend_language_parser.c                                                                      lex -Pzend -S./flex.skl -ozend_language_scanner.c -i ./zend_language_scanner.l
lex: illegal option -- P
Usage: lex [-ewctvnVY] [-Q(y/n)] [file]
make[1]: *** [zend_language_scanner.c] Error 1
make[1]: Leaving directory `/opt/xtra_targz/php420/Zend'
make: *** [all-recursive] Error 1

Thanks for your help

Marcel
 [2002-03-29 20:03 UTC] sniper@php.net
I don't think the warnings by configure have anything
to do with this..your lex just needs updating. 
Try flex instead. 

Check this url for some instructions:

http://www.kempston.net/solaris/utilitysoftware.html

--Jani

 [2002-04-01 13:32 UTC] bariou at brasnah dot com
After a re-install of flex and gcc 2.95.3 on SUN-SOLARIS I have now the following failures.

During the CONFIGURE I've the follwing warning 

configure: WARNING: resolv.h: present but cannot be compiled
configure: WARNING: resolv.h: present but cannot be compiled
configure: WARNING: resolv.h: check for missing prerequisite headers?
configure: WARNING: resolv.h: proceeding with the preprocessor's result

checking unix.h usability... no
checking unix.h presence... no

checking whether to enable mailparse support... no
checking whether to enable multibyte string support... no
checking whether to enable japanese encoding translation... no
checking whether to enable multibyte regex support... no

checking for limits.h... (cached) no

Fail message from MAKE =>

make[1]: Entering directory `/opt/xtra_targz/php420/Zend'
/bin/bash ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=280 -I../TSRM  -g -O2 -prefer-pic -c zend_qsort.c
In file included from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/limits.h:117,
                 from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/syslimits.h:7,
                 from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/limits.h:11,
                 from zend_qsort.c:21:
/usr/include/limits.h:112: No include path in which to find limits.h
make[1]: *** [zend_qsort.lo] Error 1
make[1]: Leaving directory `/opt/xtra_targz/php420/Zend'
make: *** [all-recursive] Error 1

About the limits.h it is an include_next which fails... More I'm a little bit surprised about the include path /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/ , because I have installed gcc-2.95.3 with pakgadd... not 2.95.2

Now I'm lost, have somebody an idea ! 

Thanks for your help
 [2002-04-01 16:21 UTC] sniper@php.net
Did you do 'make clean' and reconfigure after you upgraded
gcc ? Or try './cvsclean ; ./buildconf' as this seems more like a problem in your system than in PHP.

 [2002-04-02 03:08 UTC] msopacua at idg dot nl
Could you list which headers and in which order are specified in `man res_search'?
 [2002-04-02 03:42 UTC] bariou at brasnah dot com
I've done ./cvsclean, I've re-run ./buildconf, and I do make clean when necessary
So after your message  I flollow the complete process

I give you here again  The different warning messages :

For ./buildconf =>
 ./buildconf
buildconf: checking installation...
buildconf: autoconf version 2.53 (ok)
buildconf: automake version 1.4 (ok)
buildconf: libtool version 1.4 (ok)
rebuilding Makefile templates
automake: configure.in: installing `Zend/ylwrap'
rebuilding configure
rebuilding acconfig.h
rebuilding main/php_config.h.in
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.

WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':

WARNING:   AC_DEFINE([NEED_MAIN], 1,
WARNING:             [Define if a function `main' is needed.])

WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.
autoheader: `main/php_config.h.in' is created

For the make I've =>

/bin/bash ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=280 -I../TSRM  -g -O2 -prefer-pic -c zend_qsort.c
In file included from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/limits.h:117,
                 from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/syslimits.h:7,
                 from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/limits.h:11,
                 from zend_qsort.c:21:
/usr/include/limits.h:112: No include path in which to find limits.h
make[1]: *** [zend_qsort.lo] Error 1
make[1]: Leaving directory `/opt/xtra_targz/php420/Zend'
make: *** [all-recursive] Error 1


About the last suggestion :=> Could you list which headers and in which order are specified in `man
res_search'? here  is the answer :

Resolver Library Functions                      resolver(3RESOLV)

NAME
     resolver, res_ninit, fp_resstat, res_npquery, res_hostalias,
     res_nquery,   res_nsearch,  res_nquerydomain,  res_nmkquery,
     res_nsend, res_nclose, res_nsendsigned, dn_comp,  dn_expand,
     hstrerror,  res_init,  res_query,  res_search,  res_mkquery,
     res_send, herror,  - resolver routines

SYNOPSIS
  BIND 8.2.2 Interfaces
     cc [ flag ... ] file ... -lresolv  -lsocket  -lnsl [ library ... ]
     #include <sys/types.h>
     #include <netinet/in.h>
     #include <arpa/nameser.h>
     #include <resolv.h>
     #include <netdb.h>

Is that enough ?

Hreat thank for you help
 [2002-04-02 04:32 UTC] msopacua at idg dot nl
Ok. You don't have the resolv.h problem anymore, so ignore the warning, on the pre-compile issue.

Just to see, whether this will at all work at solaris, could you try to save this to a file:
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#include <netdb.h>

int
main ()
{

const char host[7]="php.net";
u_char ans[1024];
int r;
res_init();
/* Capture result in r but return 0, since a working nameserver is
 * not a requirement for compilation.
 */
r =  res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
return 0;
res_close();

  ;
  return 0;
}

And compile it as:
gcc -o name name.c -lsocket -lresolv -lnsl

then strip of a lib and try again till it fails.

On the limits.h issue:
usually it includes a system specific limits file, like machine/limits.h or sys/limits.h.

The gcc installation didn't really pick this up very well, looking at that include chain.

Could you post the section around line 112 in limits.h?
Can you tell if POSIX_SOURCE/ANSI_SOURCE should be defined/not defined somewhere to skip that include?

By the way: I had the same problem with the wchar.h file on a BSDi system and my own gcc installation. I simply renamed the original wchar.h to get rid of it - not a nice thing to do, but it works :-) - with limits.h I'd be more careful though.
 [2002-04-02 05:10 UTC] bariou at brasnah dot com
With your data I created totofoo.c and the compile fails 
when I remove

#include <netinet/in.h>

and only with this remove

// Inside limits.h line 112, here is the section 

#ifdef _GCC_NEXT_LIMITS_H
#include_next <limits.h>  /* recurse down to 
the real one */
#endif

Nothing about POSIX_SOURCE ANSI_SOURCE in this file

About limits I've also a limits.h file in :
/usr/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include/limits.h

Thanks for your help.

Marcel
 [2002-04-02 05:31 UTC] msopacua at idg dot nl
In file included from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/limits.h:117,

                 from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/syslimits.h:7
,
                 from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/limits.h:11,
                 from zend_qsort.c:21:
/usr/include/limits.h:112: No include path in which to find limits.h


Hmm, seems like recursive recursion.
My guess is, that /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/limits.h:117,
has the exact same line?

Since this all depends on gcc symbols I think you need to report the issue to the gcc list - nothing PHP can do about it. As a work-around you might comment out the lines around line 117 in the file mentioned above.

About resolv.h:
If you could omit the -lnsl/-lresolv/-lsocket statements during compilation one by one, then we can safely assume that the resolver functions will be available to you (affecting getmxrr and checkdnsrr).

The headers are correct - just -lnsl isn't used in testing, so that could be a problem.
 [2002-04-02 07:42 UTC] bariou at brasnah dot com
I comment #include_next<limits.h> (line 117) in

/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/limits.h

More in the phpxxx/ext/posix.c I add 

#define NGROUPS_MAX 256

No the make seems to be done correctly, now I've to check if PHP work  correctly, I will give you the follow up in a couple of hour.

Great thanks for your help
 [2002-04-02 08:34 UTC] bariou at brasnah dot com
Apache has started on SOLARIS2.8 with PHP-4.2.0-dev as a module. 

I don't think it's a great deal, I am disappointed a little bit with solaris.. I prefer Linux.. 

Nevertheless very great thanks for your help :-), I've a lot to learn on my side.

Marcel
 [2002-04-02 09:48 UTC] sniper@php.net
This is and never was PHP problem. I'd check my PATH
settings and such since it seems like you've somehow 
got the compiler stuff screwed.

Reinstall everything? :)

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC