Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Apache + SSL + openssl + ( Solaris 10 x86 ).

81 views
Skip to first unread message

per.l...@inceritus.com

unread,
Feb 16, 2007, 3:27:05 AM2/16/07
to

Hi,

This seems to be the evil combo..

I've tried various versions of GCC in order to compile the above but
so far I've only made it passed openssl.
When I try to use openssl support in Apache this fails with "wrong ELF
class: ELFCLASS64".

Google suggests I should pass -xarch=amd64 to the compiler and I'm not
sure how to do that with GCC, any suggestions? (Yes, I'm downloading
SUNWspro).


Thanks!


Rgds

/PL

Thommy M.

unread,
Feb 16, 2007, 3:32:08 AM2/16/07
to
On Feb 16, 9:27 am, "per.lan...@inceritus.com"

If you go for the cool AMPS stack at http://www.sun.com/software/
solaris/amp/
I think you're home free. And it's perf tuned too...

per.l...@inceritus.com

unread,
Feb 16, 2007, 5:24:28 AM2/16/07
to
On Feb 16, 9:32 am, "Thommy M." <thommy.m.malmst...@gmail.com> wrote:
> On Feb 16, 9:27 am, "per.lan...@inceritus.com"
>
> <per.lan...@inceritus.com> wrote:
> > Hi,
>
> > This seems to be the evil combo..
>
> > I've tried various versions of GCC in order to compile the above but
> > so far I've only made it passed openssl.
> > When I try to use openssl support in Apache this fails with "wrong ELF
> > class: ELFCLASS64".
>
> > Google suggests I should pass -xarch=amd64 to the compiler and I'm not
> > sure how to do that with GCC, any suggestions? (Yes, I'm downloading
> > SUNWspro).
>
> If you go for the cool AMPS stack athttp://www.sun.com/software/

> solaris/amp/
> I think you're home free. And it's perf tuned too...

Never heard of the coolstack before and at first I didn't think this
would solve my problem because it simply said nothing about the core-
dilemma, the integration between Openssl and Apache but it seemd cool
((: so I gave it a go. Here's what I found:

I grabbed the coolstack_src_x86.tar package..

#cd src

#more README
This directory contains the source of selected open source
applications
for which we have build optimized binaries.
Each application has a file called 'config.sh' that specifies the
options to
'configure'.
To build optimized binaries for x86, please do the following :

. Add /usr/sfw/bin to your PATH

. Go into each of the directories and run :
gmake distclean
./config.sh
gmake
gmake install

. For mysql, there are two separate config scripts called
"config_32bit.sh'
and 'config_64bit.sh'. Use the appropriate one.

. For perl, the 'config.sh' is from the perl distribution - don't run
that.
Run "CFLAGS=-xO3; ./configure". Perl is built with Sun Studio 11
compiler
as the gcc version doesn't run. You can download Sun Studio compiler
from
http://developers.sun.com/prodtech/cc/downloads/index.jsp

#echo $PATH /usr/sfw/sbin:/usr/sfw/bin:/sbin:/bin:/usr/sbin:/usr/bin:/
usr/local/sbin:/usr/local/bin:/usr/xpg4/bin:/usr/ucb:/usr/ccs/bin

# ls -1
APC-3.0.11
README
httpd-2.0.58
libiconv-1.9.2
libxml2-2.6.26
mod_perl-2.0.2
mysql-5.0.22
perl-5.8.8
php-5.1.4
squid-2.5.STABLE14

#cd httpd-2.0.58

#more ./config.sh
CFLAGS='-DSSL_EXPERIMENTAL -DSSL_ENGINE -O4' ./configure --prefix=/usr/
local/apache2 --enable-mods-shared=all --enable-cache --enab
le-mem-cache --enable-ssl --with-mpm=prefork --enable-so --enable-
suexec --enable-rule=SSL_EXPERIMENTAL --with-ssl=/usr/sfw

Now, this explains it, they're not using openssl at all but hey, if
this works it's an option anyway.

#gmake distclean; ./config.sh ;gmake

.
.
.

b -R/usr/sfw/lib -o libmain.la test_char.h config.lo log.lo main.lo
vhost.lo util.lo util_script.lo util_md5.lo util_cfgtree.lo
util_ebcdic.lo util_time.lo rfc1413.lo connection.lo listen.lo
mpm_common.lo util_charset.lo util_debug.lo util_xml.lo util_filter.lo
exports.lo buildmark.lo scoreboard.lo error_bucket.lo protocol.lo
core.lo request.lo provider.lo eoc_bucket.lo
nawk -f /usr/local/BUILD/ARCH/coolstack/src/httpd-2.0.58/build/
make_var_export.awk `cat export_files` > export_vars.h
nawk: can't open file /export/home/src/httpd-2.0.58/include/
ap_compat.h
source line number 76
gmake[2]: *** [export_vars.h] Error 2
gmake[2]: Leaving directory `/usr/local/BUILD/ARCH/coolstack/src/
httpd-2.0.58/server'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/BUILD/ARCH/coolstack/src/
httpd-2.0.58/server'
gmake: *** [all-recursive] Error 1

but it doesn't. It's broken beyond belief.


Rgds

/PL

"Thommy M. Malmström"

unread,
Feb 16, 2007, 8:42:52 AM2/16/07
to
per.l...@inceritus.com wrote:
> On Feb 16, 9:32 am, "Thommy M." <thommy.m.malmst...@gmail.com> wrote:
>> On Feb 16, 9:27 am, "per.lan...@inceritus.com"
[...]

>> If you go for the cool AMPS stack athttp://www.sun.com/software/
>> solaris/amp/
>> I think you're home free. And it's perf tuned too...
>
> Never heard of the coolstack before and at first I didn't think this
> would solve my problem because it simply said nothing about the core-
> dilemma, the integration between Openssl and Apache but it seemd cool
> ((: so I gave it a go. Here's what I found:
>
> I grabbed the coolstack_src_x86.tar package..
>
> #cd src
[...]


Don't see way you go for building yourself? The packages are OK I think.


/Thommy M.

per.l...@inceritus.com

unread,
Feb 16, 2007, 8:45:55 AM2/16/07
to
On Feb 16, 11:24 am, "per.lan...@inceritus.com"


I managed to recover the broken stuff and after having been fiddling
around somewhat with the contents of config.sh I now have a
working ApacheSSL. Haven't tested with OpenSSL integration yet, will
do that later. I did test with SUNWspro though and it _failed_ with
the exact same ELF error messages despite me having set -xarch=amd64
etc .. something's fishy.


Rgds

/PL

per.l...@inceritus.com

unread,
Feb 16, 2007, 9:40:33 AM2/16/07
to
On Feb 16, 2:45 pm, "per.lan...@inceritus.com"


Na.. this must be hell.

The server SSL stuff doesn't work with Mozilla/Firefox due to:
[Fri Feb 16 15:03:19 2007] [info] SSL Library Error: 336187530 error:
1409D08A:SSL routines:SSL3_SETUP_KEY_BLOCK:cipher or hash unavailable

It does work with IE..

Rgds

/PL

per.l...@inceritus.com

unread,
Feb 16, 2007, 9:40:53 AM2/16/07
to
On Feb 16, 2:42 pm, "Thommy M. Malmström"
<thommy.m.malmst...@gmail.com> wrote:

per.l...@inceritus.com

unread,
Feb 16, 2007, 9:46:14 AM2/16/07
to
On Feb 16, 2:42 pm, "Thommy M. Malmström"
<thommy.m.malmst...@gmail.com> wrote:

#bzip2 -d coolstack_src_x86.tar.bz2
#tar xf coolstack_src_x86.tar
#cd src
#cd httpd-2.0.58
#gmake distclean;./config.sh;gmake;gmake install

Then you'll see the error message I posted..
They've never tested that package before shipping.. it contains
absolute paths to their own dev environment.
Crap!


Rgds

/PL

Marc

unread,
Feb 16, 2007, 10:17:54 AM2/16/07
to
"per.l...@inceritus.com" wrote:

> Then you'll see the error message I posted..
> They've never tested that package before shipping.. it contains
> absolute paths to their own dev environment.
> Crap!

I think the point was: why do you insist on building from source, when
there are pre-built packages available? If solaris, coolstack, blastwave
and sunfreeware are all missing an appropriate package (not source, I am
talking about the binaries), then you are really unlucky.

"Thommy M. Malmström"

unread,
Feb 16, 2007, 10:34:12 AM2/16/07
to

Have you tried the packages by themselves instead of building? Think it
can lower your frustration a bit if you do. Try this:

# bunzip2 CSQamp_x86.pkg.bz2
# pkgadd -d CSQamp_x86.pkg

per.l...@inceritus.com

unread,
Feb 16, 2007, 10:45:01 AM2/16/07
to
On Feb 16, 4:17 pm, Marc <marc.gli...@gmail.com> wrote:

Company policy..


Rgds

/PL

Chris Ridd

unread,
Feb 16, 2007, 12:11:42 PM2/16/07
to
On 2007-02-16 15:45:01 +0000, "per.l...@inceritus.com"
<per.l...@inceritus.com> said:

You're doing your own builds of OpenSolaris too then? ;-)

Cheers,

Chris

per.l...@inceritus.com

unread,
Feb 19, 2007, 9:36:55 AM2/19/07
to
On Feb 16, 6:11 pm, Chris Ridd <chrisr...@mac.com> wrote:
> On 2007-02-16 15:45:01 +0000, "per.lan...@inceritus.com"

Hehe.

I cracked it. It seems the compile options for Apache messed it up bad
(the Cool-stuf is still f**ked though).
I recommend everyone to use this line:
./configure --prefix=<apache inst dir> --enable-shared-mods=all --
enable-ssl=shared --enable-ssl --with-ssl=<path to open ssl inst dir>

In combo with the Sun GCC (3.4.3) compiler and CFLAGS="-m64" and Sun
gmake v3.80.


Rgds

/PL

0 new messages