Compiling PHP 5.1 with Sun Studio C compiler
Hi all,
Have strange thing.
Installed a new system with sun studio 11
compiled php 5.1.4 without any problem.
Installed the sun studio 11 patches and also the latest patches for sun solaris 10 (btw using solaris 10U2)
After that when i try to compile php then i get this error
compiler(iropt) error: leaf_lookup: unknown constant type
cc: iropt failed for /Compiler/Webserver/php-5.1.5/Zend/zend_strtod.c
Could somebody help me out with this
thanks in advance
Filip
# 2
ok ,
I have done some testing and this is the conclusion.
I installed the following patches for Sun Studio 11 compiler
120760-07
120761-02
121015-02
121017-04
121019-02
121021-03
121023-02
off course i first made a backup of the SUNWspro directory so i could go back to the old situation.
And found at that in patch 120760-07 there is an update off the following file /opt/SUNWspro/prod/bin/iropt and yes this is the file that is giving the problem.
So i copied the old one back and all is working again.
i can compile php 5.1.x version again.
So hope this will help
thanks
# 5
Similiar problem with PHP-5.2.0 and SunStudio11 on Solaris 10 U3 (11/06) with latest patches.
Machine hardware:sun4u
OS version: 5.10
Processor type:sparc
Hardware:SUNW,Sun-Fire-V890
The following components are installed on your system:
Sun Studio 11
Sun Studio 11 C Compiler
Sun Studio 11 C++ Compiler
Sun Studio 11 Tools.h++ 7.1
Sun Studio 11 C++ Standard 64-bit Class Library
Sun Studio 11 Garbage Collector
Sun Studio 11 Debugging Tools (including dbx)
Sun Studio 11 Performance Analyzer (including collect, ...)
Sun Studio 11 Performance Library
Sun Studio 11 LockLint
Sun Studio 11 Building Software (including dmake)
Sun Studio 11 Documentation Set
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/cc": Sun C 5.8 Patch 121015-03 2006/10/18
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/CC": Sun C++ 5.8 Patch 121017-07 2006/11/02
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/dbx": Sun Dbx Debugger 7.5 Patch 121023-03 2006/10/18
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/analyzer": Sun Performance Analyzer 7.5 Patch 120761-03 2006/11/02
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.7 2005/10/13
Error was:
compiler(iropt) error: leaf_lookup: unknown constant type
cc: iropt failed for /soft/php/php-5.2.0/Zend/zend_strtod.c
gmake: *** [Zend/zend_strtod.lo] Error 1
I must back out patches:
121019-04
121017-07
121019-03
120760-11
Then I compiled successful with following versions:
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/cc": Sun C 5.8 Patch 121015-03 2006/10/18
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/CC": Sun C++ 5.8 2005/10/13
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/dbx": Sun Dbx Debugger 7.5 Patch 121023-03 2006/10/18
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/analyzer": Sun Performance Analyzer 7.5 Patch 120761-03 2006/11/02
version of "/opt/SUNWspro/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.7 2005/10/13
Greets
--
Piotr (DrFugazi) Tarnowski
# 7
> Piotr,
>
> could you please post the complete compilation line
> which caused the error?
/bin/ksh /soft/php/php-5.2.0/libtool --silent --preserve-dup-deps --mode=compile cc -IZend/ -I/soft/php/php-5.2.0/Zend/ -DPHP_ATOM_INC -I/soft/php/php-5.2.0/include -I/soft/php/php-5.2.0/main -I/soft/php/php-5.2.0 -I/usr/local/include/libxml2 -I/usr/local/ssl/include -I/soft/php/php-5.2.0/ext/date/lib -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/local/include -I/usr/local/uw-imap/include -I/usr/local/openldap/include -I/soft/php/php-5.2.0/ext/mbstring/oniguruma -I/soft/php/php-5.2.0/ext/mbstring/libmbfl -I/soft/php/php-5.2.0/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include/mysql -I/soft/php/php-5.2.0/TSRM -I/soft/php/php-5.2.0/Zend -I/usr/local/include -I/usr/sfw/include -D_POSIX_PTHREAD_SEMANTICS -I/usr/include -fast -xautopar-c /soft/php/php-5.2.0/Zend/zend_strtod.c -o Zend/zend_strtod.lo
cc: Warning: -xarch=native has been explicitly specified, or implicitly specified by a macro option, -xarch=native on this architecture implies -xarch=v8plusb which generates code that does not run on pre UltraSPARC III processors
compiler(iropt) error: leaf_lookup: unknown constant type
cc: iropt failed for /soft/php/php-5.2.0/Zend/zend_strtod.c
gmake: *** [Zend/zend_strtod.lo] Error 1
But: if you save /opt/SUNWspro/prod/bin/iropt before applying patch, and then you recover it after patching, you can compile it successfully.
Greets
--
Piotr