agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] Problems compiling under Mac OS X
Date: Fri, 14 May 2004 17:02:54 +0200
Message-ID: <C7B71C1A-A5B7-11D8-9A58-0003933F0AB6@mac.com> (raw)
In-Reply-To: <thhal-0wD+AAa+rClwp/lFSxAL2BRewQcwRbx@mailblocks.com>
References: <E02918AC-A580-11D8-9A58-0003933F0AB6@mac.com>
<06f301c439a2$74ee5c80$eb4917ac@cor>
<thhal-0vz+AAa2rClw0+6EGmM3qaXukrWQwAP@mailblocks.com>
<thhal-0wD+AAa+rClwp/lFSxAL2BRewQcwRbx@mailblocks.com>
Le mai 14, 2004, ? 12:58, Thomas Hallgren a ?crit :
> Hi Pascal,
> The makefile is easy enough to change. I don't have access to a Mac OS
> X
> based machine though, so it's hard for me to test that the change is
> correct. I'd very much like your help. Some suggestions and answers to
> your
> questions:
>
> Instead of adding #ifdef DARWIN to the source code in order to find the
> jni.h, I'd suggest that you instead add a -I flag to the CPPFLAGS. I'm
> a big
> fan of controlling the environment through the makefile instead of
> using
> #ifdef whenever possible.
>
whenever possible... I agree
I do have given a try to
-I/System/Library/Frameworks/JavaVM.framework/Headers/
and it works...
a the condtion to change the linking instructions (see below).
> Regarding 'ant'. There are two possibilities. Either the 'depend' task
> is
> defined in the optional.jar (included in the ant distrib) and you
> don't have
> that in your classpath, or you ant version is too old. In any case, I'd
> recommend that you uppgrade ant. 1.5.1 whas a while ago...
>
Bingo !
the optional.jar was missing !
Now using the ant shipping with JBuilderX (1.5.4)
so the C/pljava/Makefile is now
#-----------------------------------------------------------------------
--
#
# Makefile--
# Makefile for pljava
#
#-----------------------------------------------------------------------
--
NAME := pljava
include $(MODULEROOT)/Makefile.global
ifeq ($(PORTNAME), win32)
DLL_BUILD := 1
else
ifeq ($(PORTNAME), cygwin)
DLL_BUILD := 1
override CPPFLAGS := -DCYGWIN $(CPPFLAGS)
else
ifeq ($(PORTNAME), darwin)
override CPPFLAGS :=
-I/System/Library/Frameworks/JavaVM.framework/Headers/ $(CPPFLAGS)
else
JRE_INCL := $(PORTNAME)
ifeq ($(host_cpu), i686)
JRE_LIB := lib/i386/client
else
JRE_LIB := lib/$(host_cpu)/client
endif
endif
endif
endif
ifdef DLL_BUILD
JRE_INCL := win32
JRE_LIB := bin/client
# This works but is not very nice since it affects all
# DLLTOOL invocations in Makefile.shlib. A custom flag
# is requested from postgres.
#
override DLLTOOL := $(DLLTOOL) --add-stdcall-alias
endif
ifdef USE_GCJ
override CPPFLAGS := -DGCJ $(CPPFLAGS)
SHLIB_LINK = $(BE_DLLLIBS) -lgcj -lwsock32
else
ifeq ($(PORTNAME), darwin)
SHLIB_LINK = $(BE_DLLLIBS) -L. -framework JavaVM
else
override CPPFLAGS := -I$(JDK_HOME)/include
-I$(JDK_HOME)/include/$(JRE_INCL) $(CPPFLAGS)
SHLIB_LINK = $(BE_DLLLIBS) -L. -L$(JDK_HOME)/jre/$(JRE_LIB)
-ljvm
endif
endif
... no changes after that
The change
#ifdef DARWIN
#include <JavaVM/jni.h>
#else
#include <jni.h>
#endif
shoudl not be necessary anymore.
Now everything compiles,
regarding the tests : do you have any more precise instructions to
follow than what is in the README ?
Pascal Pochet
p3consulting at mac.com
----------------------------------
PGP
KeyID: 0x208C5DBF
Fingerprint: 9BFB 245C 5BFE 7F1D 64B7 C473 ABB3 4E83 208C 5DBF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2369 bytes
Desc: not available
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20040514/20b3e97d/attachment.bin;
view thread (7+ messages) latest in thread
Message-ID: <C7B71C1A-A5B7-11D8-9A58-0003933F0AB6@mac.com>
Permalink: ../C7B71C1A-A5B7-11D8-9A58-0003933F0AB6@mac.com/
Also on: postgresql.org/message-id/C7B71C1A-A5B7-11D8-9A58-0003933F0AB6@mac.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] Problems compiling under Mac OS X
In-Reply-To: <C7B71C1A-A5B7-11D8-9A58-0003933F0AB6@mac.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox