[Pljava-dev] Problems compiling under Mac OS X

From: thhal at mailblocks(dot)com (Thomas Hallgren)
To:
Subject: [Pljava-dev] Problems compiling under Mac OS X
Date: 2004-05-14 10:58:55
Message-ID: thhal-0vz+AAa2rClw0+6EGmM3qaXukrWQwAP@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

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.

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...

If you get it up and running, I'd be happy to apply a patch.

Kind regards,

Thomas Hallgren

----- Original Message -----
From: "p3consulting" <p3consulting at mac.com>
To: <pljava-dev at gborg.postgresql.org>
Sent: Friday, May 14, 2004 10:29 AM
Subject: [Pljava-dev] Problems compiling under Mac OS X

> Hello,
>
> Here some reports of problems I have got trying compiling pljava under
> Mac OS X:
>
> 1. the jni.h file is in the JavaVM framework
> This requires a simple modification of the pljva/C/Makefile
>
> #-----------------------------------------------------------------------
> --
> #
> # 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)
> DLL_BUILD := 0
> override CPPFLAGS := -DDARWIN -framework JavaVM $(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
>
>
> 2. every #include <jni.h>
> should be converted to
> #ifdef DARWIN
> #include <JavaVM/jni.h>
> #else
> #include <jni.h>
> #endif
>
> 3. ant 1.5.1 is installed by default on Mac OS X
> the build fails with
>
> BUILD FAILED
> file:/Volumes/Data2/download_osx/PostgreSQL/org.postgresql.pljava/
> build.xml:30: Could not create task or type of type: depend.
>
> Ant could not find the task or a class this task relies upon.
>
> Should I have to install another ant version ?
> Another .jar missing ?
>
> Any idea ?
>
> Pascal Pochet
> p3consulting at mac.com
> ----------------------------------
> PGP
> KeyID: 0x208C5DBF
> Fingerprint: 9BFB 245C 5BFE 7F1D 64B7 C473 ABB3 4E83 208C 5DBF
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message p3consulting 2004-05-14 15:02:54 [Pljava-dev] Problems compiling under Mac OS X
Previous Message p3consulting 2004-05-14 08:29:53 [Pljava-dev] Problems compiling under Mac OS X