mod-jk-apache2 make error with apache22 on FreeBSD 8.0-RELEASE

Greg Lewis glewis at eyesbeyond.com
Wed Dec 30 05:07:46 UTC 2009


G'day Frederic,

On Tue, Dec 29, 2009 at 10:14:50PM +0100, Frederic de la Goublaye wrote:
> the solution is here:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=138370

Thanks for looking into this.  The proposed solution is really a hack on
top of a hack.  It will work for your particular case, but it isn't going
to work for everyone.  It looks like the problem originates with the output
from apxs, a hack to workaround that and people having compiled Apache
with options like MySQL natively (like yourself).

The mod_jk build runs apxs to find out the link paths it should use.  On
my machine that looks like this:

> apxs -q LDFLAGS
-pthread -rpath=/usr/lib /usr/local/lib -L/usr/lib -L/usr/local/lib

Which looks odd.  At least some of it (e.g. the naked /usr/local/lib entry
in the middle of it) looks bogus.  On your machine I suspect it looks
something like this:

-pthread -rpath=/usr/lib -L/usr/local/lib/mysql /usr/local/lib -L/usr/lib -L/usr/local/lib

If you look at patch-tomcat-connectors-src:native:configure in the mod_jk
port, it tries to fix this, but sloppily, by replacing the first instance of
/usr/local/lib in the line with -L/usr/local/lib.  In my case that will
work.  In your case you'll end up with

-rpath=/usr/lib -L-L/usr/local/lib/mysql /usr/local/lib -L/usr/lib -L/usr/local/lib

after the substitution and the build will fail.  It seems like a better
patch would be to remove the raw /usr/local/lib, since there is already a
-L/usr/local/lib present.  That's still somewhat sloppy as it should really
be ${LOCALBASE} rather than hardcoded to /usr/local.

All that comes with the caveat that its been a long time since I played
with Apache very much.

> > I cannot install mod_jk-apache2 after the installation of apache22 on
> > FreeBSD 8.0 RELEASE
> >
> > Can you help me ?
> >
> > # cd /usr/ports/www/apache22/
> > # make
> > # make install
> >
> > It works!
> >
> >
> > # cd /usr/ports/www/mod_jk-apache2/
> > # make
> 
> > ../common/jk_ajp_common.lo ../common/jk_context.lo ../common/jk_url.lo
> > ../common/jk_status.lo
> > /usr/local/lib: file not recognized: File format not recognized
> > gmake[1]: *** [mod_jk.la] Error 1
> > gmake[1]: Leaving directory
> > `/usr/ports/www/mod_jk-apache2/work/tomcat-connectors-1.2.28-src/native/apache-2.0'
> > gmake: *** [all-recursive] Error 1
> > *** Error code 1
> >
> > Stop in /usr/ports/www/mod_jk-apache2.
> >
> > #
> >
> > END OF THE COMMAND LINES
> >
> _______________________________________________
> freebsd-java at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-java
> To unsubscribe, send any mail to "freebsd-java-unsubscribe at freebsd.org"

-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org


More information about the freebsd-java mailing list