Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 2009 21:07:43 -0800
From:      Greg Lewis <glewis@eyesbeyond.com>
To:        Frederic de la Goublaye <fredericdelagoublaye@gmail.com>
Cc:        freebsd-java@freebsd.org
Subject:   Re: mod-jk-apache2 make error with apache22 on FreeBSD 8.0-RELEASE
Message-ID:  <20091230050743.GA32339@misty.eyesbeyond.com>
In-Reply-To: <32a0facf0912291314k3c9725fci845435623a8a5e2a@mail.gmail.com>
References:  <32a0facf0912290134s3411e5ccsd803b2bbec9de5b8@mail.gmail.com> <32a0facf0912291314k3c9725fci845435623a8a5e2a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-java
> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org"

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091230050743.GA32339>