php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67229 make failed
Submitted: 2014-05-07 21:28 UTC Modified: 2017-07-24 21:58 UTC
Votes:13
Avg. Score:3.8 ± 0.9
Reproduced:13 of 13 (100.0%)
Same Version:5 (38.5%)
Same OS:9 (69.2%)
From: skatta33 at hotmail dot com Assigned:
Status: Re-Opened Package: Compile Failure
PHP Version: 5.5.12 OS: solaris 10 sparc
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: skatta33 at hotmail dot com
New email:
PHP Version: OS:

 

 [2014-05-07 21:28 UTC] skatta33 at hotmail dot com
Description:
------------
Hi,

make is failed for following configuration for php 5.5.12 on solaris 10 sparc and gcc 4.8.2;

Here is the error information;

-----------------------------------------------------------------------------
In file included from /usr/include/stdio.h:21:0,
                 from /var/tmp/php-5.5.12/ext/sqlite3/libsqlite/sqlite3.c:8253:
/usr/local/gcc4/lib/gcc/sparc-sun-solaris2.10/4.8.2/include-fixed/sys/feature_tests.h:345:2: error: #error "Compiler or 

options invalid; UNIX 03 and POSIX.1-2001 applications  require the use of c99"
 #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications \
  ^
Makefile:572: recipe for target 'ext/sqlite3/libsqlite/sqlite3.lo' failed
make: *** [ext/sqlite3/libsqlite/sqlite3.lo] Error 1
-----------------------------------------------------------------------------

Here is the operating system information;
-------------------------------------------------------------
SunOS hq1-webdmz-s1 5.10 Generic_150400-05 sun4v sparc sun4v
-------------------------------------------------------------

Here is the gcc version;

-------------------------------------------------------------------------------
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc4/libexec/gcc/sparc-sun-solaris2.10/4.8.2/lto-wrapper
Target: sparc-sun-solaris2.10
Configured with: ./configure --without-gnu-as --with-as=/usr/ccs/bin/as --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,fortran,objc --prefix=/usr/local/gcc4 --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local
Thread model: posix
gcc version 4.8.2 (GCC)
-------------------------------------------------------------------------------

Here is the make information;

----------------------------------------------------------
GNU Make 4.0
Built for sparc-sun-solaris2.10
----------------------------------------------------------

Here is configure information;

-----------------------------------------------------------------------------

CC=/usr/local/gcc4/bin/gcc ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-curl=/usr/local/bin --with-openssl=/usr/local/ssl
------------------------------------------------------------------------------

Please advice me How I can fix the make failed;

Please let me know,If You have any questions or concerns.

Thanks,
Srinivas


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-15 18:50 UTC] skatta33 at hotmail dot com
-Status: Open +Status: Closed
 [2014-05-15 18:50 UTC] skatta33 at hotmail dot com
Hi,

I got fix for my problem.

I used CFLAGS with --std=gnu99 to the configure option and make was compiled with out any problem.

Here is my new configure options;

#CC=/usr/local/gcc4/bin/gcc CFLAGS="-std=gnu99" ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-curl=/usr/local/bin --with-openssl=/usr/local/ssl --without-pear


Thanks,
Srinivas
 [2014-08-28 12:35 UTC] tripivceta at hotmail dot com
This is a bug in configure, as it does not check for GCC 4.x and consequently does not add the "-std=c99" switch to the CFLAGS variable in the Makefile.

This is still an issue in the latest PHP 5.5.16 (as of this writing).

Why was this closed without a fix to the build engine???
 [2014-10-21 04:05 UTC] schulz at adi dot com
This should not be closed. Php does not build on Solaris as distributed. You have to google for the error message to find this information.

And you have to use -std=gnu99. -std=c99 does not work. Also, this bug is in php 5.6.2 as well as php 5.5.18.
 [2015-01-03 20:56 UTC] thomas at espix dot net
bump! I faced this as well under solaris 11 with php-5.6.4
 [2015-05-19 12:05 UTC] cmb@php.net
-Status: Closed +Status: Re-Opened
 [2016-01-09 01:29 UTC] bertrand at drouhard dot com
Same problem with SmartOS 2015Q3
Solved using this : 
./configure --enable-fpm  --with-libxml-dir=/opt/local CFLAGS="-std=gnu99"
 [2016-01-25 20:39 UTC] lbakersd at yahoo dot com
Same issue using solaris 11.3 and PHP 7.0.2

Solved by using CFLAGS="--std=gnu99"
 [2016-02-11 20:47 UTC] craigfairhurst at me dot com
Hi

CFLAGS="--std=gnu99" didn't fix it. I'm running CentOS PHP 5.5.32.
 [2016-05-04 20:06 UTC] zulrang at gmail dot com
Problem still exists in 7.0.6

Running on Solaris/SPARC 11, GCC 4.8.2
 [2017-05-26 16:14 UTC] markus dot loch at bs dot ch
26.Mai 2017

Problem is still evident on sparc Solaris 11.3.19.5.0 and GCC 4.8.2

# ./configure CFLAGS="--std=gnu99"   works
 [2017-05-26 16:19 UTC] markus dot loch at bs dot ch
... and PHP-7.1.5
 [2017-07-24 21:58 UTC] kalle@php.net
I'm not sure about adding this, as PHP by default should be built with C89. I'm not a Unix guy, but the idea of passing the c99 CFLAGS for extensions which includes third-party libraries that does require it, if any other parts errors out, then those should be fixed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Sep 17 09:01:26 2019 UTC