Option 1) (Quick and dirty): Deploy libgcc_s.so. It's *not* the
compiler. The lib contains some machine specific runtime routines, for
which appropriate machine statements are not available.

Option 2): Compiling statically. If you've got good control over the
compilation process you can add "-static-libgcc" to gcc as flags. If you
don't want to find out, where all the gcc compile flags are coming from
(configure, environment variables etc.) you can decide to make all
compiles using static libgcc by hacking a specs file.

a) dump a specs file by calling "gcc -dumpspecs".

b) Edit the results and throw everything away except the block
beginneing with "*libgcc". The exact structure depends on the gcc
version. Here is an example:

*libgcc:
%{static|static-libgcc:-lgcc
-lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc
-lgcc_eh}%{shared-libgcc:-lgcc_s -lgcc}}%{shared:-lgcc_s}}}

Caution: this is only two lines, the second one is pretty long.

Now edit to make gcc link against libgcc (this is the static version)
instead of libgcc_s (the shared one) even if it has been called to
produce a shared object. In our example the result would be:

%{static|static-libgcc:-lgcc
-lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc
-lgcc_eh}%{shared-libgcc:-lgcc -lgcc_eh}}%{shared:-lgcc -lgcc_eh}}}

Save this file, e.g. as /my/gcc.specs.

Then set the environment variable CC to "gcc -specs=/my/gcc.specs" and
start building. You can check the library dependencies of the resulting
"*.so" file by using "ldd".

Good luck.

Regards,

Rainer

Kirk schrieb:
> There was a thread from February 1st on this same issue.  I am having the
> same problem that person did, but I tried everything in the thread and
> still
> no luck.
> 
> After I get mod_jk compiled I get this on server startup:
> 
> failure: CORE3170: Configuration initialization failed: Error running
> init function load-modules:
> dlopen of /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so failed
> (ld.so.1: webservd: fatal:
> relocation error: file
> /wamu/hr/sunone/plugins/mod_jk/nsapi_redirector.so: symbol __lshrdi3:
> referenced symbol not found)
> 
> 
> The one thing that I think is making a difference as compared to the person
> in the earlier thread is that gcc is not installed on the server I am
> trying
> to deploy on and I am not allowed to have it on there.  it is not an
> option,
> don't ask.  I tried static linking, but I have a feeling I am doing it
> wrong.
> 
> So, my question is, what exactly do I need to do to compile the mod_jk
> plugin for SunOne on Solaris where it is to be deployed on a server that
> does not have gcc installed at all?
> 
> Thanks,
> Kirk
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to