ID: 14048 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: Unknown/Other Function Operating System: BSD/OS 4.x PHP Version: 4.0.6 New Comment:
Please list shortly what does not work in latest snapshot. --Jani Previous Comments: ------------------------------------------------------------------------ [2001-11-13 23:28:43] [EMAIL PROTECTED] Hi, for a number of releases I've dealt with some known issues, but felt it's time to summarize them here, since I think I've pretty much got them all, including the fixes. 1) Native make + gnu make For some reason, php is the only package, that manages to override the variable MAKE=/path/to/make as well as the make in the PATH setting. If you keep the native make (which is sensible, for it's best used for creating a new kernel), but you have your own make compiled in your own dirs, then make doesn't work. The reason is, the old include format. I use this perlscript 'makefix.pl' to fix the issues: #!/perl/bin/perl use Getopt::Long; my $dir=$ENV{'HOME'}.'/_src/php-4.0.4pl1'; GetOptions( 'dir=s' => \$dir); chdir($dir) || die "Can't change to $dir\n$!\n"; open(FILE, './makefix.lst') || die "Please create the list first, with:\nfind -x . -exec grep -l -E '\\.include \\\"' {} \\; >./makefix.lst"; @files = <FILE>; close(FILE); for $i (0..$#files) { $fix = $files[$i]; next if $fix =~ /\.bak$/; chomp($fix); $bak = $fix . '.bak'; system("cp $fix $bak"); print STDOUT "Trying $bak and $fix...."; open(BAK, $bak) || die "cant open $bak\n$!\n"; open(FIX, ">$fix") || die "cant open $fix\n$!\n"; while(<BAK>) { chomp; s/^\.include \"([^\"]+)\"\s?$/include $1/; print FIX $_; print FIX "\n"; } close(BAK); close(FIX); print STDOUT "fixed.\n"; } exit(0); It can probably be done more easily, but it works. 2) INET_* functions Are native for BSDi and don't need a library. Secondly, they complain without the right headers. Here's a snippet from the Bind configure script, on how to _correctly_ test for these functions: ------------------------------------------------------------ echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 echo "configure:3901: checking for inet_aton" >&5 cat > conftest.$ac_ext <<EOF #line 3903 "configure" #include "confdefs.h" #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> int main() { struct in_addr in; inet_aton(0, &in); return (0); ; return 0; } EOF ------------------------------------------------------------ The native bind on BSDi does have __inet_aton in libbind, but it's static, so PHP complains and you need to edit config.h and Zend/Makefile to get rid of it. Secondly - bind 9.x requires not only libbind but libisc as well, so any tests for -lbind will always fail, if you've upgraded your named package. 3) res_search Is also native on BSDi. I don't have a definite fix, since I'm no C-programmer, but I just add these lines to the end of main/php_config.h.in to work around it: #ifdef __bsdi__ #define HAVE_RES_SEARCH 1 #endif man 3 res_search says: DEPRECATED #include <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> ... res_search(const char *dname, int class, type, u_char *answer, int anslen); 4) Iconv and XSLT Below is a typical diff for any section in configure trying to find iconv for the XSLT section: ------------------------------------------------------------ found_iconv=no ! echo $ac_n "checking for iconv_open in -lc""... $ac_c" 1>&6 ! echo "configure:48789: checking for iconv_open in -lc" >&5 ac_lib_var=`echo c'_'iconv_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" ! LIBS="-lc $LIBS" cat > conftest.$ac_ext <<EOF #line 48797 "configure" #include "confdefs.h" --- 48784,48797 ---- found_iconv=no ! echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 ! echo "configure:48789: checking for iconv_open in -liconv" >&5 ac_lib_var=`echo c'_'iconv_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" ! LIBS="-liconv $LIBS" cat > conftest.$ac_ext <<EOF #line 48797 "configure" #include "confdefs.h" ------------------------------------------------------------ It will do this correctly for --with-iconv, but later on when iconv is specified with xslt, it breaks. There are several sections in the configure script and I usually fix them all just to spare me the havoc of find out which is called and why. I hope you can address these issues before 4.0.7 release. As a side note: The latest snapshots work correctly with make as always, but then the release versions don't. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14048&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]