I'm trying to build PHP 7.4 on Solaris sparc 10, but I'm getting this error:
d_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_inheritance.lo Zend/zend_smart_str.lo Zend/zend_cpuinfo.lo Zend/zend_execute.lo sapi/apache2handler/mod_php7.lo sapi/apache2handler/sapi_apache2.lo sapi/apache2handler/apache_config.lo sapi/apache2handler/php_functions.lo main/internal_functions.lo -lresolv -lrt -liconv -lintl -lrt -lm -lnsl -lsocket -lgcc -o libphp7.la ld: fatal: file /usr/local/lib/libiconv.so: wrong ELF class: ELFCLASS32 ld: fatal: file processing errors. No output written to .libs/libphp7.so *** Error code 1 make: Fatal error: Command failed for target `libphp7.la'
My configure is as follows:
./configure --disable-xmlwriter --disable-xmlreader --disable-simplexml --disable-xml --disable-dom --with-apxs2=/usr/apache2/bin/apxs --with-gd --with-zlib --disable-ipv6 --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --without-pear --with-openssl --with-mysqli --enable-bcmath --enable-ctype --enable-mbstring --with-gettext --prefix=/usr/php --without-libxml OPENSSL_CFLAGS=-I/usr/include/openssl OPENSSL_LIBS=-L/usr/local/ssl/include SQLITE_CFLAGS=-I/usr/php/include/php/ext SQLITE_LIBS=-L/usr/php/include/php/ext ZLIB_CFLAGS=-I/usr/include ZLIB_LIBS=-L/usr/include ONIG_CFLAGS=-I/usr/local/include/php/ext/mbstring ONIG_LIBS=-L/local/include/php/ext/mbstring
--with-external-pcre
--with-pcre-jit
PCRE2_LIBS=-L/app/INSTALL_FILES/php-7.4.13/ext/pcre/pcre2lib
PCRE2_CFLAGS=-I/app/INSTALL_FILES/php-7.4.13/ext/pcre/pcre2lib
SQLITE_LIBS=-L/app/INSTALL_FILES/php-7.2.5/ext/sqlite3/libsqlite
SQLITE_CFLAGS=-I/app/INSTALL_FILES/php-7.2.5/ext/sqlite3/libsqlite
Environment is set as follows:
$ env|grep LD
LDFLAGS=-L/opt/csw/lib/gcc -L/usr/local/lib -R/opt/csw/lib/gcc
LD_LIBRARY_PATH_64=/opt/csw/lib/sparcv9:/usr/local/64/lib:/usr/sfw/lib/sparcv9
LD_LIBRARY_PATH=/opt/csw/bin/sparcv9:/opt/csw/lib/sparcv9:/usr/local/include/php/ext/sqlite3/libsqlite:/opt/csw/lib:/usr/local/64/lib:/usr/sfw/lib/sparcv9:/usr/apache2.2/pcre/lib:/usr/apache2.2/apr_util/lib:/usr/apache2.2/apr/lib
LD_LIBRARY_PATH_32=/usr/local/include/php/ext/sqlite3/libsqlite:/opt/csw/lib:/usr/apache2.2/pcre/lib:/usr/apache2.2/apr_util/lib:/usr/apache2.2/apr/lib
Any help would be much appreciated, thanks in advance :)