httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Wang <aw...@ptc.com>
Subject Re: [users@httpd] Compile apache 2.4 on solaris 10 sparc with 64 bit openssl issue
Date Fri, 03 Apr 2015 17:09:27 GMT


On 04/03/2015 11:15 AM, Rainer Jung wrote:
> Am 03.04.2015 um 17:50 schrieb ਜਤਿੰਦਰ ਸਿੰਘ:
>> ~/openssl64/lib$ ls -ltr
>> total 10224
>> drwxr-x---   2 q1col2a1 q1col2a1      96 Apr  2 14:59 engines
>> -rw-r--r--   1 q1col2a1 q1col2a1 4401152 Apr  2 14:59 libcrypto.a
>> -rw-r--r--   1 q1col2a1 q1col2a1  823208 Apr  2 14:59 libssl.a
>> drwxr-x---   2 q1col2a1 q1col2a1      96 Apr  2 14:59 pkgconfig
>>
>> by openssl/lib - i meant the lib generated after the openssl install.
>
> So no shared libs.
>
> Try adding "shared -fPIC" to your OpenSSL config flags. Note it is
> "shared" not "-shared". Check whether config output contains any
> warning. I remember openssl with gcc on Solaris having a problem when
> one wants to build 64Bit versions but the compiler gcc is a 32 bit
> binary. That is technically not a problem, but the detection method for
> 64 bit support is broken on a platform, that supports 32 and 64 bits.
>
> Youmight try the following patch to the OpenSSL config file:
>
> @@ -446,7 +446,7 @@
>     if [ $GCCVER -ge 30 ]; then
>       # 64-bit ABI isn't officially supported in gcc 3.0, but it appears
>       # to be working, at the very least 'make test' passes...
> -    if gcc -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then
> +    if gcc -m64 -v -E -x c /dev/null 2>&1 | grep __arch64__ >
> /dev/null; then
>         GCC_ARCH="-m64"
>       else
>         GCC_ARCH="-m32"
>

The trick is to use Configure directly.

This is what I do for sparc:
OPENSSL_TARGET=solaris64-sparcv9-gcc
OPENSSL_CONFIG="./Configure $OPENSSL_TARGET --prefix=$OPENSSL_ROOT 
threads shared"

I also set
CC="gcc -static-libgcc"
CFLAGS="-m64"

But I can't remember if those were necessary for openssl or for one of 
the other dependencies.


>> On Fri, Apr 3, 2015 at 10:35 AM, Rainer Jung <rainer.jung@kippdata.de
>> <mailto:rainer.jung@kippdata.de>> wrote:
>>
>>     Am 03.04.2015 um 16:53 schrieb ਜਤਿੰਦਰ ਸਿੰਘ:
>>
>>
>>         uname -a
>>         SunOS XXXX 5.10 Generic_150400-14 sun4u sparc SUNW,Netra-T12
>>
>>         src distribution used - apache-httpd-2_4_12-src-__openssl-m.tar
>>
>>         /usr/sfw/bin/gcc -v
>>         Reading specs from
>>         /usr/sfw/lib/gcc/sparc-sun-__solaris2.10/3.4.3/specs
>>         Configured with:
>>
>> /sfw10/builds/build/sfw10-__patch/usr/src/cmd/gcc/gcc-3.4.__3/configure
>>         --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as
>>         --with-ld=/usr/ccs/bin/ld --without-gnu-ld
>> --enable-languages=c,c++
>>         --enable-shared
>>         Thread model: posix
>>         gcc version 3.4.3 (csl-sol210-3_4-branch+sol___rpath)
>>
>>         #Set ENV variables
>>
>>         export CFLAGS="-m64"
>>         export LDFLAGS="-L/usr/sfw/lib -R/usr/sfw/lib -L/usr/X/lib
>>         -R/usr/X/lib
>>         -L/usr/X11/lib -R/usr/X11/lib -L/usr/ccs/lib -R/usr/ccs/lib"
>>         export LD_LIBRARY_PATH=/usr/sfw/lib/__sparcv9:/usr/lib
>>         export LD_LIBRARY_PATH_64=/usr/lib/__64:/usr/sfw/lib/64
>>         export
>> PATH=$PATH:/usr/sfw/bin:/usr/__ccs/bin:/usr/ccs/bin/sparcv9
>>
>>         # build pcre
>>         cd ~/apache64-2-4-12/03-httpd/__pcre-8.36
>>         ./configure --disable-cpp CFLAGS="-g" CC="gcc -m64"
>>         --prefix=~/apache64-2-4-12/03-__httpd/pcre-8.36
>>         make clean
>>         make
>>         make install
>>
>>         # build apr
>>         cd ~/apache64-2-4-12/03-httpd/__apr-util-1.5.4
>>         ./configure --prefix=~/apache64-2-4-12/03-__httpd/apr-1.5.1
>>         make clean
>>         make
>>         make install
>>
>>         # build apr-util
>>         cd ~/apache64-2-4-12/03-httpd/__apr-util-1.5.4
>>         ./configure --prefix=~/apache64-2-4-12/03-__httpd/apr-util-1.5.4
>>         --with-apr=~/apache64-2-4-12/__03-httpd/apr-1.5.1
>>         make clean
>>         make
>>         make install
>>
>>         # build openssl
>>         cd ~/apache64-2-4-12/02-openssl/__openssl-1.0.1m
>>         ./config --prefix=~/openssl64
>>
>>
>>     Here is it ~/openssl64
>>
>>         make clean
>>         changed CGLAGS from m32 to m64 in makefile
>>         make
>>         make install
>>
>>
>>         # build apache2.4-12
>>         ./configure --prefix=~/apache-64-2-4-12/__Apache64HTTP
>> --enable-ssl
>>         --with-pcre=~/apache-64-2-4-__12/03-httpd/pcre-8.36
>>         --with-apr=~/apache-64-2-4-12/__03-httpd/apr-1.5.1
>>         --with-apr-util=~/apache-64-2-__4-12/03-httpd/apr-util-1.5.4
>>         --enable-ssl-staticlib-deps
>>         make clean
>>         make
>>         Failing with below error...
>>         ld: warning: file ~/openssl-64/lib/libssl.a(s2___clnt.o): wrong
>>         ELF class:
>>         ELFCLASS32
>>         ld: warning: file ~/openssl-64/lib/libcrypto.a(__mem.o): wrong
>>         ELF class:
>>         ELFCLASS32
>>
>>
>>     Here it is ~/openssl-64, additional dash!
>>
>>         these files are 32 bit on rechecking with file command inside
>>         openssl/lib, but openssl executable is 64 bits.
>>
>>
>>     What is "openssl/lib"?
>>
>>     Very strange, because openssl binary should link with openssl libs.
>>
>>     Regards,
>>
>>     Rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message