Forum Stats

  • 3,827,682 Users
  • 2,260,803 Discussions
  • 7,897,336 Comments

Discussions

compiling php 5.6.# fails with sun compiler 12.3 on sparc solaris 10.

user4485593
user4485593 Member Posts: 196
edited Jun 9, 2016 9:47AM in PHP

I hope someone can help.  I had no problems compiling php 5.3.# and 5.5.# on Sparc solaris 10 with Sun CC 12.3, but 5.6.# fails with the error below.   GCC works but my whole application and environment is built with Sun CC.  This is where it fails.  I even tried adding /usr/sfw to the paths but no change.

Lots of white space character errors before it fails on line 70. I saw something about flex and re2c so I installed re2c, and it didn't help.  I tried without opcache, no help.

Any help would be appreciated.

"Zend/zend_language_scanner.l", line 66: warning: invalid white space character in directive

"Zend/zend_language_scanner.l", line 67: warning: invalid white space character in directive

"Zend/zend_language_scanner.l", line 68: warning: invalid white space character in directive

"Zend/zend_language_scanner.l", line 69: warning: invalid white space character in directive

"Zend/zend_language_scanner.l", line 70: warning: function prototype parameters must have types

"Zend/zend_language_scanner.l", line 70: warning: old-style declaration or incorrect type for: SCNG

"Zend/zend_language_scanner.l", line 70: cannot initialize function: SCNG

"Zend/zend_language_scanner.l", line 70: undefined symbol: x

#!/bin/sh

#

# Configure PHP

#

PATH=/usr/bin:/usr/local/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/sbin:/usr/dt/bin; export PATH

LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/local/ssl/lib; export LD_LIBRARY_PATH

LD_RUN_PATH=/usr/local/ssl/lib:/usr/local/lib; export LD_RUN_PATH

#

env CC=cc CXX=CC \

  ./configure \

  --with-apxs2=/usr/local/apache2/bin/apxs \

  --with-mysql=mysqlnd \

  --with-pear \

  --with-libxml-dir=/usr \

  --with-mysqli=mysqlnd \

  --with-pdo-mysql=mysqlnd \

  --enable-mbstring \

  --with-curl \

  --with-gd \

  --with-jpeg-dir=/usr/lib \

  --enable-soap \

  --with-openssl=/usr/local/ssl \

  --enable-zip \

  --with-iconv=/opt/local \

  --enable-opcache

#!/end

#

Answers

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,648 Employee
    edited Feb 8, 2016 10:52PM

    I think this got asked/answered in the PHP mail lists.

    This was a suggestion:

    # gmake Makefile fragment to clean a file of its carriage returns.

    # Carriage returns drive the Studio compiler crazy.

    cleancr = $(GSED) -i -e 's/\r//g' $(1) ;

  • user4485593
    user4485593 Member Posts: 196
    edited Mar 3, 2016 11:46AM

    Hello.  Thank you for this answer.  I am not sure of what to do with that line please.   I believe it is removing cleaning CRs, but how do I run it please, or on what?   Do I run it on the file I think is causing the error

    # cleancr file_being_compiled?

    Thank you

  • user4485593
    user4485593 Member Posts: 196
    edited Jun 9, 2016 9:47AM

    Hello.

    I found a solution to my problem.  This was my post.  If you do a dos2unix on php-5.6.#/Zend/ zend_language_scanner.c, then PHP compiles with Sun CC.  I noticed that if you vi that file, the EOL characters were ^M.  I looked at the prior versions, even 5.5.#, and that wasn't the case.

    So all I did was this and the compile worked with Sun CC 12.3.

    dos2unix zend_language_scanner.c zend_language_scanner.c

This discussion has been closed.