[Pljava-dev] Building from source for PG 8.2.4
Eric Faulhaber
ecf at goldencode.com
Fri Aug 31 20:49:50 UTC 2007
Kris Jurka wrote:
>
>
> On Fri, 31 Aug 2007, Eric Faulhaber wrote:
>
>> Actually, it turns out something was wrong with my build: pljava.so was
>> not linking to libjvm.so. The problem area for me was with the setup of
>> the directory in which we look to link to the JVM (in
>> src/C/pljava/Makefile):
>>
>> JVM_LIB := $(firstword $(shell /bin/ls -d \
>> $(JRE_LIB)/client \
>> $(JRE_LIB)/server \
>> $(JRE_LIB)/jrockit \
>> 2> /dev/null))
>>
>> I temporarily worked around this by hard-coding the target JVM_LIB
>> directory in the Makefile, but clearly this is not a permanent
>> solution. So, something appears to be invalid with my build
>> environment. I had JAVA_HOME set to my Java 1.5 directory. Something
>> else I should have set?
>
> Any chance your machine reports something other than i386 or i686 for
> $host_cpu? If you have something like i586, the makefile in question
> will not provide the appropriate JRE_CPU mapping (circa line 55).
> Echoing JRE_LIB prior to were you hardcoded things would be informative.
Sure enough:
/usr/lib/jvm/java-1.5.0-sun/jre/lib/i486
The following change to the Makefile fixes this; however, as I am not a
make guru, there may be a better way to handle this:
RCS file:
/usr/local/cvsroot/pljava/org.postgresql.pljava/src/C/pljava/Makefile,v
retrieving revision 1.37
diff -r1.37 Makefile
57a58,60
> ifeq ($(host_cpu), i486)
> JRE_CPU := i386
> else
63a67
> endif
I am open to a better change, but I'll go with this for my local copy
for now.
The only question I have left: is there a way to partially override the
compiler options divined from pg_config, so I can turn off -g but
inherit the rest?
Thanks,
Eric Faulhaber
More information about the Pljava-dev
mailing list