3

I am trying to install php7 on Solaris 10.

OpenSSL 1.0.1 was installed from https://www.opencsw.org/packages/libssl1_0_0/

To check for the installed ssl I did

pkginfo -i | grep -i "ssl" 

and I got this output:

application CSWlibssl1-0-0                   libssl1_0_0 - Openssl 1.0 runtime libraries
GNOME2      SUNWopenjade                     DSSSL-Engine for SGML documents
GNOME2      SUNWopenjade-devel               DSSSL-Engine for SGML documents  - developer files
GNOME2      SUNWopenjade-root                DSSSL-Engine for SGML documents - platform independent files, / filesystem
GNOME2      SUNWopenjade-share               DSSSL-Engine for SGML documents - platform independent files, /usr/share
system      SUNWopenssl-commands             OpenSSL Commands (Usr)
system      SUNWopenssl-include              OpenSSL Header Files
system      SUNWopenssl-libraries            OpenSSL Libraries (Usr)
system      SUNWopenssl-man                  OpenSSL Manual Pages
system      SUNWopensslr                     OpenSSL (Root)
utility     openssl                          openssl 1.0.1j SPARC 64bit Solaris 10

Then, to check install path, I did

pkgchk -l CSWlibssl1-0-0 | egrep '^(Pathname|Type)'

which gave

Pathname: /opt/csw/lib/libcrypto.so.1.0.0
Type: regular file
Pathname: /opt/csw/lib/libssl.so.1.0.0
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0
Type: directory
Pathname: /opt/csw/lib/openssl-1.0.0/engines
Type: directory
Pathname: /opt/csw/lib/openssl-1.0.0/engines/lib4758cca.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libaep.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libatalla.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libcapi.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libchil.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libcswift.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libgmp.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libgost.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libnuron.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libpadlock.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libpk11.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libsureware.so
Type: regular file
Pathname: /opt/csw/lib/openssl-1.0.0/engines/libubsec.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/libcrypto.so.1.0.0
Type: regular file
Pathname: /opt/csw/lib/sparcv9/libssl.so.1.0.0
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0
Type: directory
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines
Type: directory
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/lib4758cca.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libaep.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libatalla.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libcapi.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libchil.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libcswift.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libgmp.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libgost.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libnuron.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libpadlock.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libpk11.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libsureware.so
Type: regular file
Pathname: /opt/csw/lib/sparcv9/openssl-1.0.0/engines/libubsec.so
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0
Type: directory
Pathname: /opt/csw/share/doc/libssl1_0_0/CHANGES
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/CHANGES.SSLeay
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/FAQ
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/INSTALL
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/NEWS
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/PROBLEMS
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/README
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/README.ASN1
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/README.CSW
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/README.ENGINE
Type: regular file
Pathname: /opt/csw/share/doc/libssl1_0_0/license
Type: regular file

Then I did this:

#CC="/opt/gcc-4.9.0/bin/gcc" \
 #export CC
 #CFLAGS="-std=gnu99 -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
 # export CFLAGS
 # LDFLAGS="-L/opt/gcc-4.9.0/lib -L/usr/local/lib -R/opt/gcc-4.9.0/lib"
 # export LDFLAGS
 # cd /php-7.2.4

so, my configure script in the php directory looks like this:

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/lib --with-apxs2=/usr/apache2.4.3/bin/apxs --with-ldap=/opt/gcc-4.9.0/lib \
 --with-mysql --with-mysqli --with-pdo-mysql --with-pdo-mysql  --with-zlib --with-zlib-dir=/usr/local \
 --with-iconv-dir=/usr/local --with-pcre-dir=/usr/local --with-gettext=/usr/local --with-libxml-dir=/usr/local --with-curl --with-openssl \
 --with-openssl-dir=/opt/csw/lib/ --with-gd --with-freetype-dir=/usr/local --with-gnu-ld --enable-shared --enable-mbstring \
 --with-oci8=instantclient,/ebsproddb/oracle/11.2.0/instantclient \
 --enable-exif --enable-sockets --enable-soap --enable-zip  --enable-ftp --enable-mysqlnd --disable-zend-signals --disable-static

However the configure fails after several attempt with.

checking for pkg-config... /usr/bin/pkg-config
configure: error: OpenSSL version 1.0.1 or greater required.

What am I doing wrong?

3

It seems you're not specify openssl header files.

--with-openssl=DIR      Include OpenSSL support (requires OpenSSL >= 1.0.1)

So, might be as follows

./configure --with-openssl=/path_to_header_files --with-openssl-dir=/opt/csw/lib....etc

Please check the output of configure script with --help option.

  • didn't quite get that ? – kplus May 31 '18 at 16:39
  • By the way, openssl 1.0.1 has vulnerability. I think you should not use that version.cvedetails.com/vulnerability-list/vendor_id-217/product_id-383/… – h.abe May 31 '18 at 16:39
  • yes, it was only --with-openssl. so, add path to header files and please try again. i hope it works. thanks. – h.abe May 31 '18 at 16:47
  • tried editing the header , but it kept giving : configure: error: Cannot find OpenSSL's <evp.h> – kplus Jun 1 '18 at 11:41
  • so, I found out that include directory in the csw , meant to contain the headers was empty, so I did /opt/csw/bin/pkgutil -y -i libssl_dev to install libssl_dev , then --with-openssl=/opt/csw --with-openssl-dir=/opt/csw/ – kplus Jun 2 '18 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.