From: chap at anastigmatix.net (Chapman Flack) Date: Sat, 12 Sep 2015 14:21:10 -0400 Subject: [Pljava-dev] Pl/Java package in Ubuntu In-Reply-To: <55EF30D4.8070508@ltrr.arizona.edu> References: <55EF30D4.8070508@ltrr.arizona.edu> Message-ID: <55F46D16.1080305@anastigmatix.net> Peter Brewer wrote: > There is currently a pljava package for PG9.3 in the Ubuntu 14.04 > repositories but once installed even on 32bit OS it fails to run with > the following error: > ERROR: could not load library "/usr/lib/postgresql/9.3/lib/pljava.so": > /usr/lib/postgresql/9.3/lib/pljava.so: undefined symbol: HeapTupleGetOid Hmm ... PG 9.3.3. is what I've got installed here, and pljava loads just fine. I think this has to be a problem in how that Ubuntu package was built, because HeapTupleGetOid is a preprocessor macro defined in a PostgreSQL header file (/usr/include/postgresql/server/access/htup_details.h or wherever it lives in your distro) ... and it has been since 2002, if git blame can be believed. So, if that name ended up in the shared object as an undefined symbol ref, I have to think that Ubuntu build must have been made somehow without all the right PostgreSQL includes on the path ... very strange, I wouldn't expect it to work very well. > been removed from the Debian repository primarily to 64 bit issues: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743364 I took a look at that report; the particular C diagnostics they show there do not show up when I build (on x86_64) and I think you will get a working build if you just run 'mvn package' and then put the .so and .jar where they need to be, and make the right postgresql.conf settings. There are still a lot of C diagnostics in the build, more than I like to see, and until now I've been taking the attitude of "hmm, look at those later" because they don't stop the build and it loads and runs tests. I have begun to look at them... by my count, it's 112 warnings at 109 locations in 57 functions in 26 .c files, and I'd like to get those numbers moving in a downward direction. A lot of them are signed/unsigned disagreements between things like pgsql's, C's, and JNI's ideas of a 'size' type, and so on. I'm also working on the build process and documentation. It might be less fiddly soon (that's higher priority for me really than the C warnings). But in the meantime I think the current process should work and allow you to build what you need. -Chap