Thread: can't compile Pl/Java

can't compile Pl/Java

From
Roger Mason
Date:
hello,

I need to install Pl/java in my 8.0.12 PostgreSQL.  According to the
documentation on the PL/java wiki I must compile from source.

When I run make the following errors occur:

make[1]: Entering directory `/usr/local/share/pljava-1.3.0/build/classes/pljava'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/share/pljava-1.3.0/build/classes/pljava'
make[1]: Entering directory `/usr/local/share/pljava-1.3.0/build/classes/deploy'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/share/pljava-1.3.0/build/classes/deploy'
make[1]: Entering directory `/usr/local/share/pljava-1.3.0/build/objs'
i686-pc-linux-gnu-gcc -c -O2 -march=pentium-m -pipe -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement-Wendif-labels -fno-strict-aliasing -fpic  -I. -I/usr/include/postgresql/pgsql/server
-I/usr/include/postgresql/pgsql/internal-D_GNU_SOURCE  -DPKGLIBDIR=\"/usr/lib/postgresql\"
-I/usr/local/share/pljava-1.3.0/src/C/include-I/usr/local/share/pljava-1.3.0/build/jni -DPGSQL_MAJOR_VER=8
-DPGSQL_MINOR_VER=0-DPGSQL_PATCH_VER=12 -I"/home/rmason/.gentoo/java-config-2/current-user-vm/include"
-I"/home/rmason/.gentoo/java-config-2/current-user-vm/include/linux"
/usr/local/share/pljava-1.3.0/src/C/pljava/type/JavaWrapper.c-o type/JavaWrapper.o 
In file included from /usr/local/share/pljava-1.3.0/src/C/include/pljava/JNICalls.h:12,
                 from /usr/local/share/pljava-1.3.0/src/C/include/pljava/PgObject.h:12,
                 from /usr/local/share/pljava-1.3.0/src/C/include/pljava/PgObject_priv.h:12,
                 from /usr/local/share/pljava-1.3.0/src/C/include/pljava/type/Type_priv.h:12,
                 from /usr/local/share/pljava-1.3.0/src/C/pljava/type/JavaWrapper.c:10:
/usr/local/share/pljava-1.3.0/src/C/include/pljava/pljava.h:29:22: error: postgres.h: No such file or directory
/usr/local/share/pljava-1.3.0/src/C/include/pljava/pljava.h:30:28: error: lib/stringinfo.h: No such file or directory
/usr/local/share/pljava-1.3.0/src/C/include/pljava/pljava.h:31:18: error: fmgr.h: No such file or directory
/usr/local/share/pljava-1.3.0/src/C/include/pljava/pljava.h:32:25: error: mb/pg_wchar.h: No such file or directory
/usr/local/share/pljava-1.3.0/src/C/include/pljava/pljava.h:33:28: error: utils/syscache.h: No such file or directory
/usr/local/share/pljava-1.3.0/src/C/include/pljava/pljava.h:34:28: error: utils/memutils.h: No such file or directory
/usr/local/share/pljava-1.3.0/src/C/include/pljava/pljava.h:35:27: error: tcop/tcopprot.h: No such file or directory
In file included from /usr/local/share/pljava-1.3.0/src/C/include/pljava/JNICalls.h:12,
                 from /usr/local/share/pljava-1.3.0/src/C/include/pljava/PgObject.h:12,
                 from /usr/local/share/pljava-1.3.0/src/C/include/pljava/PgObject_priv.h:12,
                 from /usr/local/share/pljava-1.3.0/src/C/include/pljava/type/Type_priv.h:12,
                 from /usr/local/share/pljava-1.3.0/src/C/pljava/type/JavaWrapper.c:10:
/usr/local/share/pljava-1.3.0/src/C/include/pljava/pljava.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__'
before'pljavaEntryFence' 

Then follow many other errors.

The first error (not finding postgres.h) is puzzling because gcc is
looking in the right place:

/usr/include/postgresql/server/postgres.h

Thanks for any help,

Roger Mason


Re: can't compile Pl/Java

From
"Albe Laurenz"
Date:
Roger Mason wrote:
> I need to install Pl/java in my 8.0.12 PostgreSQL.  According to the
> documentation on the PL/java wiki I must compile from source.
>
> When I run make the following errors occur:
>
[...]
> i686-pc-linux-gnu-gcc -c -O2 -march=pentium-m -pipe -Wall
> -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels
> -fno-strict-aliasing -fpic  -I.
> -I/usr/include/postgresql/pgsql/server
> -I/usr/include/postgresql/pgsql/internal -D_GNU_SOURCE
> -DPKGLIBDIR=\"/usr/lib/postgresql\"
> -I/usr/local/share/pljava-1.3.0/src/C/include
> -I/usr/local/share/pljava-1.3.0/build/jni -DPGSQL_MAJOR_VER=8
> -DPGSQL_MINOR_VER=0 -DPGSQL_PATCH_VER=12
> -I"/home/rmason/.gentoo/java-config-2/current-user-vm/include"
> -I"/home/rmason/.gentoo/java-config-2/current-user-vm/include/linux"
> /usr/local/share/pljava-1.3.0/src/C/pljava/type/JavaWrapper.c
> -o type/JavaWrapper.o

> In file included from
> /usr/local/share/pljava-1.3.0/src/C/include/pljava/JNICalls.h:12,
>                  from
> /usr/local/share/pljava-1.3.0/src/C/include/pljava/PgObject.h:12,
>                  from
> /usr/local/share/pljava-1.3.0/src/C/include/pljava/PgObject_priv.h:12,
>                  from
> /usr/local/share/pljava-1.3.0/src/C/include/pljava/type/Type_priv.h:12,
>                  from
> /usr/local/share/pljava-1.3.0/src/C/pljava/type/JavaWrapper.c:10:
> /usr/local/share/pljava-1.3.0/src/C/include/pljava/pljava.h:29:22: error: postgres.h: No such file or directory
[...]
>
> Then follow many other errors.
>
> The first error (not finding postgres.h) is puzzling because gcc is
> looking in the right place:
>
> /usr/include/postgresql/server/postgres.h

Is it? I see no -I/usr/include/postgresql/server in the
gcc command line. Please check again!

Yours,
Laurenz Albe