Re: PHP 4.0 Bug #7379: compiler fatal error building network.c

From: Date: Mon, 23 Oct 2000 18:14:10 +0000
Subject: Re: PHP 4.0 Bug #7379: compiler fatal error building network.c
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-36070@lists.php.net to get a copy of this message
On Sat, 21 Oct 2000, Stig Venaas wrote: > On Fri, Oct 20, 2000 at 11:49:02PM -0000, dkleinh@phy.ucsf.EDU wrote: > > From: dkleinh@keck.ucsf.edu > > Operating system: Tru64 5.0A > > PHP version: 4.0.3pl1 > > PHP Bug Type: Compile Failure > > Bug description: compiler fatal error building network.c > > > > CC=cc ./configure --with-mysql=/tru64/local/mysql --with-apache=../apache_1.3.12 > > --with-imap --enable-track-vars > > > > cc: Error: network.c, line 79: In this declaration, "hints" has no linkage and > > is of an incomplete type. (incompnolink) > > struct addrinfo hints, *res, *sai; > > Strange, I thought this would be catched by configure, it tries to > compile > > include <netdb.h> > int main() { > struct addrinfo h;getaddrinfo("","",&h,&h); > ; return 0; } > > and should have gotten the error then I think. That would have stopped > it from using that code in network.c. > > Could you check what it said in config.log? Look for getaddrinfo. > If there's no error in config.log could you check that this code > actually is in configure, and what happens if you compile the > above code manually? From the file config.log: configure:6290: checking for getaddrinfo configure:6302: cc -c -g conftest.c 1>&5 cc: Warning: configure, line 6298: In this statement, the referenced type of the pointer value "&h" is "struct addrinfo", which is not compatible with "pointer to struct addrinfo". (ptrmismatch) struct addrinfo h;getaddrinfo("","",&h,&h); ---------------------------------------^ It seems to have generated a warning and not a fatal error. The test result is reported to be OK: checking for getaddrinfo... yes If I try to compile the chunk of test code, I get: hoagy 39% cc -c jnk.c cc: Warning: jnk.c, line 4: In this statement, the referenced type of the pointer value "&h" is "struct addrinfo", which is not compatible with "pointer to struct addrinfo". (ptrmismatch) getaddrinfo ("","",&h,&h); ----------------------^ Which is the same warning that the configure script gets. I am running Compaq Tru64 5.0A patch 1 UNIX and the C compiler is: hoagy 45% cc -V | more Compaq C V6.1-019 on Compaq Tru64 UNIX V5.0A (Rev. 1094) > > The code that fails is: > > struct addrinfo hints, *res, *sai; > > but then the line in the configure test program > > struct addrinfo h; > > should also fail. > > Stig > Thanks for any help, Dirk dkleinh@keck.ucsf.edu

« previous php.dev (#36070) next »