You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "John P. Dodge" <do...@cruciate.ca.boeing.com> on 2002/07/31 18:38:41 UTC

Compiling 2.0.39 on HPUX11.11

I am having trouble with compiling 2.0.39 on HP11.11. I have built
OpenSSL0.9.6c and installed it in /opt/ssl-engine-shared an I use the
configure script like this:

#!/bin/sh
CC=/opt/ansic/bin/cc
PATH=/opt/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/bin:/bin
CFLAGS='-O3 -DSSL_EXPERIMENTAL -DSSL_ENGINE -D_REENRANT -Ae +DAportable'
EXTRA_LIBS="-lcl -lpthread"
LD_LIBRARY_PATH=.:/opt/ssl-engine-shared/lib:/usr/lib:/lib:/usr/local/lib:${LD_LIBRARY_PATH}

export CC PATH CFLAGS LDFLAGS EXTRA_LIBS LD_LIBRARY_PATH


./configure \
        --prefix=/opt/boeing_web_servers/apache_2.0.39 \
        --with-layout=Apache \
        --without-confadjust \
	..... stuff deleted.....
        --with-mpm=worker \
        --enable-ssl=shared \
        --with-ssl=/opt/ssl-engine-shared


The error comes when it is making PCRE:

Making all in pcre
......

       ./dftables >
/opt/boeing_web_servers/apache/httpd-2.0.39/srclib/pcre/chartables.c
/usr/lib/dld.sl: Can't open shared library: ./libcrypto.sl.0.9.6
/usr/lib/dld.sl: No such file or directory
sh: 2289 Abort(coredump)
*** Error exit code 134

Stop.


Why is it expecting libcrypto.sl.0.9.6 in the current dir (.)?

I have tried symlinking the crypto lib to the current dir with no luck. I
am missing domething basic about compiling/linking on HPUX. I have built
1.3.x servers without any problem.

Does anyone know of good HOWTO's for HPUX?




							Thanks


----------------------------------------
"Mon aƩroglisseur est plein d'anguilles"
John P. Dodge
Boeing Shared Services


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


Re: Compiling 2.0.39 on HPUX11.11

Posted by Andy Cutright <ac...@borland.com>.
hi john,

i've been working on the same problem. dftables is having problems 
loading the openssl libraries because the libraries and executables have 
  been configured to use only the library path hardcoded into them when 
they are built. that is, they have no ability to dynamically locate 
dependent libraries at runtime.

if you run 'chatr' on the crypto libs & dftable, you'll probably see a 
line that says:

shared library dynamic search path
   SHLIB_PATH disabled second
   embedded path enabled first

this means it won't search for other libraries except in the 'embedded 
path'.

also, the crypto libs don't appear to be executable, making it 
impossible for dftables to load them. dftables is as you can probably 
tell actually an executable, so it has to run the crypto libs, not just 
link against them.

so in sum, i'm doing a couple of things before/during my build process. 
here's the steps, along with scripts. CAVEAT EMPTOR..

0. after running 'Configure' on openssl, run this perl script to make 
the openssl libraries capable of using the SHLIB_PATH search

$fileSep = "/";
$apache2Root = "/vobs/WEB/src/apache2/src";

$readFile =  $apache2Root . $fileSep . "srclib/openssl/Makefile.ssl.bak";
$writeFile = $apache2Root . $fileSep . "srclib/openssl/Makefile.ssl";

rename ($writeFile, $readFile);
open READ_FILE, "<$readFile" or die "$!\n";
open WRITE_FILE, ">$writeFile" or die "$!\n";
while (<READ_FILE>) {
   s/^(\s+\+vnocompatwarnings\s+)/$1\+s \+b \/usr\/lib:\/usr\/ccs\/lib /;
   print WRITE_FILE $_;
}
unlink READ_FILE;

1. chmod the crypto libs to be executable after they build, prior to 
buildling apache.

2. for apache, modify the libtool configuration scripts. here's perl 
script to do it:

$fileSep = "/";
$apache2Root = "/vobs/WEB/src/apache2/src";

$readFile =  $apache2Root . $fileSep . "srclib/apr/libtool.bak";
$writeFile = $apache2Root . $fileSep . "srclib/apr/libtool";

rename ($writeFile, $readFile);
open READ_FILE, "<$readFile" or die "$!\n";
open WRITE_FILE, ">$writeFile" or die "$!\n";
while (<READ_FILE>) {
   s/^hardcode_action=.+$/hardcode_action=unsupported/;
   s/^hardcode_direct=.+$/hardcode_direct=no/;
   print WRITE_FILE $_;
}
unlink READ_FILE;

$readFile =  $apache2Root . $fileSep . 
"srclib/apr-util/xml/expat/libtool.bak";
$writeFile = $apache2Root . $fileSep . "srclib/apr-util/xml/expat/libtool";

rename ($writeFile, $readFile);
open READ_FILE, "<$readFile" or die "$!\n";
open WRITE_FILE, ">$writeFile" or die "$!\n";
while (<READ_FILE>) {
   s/^hardcode_action=.+$/hardcode_action=unsupported/;
   s/^hardcode_direct=.+$/hardcode_direct=no/;
   print WRITE_FILE $_;
}



#cleanup..
unlink READ_FILE;


3. configure the apache makefiles to build necessary executables with 
the capacity to use SHLIB_PATH
#!/usr/dist/bin/perl -w
### 2.0.39, executables are built without dynamic paths
### lookup & fail to run, so add a +s to the linker flags..

$fileSep = "/";
$apache2Root = "/vobs/WEB/src/apache2/src";

$readFile =  $apache2Root . $fileSep . "srclib/pcre/Makefile.bak";
$writeFile = $apache2Root . $fileSep . "srclib/pcre/Makefile";

rename ($writeFile, $readFile);
open READ_FILE, "<$readFile" or die "$!\n";
open WRITE_FILE, ">$writeFile" or die "$!\n";
while (<READ_FILE>) {
   s/(^\s+\$\(LINK\).+)dftables.lo(.+$)/$1dftables.lo \-Wl\,\+s$2/;
   print WRITE_FILE $_;
}
unlink READ_FILE;

$readFile =  $apache2Root . $fileSep . "server/Makefile.bak";
$writeFile = $apache2Root . $fileSep . "server/Makefile";

rename ($writeFile, $readFile);
open READ_FILE, "<$readFile" or die "$!\n";
open WRITE_FILE, ">$writeFile" or die "$!\n";
while (<READ_FILE>) {
   s/(^\s+\$\(LINK\).+)(\$\(gen_test_char_OBJECTS\))(.+$)/$1 \-Wl\,\+s 
$2$3/;
   print WRITE_FILE $_;
}
unlink READ_FILE;



4. set SHLIB_PATH to the directories you want searched, like where the 
openssl libs live..


i'm still having problems at runtime, but i don't think those are 
directly related to the changes i've made. there appear to be some 
issues with shared memory usage, but those are somewhat documented in 
the httpd.conf, and i haven't had the time to get those worked through.

cheers,
andy

John P. Dodge wrote:

> I am having trouble with compiling 2.0.39 on HP11.11. I have built
> OpenSSL0.9.6c and installed it in /opt/ssl-engine-shared an I use the
> configure script like this:
> 
> #!/bin/sh
> CC=/opt/ansic/bin/cc
> PATH=/opt/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/bin:/bin
> CFLAGS='-O3 -DSSL_EXPERIMENTAL -DSSL_ENGINE -D_REENRANT -Ae +DAportable'
> EXTRA_LIBS="-lcl -lpthread"
> LD_LIBRARY_PATH=.:/opt/ssl-engine-shared/lib:/usr/lib:/lib:/usr/local/lib:${LD_LIBRARY_PATH}
> 
> export CC PATH CFLAGS LDFLAGS EXTRA_LIBS LD_LIBRARY_PATH
> 
> 
> ./configure \
>         --prefix=/opt/boeing_web_servers/apache_2.0.39 \
>         --with-layout=Apache \
>         --without-confadjust \
> 	..... stuff deleted.....
>         --with-mpm=worker \
>         --enable-ssl=shared \
>         --with-ssl=/opt/ssl-engine-shared
> 
> 
> The error comes when it is making PCRE:
> 
> Making all in pcre
> ......
> 
>        ./dftables >
> /opt/boeing_web_servers/apache/httpd-2.0.39/srclib/pcre/chartables.c
> /usr/lib/dld.sl: Can't open shared library: ./libcrypto.sl.0.9.6
> /usr/lib/dld.sl: No such file or directory
> sh: 2289 Abort(coredump)
> *** Error exit code 134
> 
> Stop.
> 
> 
> Why is it expecting libcrypto.sl.0.9.6 in the current dir (.)?
> 
> I have tried symlinking the crypto lib to the current dir with no luck. I
> am missing domething basic about compiling/linking on HPUX. I have built
> 1.3.x servers without any problem.
> 
> Does anyone know of good HOWTO's for HPUX?
> 
> 
> 
> 
> 							Thanks
> 
> 
> ----------------------------------------
> "Mon aƩroglisseur est plein d'anguilles"
> John P. Dodge
> Boeing Shared Services
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


-- 
"all you have is this actual nowness"
--
Borland -- Enabling a new digital world where our customers have the
freedom of choice to develop, deploy, and integrate applications across
the enterprise and  the Internet. http://www.borland.com

This e-mail, and any attachments thereto, is intended only for use by the
addressee(s) named herein and may contain legally privileged and/or 
confidential
information.  If you are not the intended recipient of this e-mail, you 
are hereby
notified that any dissemination, distribution or copying of this e-mail, 
and any
attachments thereto, is strictly prohibited.  If you have received this 
e-mail in
error,
please immediately and permanently delete the original and any copy of 
any e-mail
and any printout thereof.


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