#21346 [Fbk->Opn]: Config fails: checking size of char

From: Date: Fri, 03 Jan 2003 10:20:17 +0000
Subject: #21346 [Fbk->Opn]: Config fails: checking size of char
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-28955@lists.php.net to get a copy of this message
ID: 21346 User updated by: vlcc69jfbo001@sneakemail.com Reported By: vlcc69jfbo001@sneakemail.com -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: OpenBSD 3.1-stable PHP Version: 4.3.0 New Comment: This appears to be the relevant section: long longval () { return (long) (sizeof (char)); } unsigned long ulongval () { return (long) (sizeof (char)); } #include <stdio.h> #include <stdlib.h> #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (char))) < 0) { long i = longval (); if (i != ((long) (sizeof (char)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (char)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } configure:58861: error: cannot compute sizeof (char), 77 Previous Comments: ------------------------------------------------------------------------ [2003-01-03 03:09:01] derick@php.net Please show us the relevant parts of config.log which show the failure of the char size test. Derick ------------------------------------------------------------------------ [2003-01-03 03:05:28] vlcc69jfbo001@sneakemail.com Taking --with-imagick off doesn't make any difference. The imagick module is available through pear at: http://pear.php.net/package-info.php?pacid=76 I've been using this configure line for several months with 4.3.0-dev, though I recently removed --with-vpopmail from it as I read it's been moved. That shouldn't have anything to do with this error though. ------------------------------------------------------------------------ [2003-01-02 20:53:37] iliaa@php.net If you do not use the --with-imagick (how did you get it btw?) does it compile properly? ------------------------------------------------------------------------ [2003-01-02 13:39:33] vlcc69jfbo001@sneakemail.com This error seemed to appear with 4.3.0 final - I compiled a new version just a few days ago without seeing this error during configure: checking size of char... configure: error: cannot compute sizeof (char), 77 My configure command is: ./configure --with-apxs=/usr/sbin/apxs --with-mysql=/usr/local --with-pdflib --enable-exif --with-gd --with-jpeg-dir=/usr/local/bin --with-bz2 --with-zlib --with-openssl --with-gettext --with-ldap --with-mhash --disable-overload --enable-sockets --with-mcrypt --enable-sysvshm --enable-pcntl --with-config-file-path=/var/www/conf/php43/ --enable-mbstring --with-pear=/usr/local/lib/php --enable-bcmath --with-imagick ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21346&edit=1

« previous php.bugs (#28955) next »