Re: Mod_webapp Solaris 8

2001-11-29 Thread jean-frederic clere

Matt Goyer wrote:
 
 I've been struggling with this for a week or two now..
 
 I'm able to compile mod_webapp on Solaris 8 with GCC 3.0.1 using the
 snapshots of mod_webapp and apr from CVS. However I have to modify my
 apxs since three values don't get properly set by the apache makefile.
 I 
 So I then try and load my compiled mod_webapp with Apache and get the
 following error:
 
 Syntax error on line 206 of /usr/local/apache/conf/httpd.conf:
 Cannot load /usr/local/apache/libexec/mod_webapp.so into server:
 ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file
 /usr/local/apache/libexec/mod_webapp.so: symbol __lshrdi3: referenced
 symbol not found

Argh...! I thought I fixed the mod_webapp to detect this problem before
compiling...
Could you retry with
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/src/webapp-module-1.0.1-tc401-src.tar.gz
The configure should say Cannot mix gcc and native cc, if not tell me what
uname -a tells so I can add it to the check list.

The solution is _not_ using gcc with mod_webapp when apache-1.3 was compiled
with a native compiler.

 
 I then pulled apart libgcc.a (as recommend in a post here) and made
 libgcc.so and located it in /usr/lib and when I do:
 
 export LD_PRELOAD=/usr/lib/libgcc.so /usr/local/apache/bin/apachectl
 configtest
 
 I then get:
 
 Syntax error on line 206 of /usr/local/apache/conf/httpd.conf:
 Cannot load /usr/local/apache/libexec/mod_webapp.so into server:
 ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file
 /usr/local/apache/libexec/mod_webapp.so: symbol ap_table_get: referenced
 symbol not found
 
 What am I missing?
 
 Can anyone get mod_webapp working on Solaris 8?? If some has.. If you
 could post a quick install guide of what you did I'd appreciate that.
 
 I posted here before and someone talked about setting LD_LIBRARY_PATH
 and I tried that too to no avail.
 
 Matt
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Mod_webapp Solaris 8

2001-11-28 Thread Justin Erenkrantz

On Wed, Nov 28, 2001 at 11:15:07AM -0500, Matt Goyer wrote:
 Syntax error on line 206 of /usr/local/apache/conf/httpd.conf:
 Cannot load /usr/local/apache/libexec/mod_webapp.so into server:
 ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file
 /usr/local/apache/libexec/mod_webapp.so: symbol __lshrdi3: referenced
 symbol not found

You need to compile Apache with the same compiler as you compiled 
mod_webapp.  So, if you are using gcc-3.0.1, make sure that httpd 
was built with gcc-3.0.1.  An executable built with gcc-3.0.1 knows 
where to find gcclib.  -- justin


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Mod_webapp Solaris 8

2001-11-28 Thread mgoyer

Httpd was built with gcc-3.0.1 the same version that I'm using for
mod_webapp.

-Original Message-
From: Justin Erenkrantz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 28, 2001 11:34 AM
To: Tomcat Developers List
Subject: Re: Mod_webapp  Solaris 8


On Wed, Nov 28, 2001 at 11:15:07AM -0500, Matt Goyer wrote:
 Syntax error on line 206 of /usr/local/apache/conf/httpd.conf:
 Cannot load /usr/local/apache/libexec/mod_webapp.so into server:
 ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file
 /usr/local/apache/libexec/mod_webapp.so: symbol __lshrdi3: referenced 
 symbol not found

You need to compile Apache with the same compiler as you compiled 
mod_webapp.  So, if you are using gcc-3.0.1, make sure that httpd 
was built with gcc-3.0.1.  An executable built with gcc-3.0.1 knows 
where to find gcclib.  -- justin


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Mod_webapp Solaris 8

2001-11-28 Thread Justin Erenkrantz

On Wed, Nov 28, 2001 at 12:31:13PM -0500, mgoyer wrote:
 Httpd was built with gcc-3.0.1 the same version that I'm using for
 mod_webapp.

Then, just add -R/path/to/gcc-3.0.1/lib to your LDFLAGS for
httpd.

(Using gcc-3.0.1 on Solaris is a really tricky beast because
gcc doesn't add the -R flags to the binaries.)  -- justin


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Mod_webapp Solaris 8

2001-11-28 Thread Matt Goyer

Tricky beast it is!

I installed gcc 3.0.1 using the sunfreeware package and it looks like
it's sticking the lib files in 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1 so:

To configure Apache I'm doing:

LDFLAGS=-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1 \
./configure --enable-module=rewrite --enable-shared=rewrite

To configure mod_webapp I'm doing:

LDFLAGS=-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1 \ 
./configureLDFLAGS=-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1
./configure

And it's still the same error. Am I missing something?

Thanks,
Matt

-Original Message-
From: Justin Erenkrantz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 28, 2001 1:08 PM
To: Tomcat Developers List
Subject: Re: Mod_webapp  Solaris 8


On Wed, Nov 28, 2001 at 12:31:13PM -0500, mgoyer wrote:
 Httpd was built with gcc-3.0.1 the same version that I'm using for 
 mod_webapp.

Then, just add -R/path/to/gcc-3.0.1/lib to your LDFLAGS for httpd.

(Using gcc-3.0.1 on Solaris is a really tricky beast because gcc doesn't
add the -R flags to the binaries.)  -- justin


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Mod_webapp Solaris 8

2001-11-28 Thread Justin Erenkrantz

On Wed, Nov 28, 2001 at 01:26:41PM -0500, Matt Goyer wrote:
 Tricky beast it is!
 
 I installed gcc 3.0.1 using the sunfreeware package and it looks like
 it's sticking the lib files in 
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1 so:
 
 To configure Apache I'm doing:
 
 LDFLAGS=-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1 \
 ./configure --enable-module=rewrite --enable-shared=rewrite

You could try:

LIBS=-Lgcc \
LDFLAGS=-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1 \
./configure --enable-module=rewrite --enable-shared=rewrite

You need to force httpd to bring in libgcc (but Solaris's ld may
be stubborn about bringing it in if it isn't used).  

You may also have better luck if you get mod_webapp to compile 
statically.  The problem here is that the run-time link path on 
httpd is different than the link path that mod_webapp requires.
By compiling it statically, that problem goes away.

httpd-2.0 handles this much better since it'd bring in 
libgcc.  =)  -- justin


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Mod_webapp Solaris 8

2001-11-28 Thread Justin Erenkrantz

On Wed, Nov 28, 2001 at 10:32:05AM -0800, Justin Erenkrantz wrote:
 You could try:
 
 LIBS=-Lgcc \
 LDFLAGS=-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1 \
 ./configure --enable-module=rewrite --enable-shared=rewrite

Ack, I meant -lgcc not -Lgcc.  Freezing cold sticky fingers.  -- justin


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Mod_webapp Solaris 8

2001-11-28 Thread Aaron Bannert

On Wed, Nov 28, 2001 at 10:08:28AM -0800, Justin Erenkrantz wrote:
 On Wed, Nov 28, 2001 at 12:31:13PM -0500, mgoyer wrote:
  Httpd was built with gcc-3.0.1 the same version that I'm using for
  mod_webapp.
 
 Then, just add -R/path/to/gcc-3.0.1/lib to your LDFLAGS for
 httpd.

There's a trick for getting the path, try `gcc -print-libgcc-file-name`.
Barring syntax errors, you could probably do something like
LIBS=`gcc -print-libgcc-file-name`. I don't suggest dynamically
linking against libgcc.

Another solution is to use the GNU linker (gld from binutils). gld knows
about libgcc and implicitly pulls symbols from it when needed.

BTW, if you upgrade to libtool-1.4.2 you'll get a nice little warning
about using the solaris linker with gcc.

-aaron

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Mod_webapp Solaris 8

2001-11-28 Thread Matt Goyer

I've got both binutils and libtool installed.

How do I get it to use the GNU linker instead? Though 'ld -v' tells me
ld -v 'GNU ld version 2.11.2 (with BFD 2.11.2)'

Thanks,
Matt

-Original Message-
From: Aaron Bannert [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 28, 2001 1:56 PM
To: Tomcat Developers List
Subject: Re: Mod_webapp  Solaris 8


On Wed, Nov 28, 2001 at 10:08:28AM -0800, Justin Erenkrantz wrote:
 On Wed, Nov 28, 2001 at 12:31:13PM -0500, mgoyer wrote:
  Httpd was built with gcc-3.0.1 the same version that I'm using for 
  mod_webapp.
 
 Then, just add -R/path/to/gcc-3.0.1/lib to your LDFLAGS for httpd.

There's a trick for getting the path, try `gcc -print-libgcc-file-name`.
Barring syntax errors, you could probably do something like LIBS=`gcc
-print-libgcc-file-name`. I don't suggest dynamically linking against
libgcc.

Another solution is to use the GNU linker (gld from binutils). gld knows
about libgcc and implicitly pulls symbols from it when needed.

BTW, if you upgrade to libtool-1.4.2 you'll get a nice little warning
about using the solaris linker with gcc.

-aaron

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Mod_webapp Solaris 8

2001-11-28 Thread Aaron Bannert

On Wed, Nov 28, 2001 at 03:30:38PM -0500, Matt Goyer wrote:
 I've got both binutils and libtool installed.
 
 How do I get it to use the GNU linker instead? Though 'ld -v' tells me
 ld -v 'GNU ld version 2.11.2 (with BFD 2.11.2)'

That's a good question. I'm not seeing any relevant flags or params
that one can pass to gcc, and I am seing the string '/usr/ccs/bin/ld'
showing up in the gcc binary, so I'm guessing it has to be configured
at compile-time. Did you try setting the LD environment variable?

The only surefire ways I know of making this work are:
- add libgcc.a to your linker line (ie the output of
  `gcc -print-libgcc-file-name`)
- recompile gcc to use the gnu linker

-aaron

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]