8 Replies Latest reply on Nov 30, 2009 11:14 PM by 807737

    gcc-4.3.3 compiling php-5.3.1 and extensions

    807737
      Hi, I am using gcc-4.3.3 to compile and Apache/PHP/Oracle/Mysql stack.

      I have got through building all the core components I wanted included eg:
      aspell-0.60.6
      gettext-0.17
      instantclient_11_1
      mysql-5.1.40
      tidy
      curl-7.19.7
      httpd-2.2.14
      mm-1.4.2
      openssl-0.9.8l

      All of the above were compiled and linked successfuly against objects and modules required by php 5.3.1
      FIrst time, I used a lot of optimisations, but have since recompiled everything with no opts at all, for the purpose of testing my problem.

      When I compile PHP itself, it parses the configure script successfully and locates all the modules above.

      When I compile PHP, it fails in various ways on the curl extension:
      /bin/sh /opt/src/cwis/php-5.3.1/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/curl/ -I/opt/src/cwis/php-5.3.1/ext/curl/ -DPHP_ATOM_INC -I/opt/src/cwis/php-5.3.1/include -I/opt/src/cwis/php-5.3.1/main -I/opt/src/cwis/php-5.3.1 -I/opt/src/cwis/php-5.3.1/ext/date/lib -I/opt/src/cwis/php-5.3.1/ext/ereg/regex -I/usr/include/libxml2 -I/opt/app/cwis/support/openssl/include -I/opt/app/cwis/support/curl/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/opt/app/cwis/support/gettext/include -I/opt/app/cwis/support/mysql/include/mysql -I/opt/app/cwis/support/oracle/instantclient_11_1/sdk/include -I/opt/src/cwis/php-5.3.1/ext/sqlite3/libsqlite -I/opt/app/cwis/support/aspell/include/pspell -I/opt/sfw/include -I/opt/app/cwis/support/mm/include -I/opt/src/cwis/tidy/include -I/opt/src/cwis/php-5.3.1/TSRM -I/opt/src/cwis/php-5.3.1/Zend  -I/opt/app/cwis/support/openssl/include -I/opt/app/cwis/support/mysql/include -I/opt/app/cwis/support/apache/include -I/opt/app/cwis/support/curl/include -I/opt/src/cwis/tidy/include -I/opt/app/cwis/support/aspell/include -I/opt/app/cwis/support/oracle/include -I/opt/app/cwis/support/mm/include -I/opt/app/cwis/support/gettext/include -D_POSIX_PTHREAD_SEMANTICS  -I/usr/include -g -O2   -c /opt/src/cwis/php-5.3.1/ext/curl/interface.c -o ext/curl/interface.lo 
      /opt/src/cwis/php-5.3.1/ext/curl/interface.c: In function '_php_curl_setopt':
      /opt/src/cwis/php-5.3.1/ext/curl/interface.c:1774: warning: call to '_curl_easy_setopt_err_progress_cb' declared with attribute warning: curl_easy_setopt expects a curl_progress_callback argument for this option
      /opt/src/cwis/php-5.3.1/Zend/zend_operators.h:230: internal compiler error: in int_mode_for_mode, at stor-layout.c:258
      Please submit a full bug report,
      with preprocessed source if appropriate.
      See <URL:http://forum.java.sun.com/forum.jspa?forumID=905> for instructions.
      gmake: *** [ext/curl/interface.lo] Error 1
      If I compile the same stack with optimisations, I get a different set of errors on various modules, plus the compiler will segfault.

      Any advice would be very helpful. I will try to post the errors with opts I am getting as well.
        • 1. Re: gcc-4.3.3 compiling php-5.3.1 and extensions
          807737
          Hi,
          I ran the make again, with curl and php compiled with the following options:
          CFLAGS="-g -xtarget=native -xarch=native  -fast -xprefetch=auto"
          CXXFLAGS="-g -xtarget=native -xarch=native -fast -xprefetch=auto"
          When I compile php 5.3.1 with gcc 4.3.3 it fails here:

          /bin/sh /opt/src/cwis/php-5.3.1/libtool --silent --preserve-dup-deps --mode=compile gcc -I/opt/src/cwis/php-5.3.1/ext/sqlite3/libsqlite -DSQLITE_ENABLE_FTS3=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_THREADSAFE=0  -Iext/sqlite3/ -I/opt/src/cwis/php-5.3.1/ext/sqlite3/ -DPHP_ATOM_INC -I/opt/src/cwis/php-5.3.1/include -I/opt/src/cwis/php-5.3.1/main -I/opt/src/cwis/php-5.3.1 -I/opt/src/cwis/php-5.3.1/ext/date/lib -I/opt/src/cwis/php-5.3.1/ext/ereg/regex -I/usr/include/libxml2 -I/opt/app/cwis/support/openssl/include -I/opt/app/cwis/support/curl/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/opt/app/cwis/support/gettext/include -I/opt/app/cwis/support/mysql/include/mysql -I/opt/app/cwis/support/oracle/instantclient_11_1/sdk/include -I/opt/src/cwis/php-5.3.1/ext/sqlite3/libsqlite -I/opt/app/cwis/support/aspell/include/pspell -I/opt/sfw/include -I/opt/app/cwis/support/mm/include -I/opt/src/cwis/tidy/include -I/opt/src/cwis/php-5.3.1/TSRM -I/opt/src/cwis/php-5.3.1/Zend  -I/opt/app/cwis/support/openssl/include -I/opt/app/cwis/support/mysql/include -I/opt/app/cwis/support/apache/include -I/opt/app/cwis/support/curl/include -I/opt/src/cwis/tidy/include -I/opt/app/cwis/support/aspell/include -I/opt/app/cwis/support/oracle/include -I/opt/app/cwis/support/mm/include -I/opt/app/cwis/support/gettext/include -D_POSIX_PTHREAD_SEMANTICS  -I/usr/include -g -xtarget=native -xarch=native -fast -xprefetch=auto   -c /opt/src/cwis/php-5.3.1/ext/sqlite3/libsqlite/sqlite3.c -o ext/sqlite3/libsqlite/sqlite3.lo 
          /opt/src/cwis/php-5.3.1/ext/sqlite3/libsqlite/sqlite3.c:18523:3: error: #error SQLite will not work correctly with the -ffast-math option of GCC.
          gmake: *** [ext/sqlite3/libsqlite/sqlite3.lo] Error 1
          so I remove the "-fast" from my options and compile again:
          CFLAGS="-g -xtarget=native -xarch=native  -xprefetch=auto"
          CXXFLAGS="-g -xtarget=native -xarch=native -xprefetch=auto"
          /bin/sh /opt/src/cwis/php-5.3.1/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/curl/ -I/opt/src/cwis/php-5.3.1/ext/curl/ -DPHP_ATOM_INC -I/opt/src/cwis/php-5.3.1/include -I/opt/src/cwis/php-5.3.1/main -I/opt/src/cwis/php-5.3.1 -I/opt/src/cwis/php-5.3.1/ext/date/lib -I/opt/src/cwis/php-5.3.1/ext/ereg/regex -I/usr/include/libxml2 -I/opt/app/cwis/support/openssl/include -I/opt/app/cwis/support/curl/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/opt/app/cwis/support/gettext/include -I/opt/app/cwis/support/mysql/include/mysql -I/opt/app/cwis/support/oracle/instantclient_11_1/sdk/include -I/opt/src/cwis/php-5.3.1/ext/sqlite3/libsqlite -I/opt/app/cwis/support/aspell/include/pspell -I/opt/sfw/include -I/opt/app/cwis/support/mm/include -I/opt/src/cwis/tidy/include -I/opt/src/cwis/php-5.3.1/TSRM -I/opt/src/cwis/php-5.3.1/Zend  -I/opt/app/cwis/support/openssl/include -I/opt/app/cwis/support/mysql/include -I/opt/app/cwis/support/apache/include -I/opt/app/cwis/support/curl/include -I/opt/src/cwis/tidy/include -I/opt/app/cwis/support/aspell/include -I/opt/app/cwis/support/oracle/include -I/opt/app/cwis/support/mm/include -I/opt/app/cwis/support/gettext/include -D_POSIX_PTHREAD_SEMANTICS  -I/usr/include -g -xtarget=native -xarch=native -xprefetch=auto   -c /opt/src/cwis/php-5.3.1/ext/curl/interface.c -o ext/curl/interface.lo 
          /opt/src/cwis/php-5.3.1/ext/curl/interface.c: In function 'curl_write':
          /opt/src/cwis/php-5.3.1/ext/curl/interface.c:937: internal compiler error: Segmentation Fault
          Please submit a full bug report,
          with preprocessed source if appropriate.
          See <URL:http://forum.java.sun.com/forum.jspa?forumID=905> for instructions.
          gmake: *** [ext/curl/interface.lo] Error 1
          Please advise!
          • 2. Re: gcc-4.3.3 compiling php-5.3.1 and extensions
            807737
            Hi,
            I dropped curl out of the list and compiled my stack using the gcc options:
            FLAGS="-W2,-Ripa_asm"
            CXXFLAGS="-W2,-Ripa_asm"
            I was able to compile the whole stack without curl using the options above.

            I got symbol relocation errors on libtidy.a because by default the package
            is only supplied as a static library, so I waved my magic wand and turned
            it into a shared object, libtidy.so. PHP accepts this in its test and identifies
            the library correctly so I am happy with that one.

            So that remains for me just curl. I compiled curl with the opts above
            and gcc doesn't like it - my next idea is to downgrade curl to a previous
            release and see if php 5.3.1 will link with that one in its list.

            If a workaround is possible, I would still be interested so this question will
            remain open.

            If anyone wants me to post my compile scripts for Solaris 10 and gccfss, I will
            do so.


            rachel
            • 3. Re: gcc-4.3.3 compiling php-5.3.1 and extensions
              807575
              Sorry I failed to reproduce the problems. Could you show me your configuration options and other commands that drive the building? It would be better if you sent me the pre-processed file by emaling to lijuan.hai@sun.com.

              Thanks,
              -- Lijuan
              • 4. Re: gcc-4.3.3 compiling php-5.3.1 and extensions
                807737
                Hi,
                I managed to get the whole stack to compile in the end by downgrading my curl version to curl-7.17.1.

                I think there are very tight loops in the more recent version.

                My configuration is what I consider to be a fairly complex build. It is an upgrade of the same build I
                did for Apache 2.0.54 and PHP-5.0.4 back in 2005-2006 and maintained up till now.

                Please note:

                1) I can compile any Curl version with gcc 4.3.3 with any optimisation, no problem.

                2) I can compile PHP-5.3.1 with all modules except curl, no problem.

                3) I cannot get any curl version after 7.17.1 to link against PHP 5.3.1 and gcc 4.3.3 to make the curl.so extension.

                4) To get the curl PHP 5.3.1 Extension (ie curl.so in the php/lib/<release>/ directory) to link against libcurl.so I had to do the following:

                (All the below only works for curl 7.17.1)
                1) compile the version curl-7.17.1
                2) When running PHP's configure, it actually breaks - in the conftest section for identifying the curl version, the -lcurl dependency is not added.
                3) I had to hack the PHP Makefile and add -L and -R Paths to my libcurl.so and -lcurl to various entries in the Makefile.

                4) The curl module just works correctly with the latest curl release but fails to link the Extension.

                So there are some strange interactions with gcc 4.3.3, PHP 5.3.1 and libcurl down to at least 7.17.1 that cause it not work properly.

                Anyway, I have it all working now but here is my PHP config script:
                #!/bin/sh
                
                
                # CFLAGS="-g -xtarget=native -xarch=native  -xprefetch=auto"
                # CXXFLAGS="-g -xtarget=native -xarch=native -xprefetch=auto"
                
                CFLAGS="-W2,-Ripa_asm"
                CXXFLAGS="-W2,-Ripa_asm"
                
                
                
                LDFLAGS="-L/opt/app/cwis/support/openssl/lib -R/opt/app/cwis/support/openssl/lib -L/opt/app/cwis/support/mysql/lib/mysql -R/opt/app/cwis/support/mysql/lib/mysql -L/opt/app/cwis/support/apache/lib -R/opt/app/cwis/support/apache/lib -L/opt/app/cwis/support/curl/lib -R/opt/app/cwis/support/curl/lib -L/opt/app/cwis/support/aspell/lib -R/opt/app/cwis/support/aspell/lib -L/opt/app/cwis/support/oracle/instantclient_11_1 -R/opt/app/cwis/support/oracle/instantclient_11_1 -L/opt/app/cwis/support/mm/lib -R/opt/app/cwis/support/mm/lib -L/opt/app/cwis/support/gettext/lib -R/opt/app/cwis/support/gettext/lib -L/opt/app/cwis/support/tidy/lib -R/opt/app/cwis/support/tidy/lib"
                
                CPPFLAGS="-I/opt/app/cwis/support/openssl/include -I/opt/app/cwis/support/mysql/include -I/opt/app/cwis/support/apache/include -I/opt/app/cwis/support/curl/include -I/opt/app/cwis/support/tidy/include -I/opt/app/cwis/support/aspell/include -I/opt/app/cwis/support/oracle/include -I/opt/app/cwis/support/mm/include -I/opt/app/cwis/support/gettext/include"
                
                APP=php-5.3.1
                
                export CFLAGS CXXFLAGS LDFLAGS CPPFLAGS APP
                
                cd /opt/src/cwis/${APP}
                
                make clean
                rm config.status
                rm config.cache
                rm config.log
                
                ./configure --prefix=/opt/app/cwis/support/php --localstatedir=/var/cwis/php --with-apxs2=/opt/app/cwis/support/apache/sbin/apxs --enable-embed=shared --disable-cgi --with-layout=GNU --with-config-file-path=/opt/app/cwis/support/php/etc --enable-safe-mode  --with-curl=/opt/app/cwis/support/curl --enable-magic-quotes --disable-ipv6 --with-openssl=/opt/app/cwis/support/openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-zlib-dir --enable-ftp --with-openssl-dir=/opt/app/cwis/support/openssl --enable-mysqlnd --with-mysqli=shared,mysqlnd --with-mysql=shared,mysqlnd  --with-pdo-mysql=shared,mysqlnd --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-pear --with-ldap --enable-shared --with-libxml-dir=/usr --with-readline=/opt/sfw --with-freetype-dir=/usr/sfw --with-gd --enable-gd-native-ttf --with-tidy=/opt/app/cwis/support/tidy --with-pspell=/opt/app/cwis/support/aspell --with-xsl=/usr --enable-libgcc --with-pcre-regex  --enable-exif --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-xpm-dir=/usr --enable-soap -enable-shmop --with-mm=/opt/app/cwis/support/mm --with-oci8=instantclient,/opt/app/cwis/support/oracle/instantclient_11_1 --with-mysql-sock=/tmp --with-pdo-oci=instantclient,/opt/app/cwis/support/oracle/instantclient_11_1,11.1.0.7.0 --enable-zip --with-gettext=/opt/app/cwis/support/gettext --enable-dba=shared
                Edited by: virag064 on Nov 23, 2009 10:38 PM
                • 5. Re: gcc-4.3.3 compiling php-5.3.1 and extensions
                  807737
                  The resulting PHP 5.3.1 looks like this:
                  # ldd /opt/app/cwis/support/php/lib/libphp5.so 
                          libz.so.1 =>     /usr/lib/libz.so.1
                          libexslt.so.0 =>         /usr/lib/libexslt.so.0
                          libtidy.so =>    /opt/app/cwis/support/tidy/lib/libtidy.so
                          libresolv.so.2 =>        /lib/libresolv.so.2
                          libmm.so.14 =>   /opt/app/cwis/support/mm/lib/libmm.so.14
                          libreadline.so.4 =>      /opt/sfw/lib/libreadline.so.4
                          libtermcap.so.1 =>       /usr/ucblib/libtermcap.so.1
                          libaspell.so.15 =>       /opt/app/cwis/support/aspell/lib/libaspell.so.15
                          libcurl.so.4 =>  /opt/app/cwis/support/curl/lib/libcurl.so.4
                          libpspell.so.15 =>       /opt/app/cwis/support/aspell/lib/libpspell.so.15
                          librt.so.1 =>    /lib/librt.so.1
                          libldap.so.5 =>  /usr/lib/libldap.so.5
                          libintl.so.8 =>  /opt/app/cwis/support/gettext/lib/libintl.so.8
                          libfreetype.so.6 =>      /usr/sfw/lib/libfreetype.so.6
                          libX11.so.4 =>   /usr/lib/libX11.so.4
                          libXpm.so.4 =>   /usr/lib/libXpm.so.4
                          libpng12.so.0 =>         /usr/lib/libpng12.so.0
                          libjpeg.so.62 =>         /usr/lib/libjpeg.so.62
                          libssl.so.0.9.8 =>       /opt/app/cwis/support/openssl/lib/libssl.so.0.9.8
                          libcrypto.so.0.9.8 =>    /opt/app/cwis/support/openssl/lib/libcrypto.so.0.9.8
                          libbz2.so.1 =>   /usr/lib/libbz2.so.1
                          libm.so.2 =>     /lib/libm.so.2
                          libnsl.so.1 =>   /lib/libnsl.so.1
                          libsocket.so.1 =>        /lib/libsocket.so.1
                          libxml2.so.2 =>  /usr/lib/libxml2.so.2
                          libclntsh.so.11.1 =>     /opt/app/cwis/support/oracle/instantclient_11_1/libclntsh.so.11.1
                          libxslt.so.1 =>  /usr/lib/libxslt.so.1
                          libc.so.1 =>     /lib/libc.so.1
                          libgcc_s.so.1 =>         /opt/gcc/bin/../lib//libgcc_s.so.1
                          libpthread.so.1 =>       /lib/libpthread.so.1
                          libgcc_s.so.1 =>         /opt/app/cwis/support/gcc/lib/libgcc_s.so.1
                          libdl.so.1 =>    /lib/libdl.so.1
                          libstdc++.so.6 =>        /opt/app/cwis/support/gcc/lib/libstdc++.so.6
                          libaio.so.1 =>   /lib/libaio.so.1
                          libmd.so.1 =>    /lib/libmd.so.1
                          libsasl.so.1 =>  /usr/lib/libsasl.so.1
                          libnspr4.so =>   /usr/lib/mps/libnspr4.so
                          libplc4.so =>    /usr/lib/mps/libplc4.so
                          libnss3.so =>    /usr/lib/mps/libnss3.so
                          libssl3.so =>    /usr/lib/mps/libssl3.so
                          libsec.so.1 =>   /lib/libsec.so.1
                          libXext.so.0 =>  /usr/openwin/lib/libXext.so.0
                          libmp.so.2 =>    /lib/libmp.so.2
                          libscf.so.1 =>   /lib/libscf.so.1
                          libnnz11.so =>   /opt/app/cwis/support/oracle/instantclient_11_1/libnnz11.so
                          libkstat.so.1 =>         /lib/libkstat.so.1
                          libgen.so.1 =>   /lib/libgen.so.1
                          libsched.so.1 =>         /usr/lib/libsched.so.1
                          libm.so.1 =>     /lib/libm.so.1
                          libnssutil3.so =>        /usr/lib/mps/libnssutil3.so
                          libplds4.so =>   /usr/lib/mps/libplds4.so
                          libthread.so.1 =>        /lib/libthread.so.1
                          libavl.so.1 =>   /lib/libavl.so.1
                          libdoor.so.1 =>  /lib/libdoor.so.1
                          libuutil.so.1 =>         /lib/libuutil.so.1
                          /platform/SUNW,SPARC-Enterprise-T5220/lib/libc_psr.so.1
                          /platform/SUNW,SPARC-Enterprise-T5220/lib/libmd_psr.so.1
                          /usr/lib/mps/cpu/sparcv8plus/libnspr_flt4.so
                  And I have my extra modules installed thus:
                  # ls -la  /opt/app/cwis/support/php/lib/php/20090626/
                  total 2565
                  drwxr-xr-x   2 root     root          11 Nov 24 16:00 .
                  drwxr-xr-x   4 root     root           4 Nov 24 12:52 ..
                  -rwxr-xr-x   1 root     root       72636 Nov 24 12:52 curl.so
                  -rwxr-xr-x   1 root     root       64304 Nov 24 12:52 dba.so
                  -rwxr-xr-x   1 root     root      168156 Nov 24 14:10 hash.so
                  -rwxr-xr-x   1 root     root       53580 Nov 24 12:52 mysql.so
                  -rwxr-xr-x   1 root     root      136856 Nov 24 12:52 mysqli.so
                  -rwxr-xr-x   1 root     root      181144 Nov 24 15:52 pdf.so
                  -rwxr-xr-x   1 root     root       35420 Nov 24 12:52 pdo_mysql.so
                  -rwxr-xr-x   1 root     root      194772 Nov 24 16:00 suhosin.so
                  -rwxr-xr-x   1 root     root       21972 Nov 24 13:52 xdiff.so
                  And here is the PHP 5.3.1 curl.so linked against libcurl 7.17.1
                  ldd /opt/app/cwis/support/php/lib/php/20090626/curl.so
                          libcurl.so.4 =>  /opt/app/cwis/support/curl/lib/libcurl.so.4
                          libssl.so.0.9.8 =>       /opt/app/cwis/support/openssl/lib/libssl.so.0.9.8
                          libcrypto.so.0.9.8 =>    /opt/app/cwis/support/openssl/lib/libcrypto.so.0.9.8
                          libldap.so.5 =>  /usr/lib/libldap.so.5
                          libsocket.so.1 =>        /lib/libsocket.so.1
                          libnsl.so.1 =>   /lib/libnsl.so.1
                          libz.so.1 =>     /usr/lib/libz.so.1
                          libc.so.1 =>     /lib/libc.so.1
                          libgcc_s.so.1 =>         /opt/gcc/bin/../lib//libgcc_s.so.1
                          libdl.so.1 =>    /lib/libdl.so.1
                          libsasl.so.1 =>  /usr/lib/libsasl.so.1
                          libmd.so.1 =>    /lib/libmd.so.1
                          libnspr4.so =>   /usr/lib/mps/libnspr4.so
                          libplc4.so =>    /usr/lib/mps/libplc4.so
                          libnss3.so =>    /usr/lib/mps/libnss3.so
                          libssl3.so =>    /usr/lib/mps/libssl3.so
                          libmp.so.2 =>    /lib/libmp.so.2
                          libscf.so.1 =>   /lib/libscf.so.1
                          libpthread.so.1 =>       /lib/libpthread.so.1
                          librt.so.1 =>    /lib/librt.so.1
                          libnssutil3.so =>        /usr/lib/mps/libnssutil3.so
                          libplds4.so =>   /usr/lib/mps/libplds4.so
                          libthread.so.1 =>        /lib/libthread.so.1
                          libdoor.so.1 =>  /lib/libdoor.so.1
                          libuutil.so.1 =>         /lib/libuutil.so.1
                          libgen.so.1 =>   /lib/libgen.so.1
                          libaio.so.1 =>   /lib/libaio.so.1
                          libm.so.2 =>     /lib/libm.so.2
                          /platform/SUNW,SPARC-Enterprise-T5220/lib/libc_psr.so.1
                          /platform/SUNW,SPARC-Enterprise-T5220/lib/libmd_psr.so.1
                          /usr/lib/mps/cpu/sparcv8plus/libnspr_flt4.so
                  So I had to jump through a lot of hoops tp get libcurl to link against PHP 5.3.1.

                  I am satisfied that I have resolved all the dependencies I require for my stack. I think it will all work OK,
                  but I am annoyed I can't use the latest libcurl because it is such a simple module in comparison to most of the others,
                  including libtidy, which as mentioned I had to turn into a shared object to link at all


                  rachel
                  • 6. Re: gcc-4.3.3 compiling php-5.3.1 and extensions
                    807737
                    Hi,
                    I have been asked to get this resolved, using gcc-4.3.3 if possible and using the curl-7.19.7.

                    I did a little test and just tried to link curl against the php module itself.

                    SO I recompiled curl-7.19.7 successfully and installed it.
                    Then I copied the php-5.3.1 ext/curl module directory to another location and attempted to link it.
                    This works against curl-7.17.1 but not against curl-7.19.7. curl-7.17.1 is the last version I can get to link against php-5.3.1 and gcc-4.3.3.

                    So my test was to just link the module against curl-7.19.7:


                    Then I did the following:
                    bisset:curl 147# /opt/app/cwis/support/php/bin/phpize                           Configuring for:
                    PHP Api Version:         20090626
                    Zend Module Api No:      20090626
                    Zend Extension Api No:   220090626
                    bisset:curl 148# ./configure --with-php-config=/opt/app/cwis/support/php/bin/php-config --with-curl=/opt/app/cwis/support/curl
                    checking for egrep... egrep
                    checking for a sed that does not truncate output... /opt/sfw/bin/gsed
                    checking for cc... no
                    checking for gcc... gcc
                    checking for C compiler default output file name... a.out
                    checking whether the C compiler works... yes
                    checking whether we are cross compiling... no
                    checking for suffix of executables... 
                    checking for suffix of object files... o
                    checking whether we are using the GNU C compiler... yes
                    checking whether gcc accepts -g... yes
                    checking for gcc option to accept ANSI C... none needed
                    checking how to run the C preprocessor... gcc -E
                    checking for icc... no
                    checking for suncc... no
                    checking whether gcc and cc understand -c and -o together... yes
                    checking for system library directory... lib
                    checking if compiler supports -R... yes
                    checking build system type... sparc-sun-solaris2.10
                    checking host system type... sparc-sun-solaris2.10
                    checking target system type... sparc-sun-solaris2.10
                    checking for PHP prefix... /opt/app/cwis/support/php
                    checking for PHP includes... -I/opt/app/cwis/support/php/include/php -I/opt/app/cwis/support/php/include/php/main -I/opt/app/cwis/support/php/include/php/TSRM -I/opt/app/cwis/support/php/include/php/Zend -I/opt/app/cwis/support/php/include/php/ext -I/opt/app/cwis/support/php/include/php/ext/date/lib
                    checking for PHP extension directory... /opt/app/cwis/support/php/lib/php/20090626
                    checking for PHP installed headers prefix... /opt/app/cwis/support/php/include/php
                    checking if debug is enabled... no
                    checking if zts is enabled... no
                    checking for re2c... no
                    configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
                    checking for gawk... gawk
                    checking for cURL support... yes, shared
                    checking if we should use cURL for url streams... no
                    checking for cURL 7.10.5 or greater... libcurl 7.19.7
                    checking for SSL support in libcurl... yes
                    checking how to run the C preprocessor... gcc -E
                    checking for openssl support in libcurl... checking for ANSI C header files... yes
                    checking for sys/types.h... yes
                    checking for sys/stat.h... yes
                    checking for stdlib.h... yes
                    checking for string.h... yes
                    checking for memory.h... yes
                    checking for strings.h... yes
                    checking for inttypes.h... yes
                    checking for stdint.h... yes
                    checking for unistd.h... yes
                    no
                    checking for gnutls support in libcurl... no
                    checking for curl_easy_perform in -lcurl... yes
                    checking for curl_version_info in -lcurl... yes
                    checking for curl_easy_strerror in -lcurl... yes
                    checking for curl_multi_strerror in -lcurl... yes
                    checking for ld used by gcc... /usr/ccs/bin/ld
                    checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
                    checking for /usr/ccs/bin/ld option to reload object files... -r
                    checking for BSD-compatible nm... /usr/ccs/bin/nm -p
                    checking whether ln -s works... yes
                    checking how to recognise dependent libraries... pass_all
                    checking dlfcn.h usability... yes
                    checking dlfcn.h presence... yes
                    checking for dlfcn.h... yes
                    checking the maximum length of command line arguments... 262144
                    checking command to parse /usr/ccs/bin/nm -p output from gcc object... ok
                    checking for objdir... .libs
                    checking for ar... ar
                    checking for ranlib... ranlib
                    checking for strip... strip
                    checking if gcc static flag  works... yes
                    checking if gcc supports -fno-rtti -fno-exceptions... no
                    checking for gcc option to produce PIC... -fPIC
                    checking if gcc PIC flag -fPIC works... yes
                    checking if gcc supports -c -o file.o... yes
                    checking whether the gcc linker (/usr/ccs/bin/ld) supports shared libraries... yes
                    checking whether -lc should be explicitly linked in... yes
                    checking dynamic linker characteristics... solaris2.10 ld.so
                    checking how to hardcode library paths into programs... immediate
                    checking whether stripping libraries is possible... no
                    checking if libtool supports shared libraries... yes
                    checking whether to build shared libraries... yes
                    checking whether to build static libraries... no
                    
                    creating libtool
                    appending configuration tag "CXX" to libtool
                    configure: creating ./config.status
                    config.status: creating config.h
                    bisset:curl 149# gmake
                    /bin/bash /tmp/curl/libtool --mode=compile gcc  -I. -I/tmp/curl -DPHP_ATOM_INC -I/tmp/curl/include -I/tmp/curl/main -I/tmp/curl -I/opt/app/cwis/support/php/include/php -I/opt/app/cwis/support/php/include/php/main -I/opt/app/cwis/support/php/include/php/TSRM -I/opt/app/cwis/support/php/include/php/Zend -I/opt/app/cwis/support/php/include/php/ext -I/opt/app/cwis/support/php/include/php/ext/date/lib -I/opt/app/cwis/support/curl/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/curl/interface.c -o interface.lo 
                     gcc -I. -I/tmp/curl -DPHP_ATOM_INC -I/tmp/curl/include -I/tmp/curl/main -I/tmp/curl -I/opt/app/cwis/support/php/include/php -I/opt/app/cwis/support/php/include/php/main -I/opt/app/cwis/support/php/include/php/TSRM -I/opt/app/cwis/support/php/include/php/Zend -I/opt/app/cwis/support/php/include/php/ext -I/opt/app/cwis/support/php/include/php/ext/date/lib -I/opt/app/cwis/support/curl/include -DHAVE_CONFIG_H -g -O2 -c /tmp/curl/interface.c  -fPIC -DPIC -o .libs/interface.o
                    /tmp/curl/interface.c: In function '_php_curl_setopt':
                    /tmp/curl/interface.c:1774: warning: call to '_curl_easy_setopt_err_progress_cb' declared with attribute warning: curl_easy_setopt expects a curl_progress_callback argument for this option
                    /opt/app/cwis/support/php/include/php/Zend/zend_operators.h:230: internal compiler error: in int_mode_for_mode, at stor-layout.c:258
                    Please submit a full bug report,
                    with preprocessed source if appropriate.
                    See <URL:http://forum.java.sun.com/forum.jspa?forumID=905> for instructions.
                    gmake: *** [interface.lo] Error 1
                    bisset:curl 150# 
                    And so here we are.......

                    Any more help would be much appreciated
                    • 7. Re: gcc-4.3.3 compiling php-5.3.1 and extensions
                      807575
                      I can re-produce the errors now. Thanks for your instructions. We will be working on fixing the problems and making patch available on the forum.

                      Thanks,
                      -- Lijuan
                      • 8. Re: gcc-4.3.3 compiling php-5.3.1 and extensions
                        807737
                        Thankyou for your great support. I am looking forward to tthe solution!

                        Thanks again

                        Edited by: virag064 on Nov 30, 2009 3:14 PM