Bug #18032 Updated: Configurescript problems, my result in Segfault

From: Date: Fri, 28 Jun 2002 17:47:05 +0000
Subject: Bug #18032 Updated: Configurescript problems, my result in Segfault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12433@lists.php.net to get a copy of this message
ID: 18032 Updated by: vhoel99@grm.hia.no Reported By: vhoel99@grm.hia.no -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Linux 2.4.17 PHP Version: 4.2.1 New Comment: First of all, I am not that familiar with Core-dumps, GDB and Backtracing. So if I have done anything wrong; I am sorry, but please tell me what to do. I did recompile Apache with "--without-execstrip", and PHP with "--enable-debug". Then I compiled with both gd (2.0.1) and pgsql (7.2), started gdb (gdb ./httpd) and the rest you see under: <cut> GNU gdb 5.0 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-slackware-linux"... (gdb) run Starting program: /usr/local/apache/bin/./httpd warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. Program received signal SIGSEGV, Segmentation fault. 0x401166d4 in strcmp () from /lib/libc.so.6 (gdb) bt #0 0x401166d4 in strcmp () from /lib/libc.so.6 #1 0x4042213d in ?? () Cannot access memory at address 0x1 <cut> Now to the zlib and mysql issue. Here is my config: ./configure --prefix=/usr/local \ --with-apxs=/usr/local/apache/bin/apxs \ --enable-exif \ --enable-track-vars \ --enable-magic-quotes \ --enable-ftp \ --with-openssl="/usr/local" \ --with-mysql=/usr/local \ --with-pgsql \ --enable-debug You mean this should fail, because I try to use mysql, but does not specify to use Zlib, nor where zlib is located. Here is (a part of) the output: <cut> Configuring extensions checking if the location of ZLIB install directory is defined... no checking for ZLIB support... no <cut> checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... /tmp/mysql.sock <cut> checking for mysql_close in -lmysqlclient... yes <cut> As you can see, the configure script does not agree with you on the Zlib/MySQL issue :) I hope this was helpful. If not, just tell me what to do. Previous Comments: ------------------------------------------------------------------------ [2002-06-28 11:28:07] sander@php.net Can you generate a backtrace of the crash that happens when you compile with pgsql and gd so we can see what's going on? What versions of pgsql and gd are you using? Also, mysql (apparently) needs zlib, and therefore it's completely logical that configure complains about mysql & zlib when it can't find zlib. ------------------------------------------------------------------------ [2002-06-28 10:44:26] vhoel99@grm.hia.no The system is a standard Slackware 7.1 with an self-compiled Apache. As far as I know, this bug(s) came into PHP version 4.2.0, and are still in the snapshot dated 200206280600. ------------------------------------------------------------------------ [2002-06-28 10:43:52] vhoel99@grm.hia.no The system is a standard Slackware 7.1 with an self-compiled Apache. As far as I know, this bug came into PHP version 4.2.0, and are still in the snapshot dated 200206280600. ------------------------------------------------------------------------ [2002-06-27 20:00:19] sniper@php.net Please try this snapshot: http://snaps.php.net/php4-latest.tar.gz ------------------------------------------------------------------------ [2002-06-27 19:54:41] vhoel99@grm.hia.no If I configure PHP this way, with GD support but no pgsql, it works: CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --prefix=/usr/local \ --with-apxs=/usr/local/apache/bin/apxs \ --enable-exif \ --enable-track-vars \ --enable-magic-quotes \ --enable-ftp \ --with-gd \ --with-zlib \ --with-jpeg-dir="/usr" \ --with-png-dir="/usr" \ --with-zlib-dir="/usr" \ --with-ttf \ --with-freetype-dir="/usr/local" \ --with-openssl="/usr/local" \ --with-mysql=/usr/local If I add pgsql, I get a segfault as soon as I start Apache. If I add pgsql, but remove GD, everything works. Config like this: CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --prefix=/usr/local \ --with-apxs=/usr/local/apache/bin/apxs \ --enable-exif \ --enable-track-vars \ --enable-magic-quotes \ --enable-ftp \ --with-openssl="/usr/local" \ --with-mysql=/usr/local \ --with-pgsql If I mess up with my GD-config, like this: CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --prefix=/usr/local \ --with-apxs=/usr/local/apache/bin/apxs \ --enable-exif \ --enable-track-vars \ --enable-magic-quotes \ --enable-ftp \ --with-gd \ --with-jpeg-dir="/usr" \ --with-openssl="/usr/local" \ --with-mysql=/usr/local \ --with-pgsql .. I get this error: <cut> checking for GD support... yes checking whether to enable truetype string function in GD... no checking for the location of libjpeg... yes checking for jpeg_read_header in -ljpeg... yes checking for the location of libpng... no If configure fails try --with-png-dir=<DIR> and --with-zlib-dir=<DIR> checking for the location of libXpm... no If configure fails try --with-xpm-dir=<DIR> checking for freetype(2)... no If configure fails try --with-freetype-dir=<DIR> checking for FreeType 1.x support... no checking for T1lib support... no checking for gdImageString16 in -lgd... no checking for gdImagePaletteCopy in -lgd... no checking for gdImageCreateFromPng in -lgd... no checking for gdImageCreateFromGif in -lgd... no checking for gdImageGif in -lgd... no checking for gdImageWBMP in -lgd... no checking for gdImageCreateFromJpeg in -lgd... no checking for gdImageCreateFromXpm in -lgd... no checking for gdImageCreateFromGd2 in -lgd... no checking for gdImageCreateTrueColor in -lgd... no checking for gdImageSetTile in -lgd... no checking for gdImageSetBrush in -lgd... no checking for gdImageStringTTF in -lgd... no checking for gdImageStringFT in -lgd... no checking for gdImageStringFTEx in -lgd... no checking for gdImageColorClosestHWB in -lgd... no checking for gdImageColorResolve in -lgd... no checking for gdImageGifCtx in -lgd... no <cut> checking for mysql_close in -lmysqlclient... no checking for mysql_errno in -lmysqlclient... no configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information. <cut> This may seem ok, but why does he say no on the mysql_close and mysql_errno?? Because if I run it properly (like at the top), this is the output: <cut> checking for GD support... yes checking whether to enable truetype string function in GD... no checking for the location of libjpeg... yes checking for jpeg_read_header in -ljpeg... yes checking for the location of libpng... yes checking for png_write_image in -lpng... yes checking for the location of libXpm... no If configure fails try --with-xpm-dir=<DIR> checking for freetype(2)... yes checking for FreeType 1.x support... yes no - FreeType 2.x is to be used instead checking for T1lib support... no checking for gdImageString16 in -lgd... yes checking for gdImagePaletteCopy in -lgd... yes checking for gdImageCreateFromPng in -lgd... yes checking for gdImageCreateFromGif in -lgd... no checking for gdImageGif in -lgd... no checking for gdImageWBMP in -lgd... yes checking for gdImageCreateFromJpeg in -lgd... yes checking for gdImageCreateFromXpm in -lgd... yes checking for gdImageCreateFromGd2 in -lgd... yes checking for gdImageCreateTrueColor in -lgd... yes checking for gdImageSetTile in -lgd... yes checking for gdImageSetBrush in -lgd... yes checking for gdImageStringTTF in -lgd... yes checking for gdImageStringFT in -lgd... yes checking for gdImageStringFTEx in -lgd... no checking for gdImageColorClosestHWB in -lgd... yes checking for gdImageColorResolve in -lgd... yes checking for gdImageGifCtx in -lgd... no <cut> checking for mysql_close in -lmysqlclient... yes checking for MySQL UNIX socket... /tmp/mysql.sock <cut> So I have to choose if I want gd or pgsql, not both. And if I mess up my gd-config, it comlains about my MySQL :-) I hope this can be fixed. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18032&edit=1

« previous php.bugs (#12433) next »