Subject: Re: [Pljava-dev] Building PLJava on Solaris issues References: <56F170BA.2000202@goldencode.com> <56F1FC23.1010904@anastigmatix.net> <56F2D1C0.6060801@goldencode.com> <56F6FB2B.9050209@anastigmatix.net> From: "Eugenie V. Lyzenko" Message-ID: <56F70A73.3000209@goldencode.com> Date: Sun, 27 Mar 2016 01:17:23 +0300 MIME-Version: 1.0 In-Reply-To: <56F6FB2B.9050209@anastigmatix.net> Content-Type: text/plain; charset=windows-1252; format=flowed Hi Chap, > On 03/23/16 13:26, Eugenie V. Lyzenko wrote: >> Yes, this works too, no need to patch *.jar file: >> >> bash path/to/mvn -Dnar.aolProperties=... clean install > Hi, > > I don't know if you will have a chance to try on the weekend, but does > something go wrong if you remove the -R/usr/postgres/9.4-pgdg/lib/64 > from your aol.properties file? Consider the following for final so: $ ldd libpljava-so-1.5.0-BETA2.so libecpg.so.6 => /usr/postgres/9.4-pgdg/lib/64/libecpg.so.6 libpgtypes.so.3 => /usr/postgres/9.4-pgdg/lib/64/libpgtypes.so.3 libpq.so.5 => /usr/postgres/9.4-pgdg/lib/64/libpq.so.5 ... The PLJava needs the library from PostgreSQL. And if we have several PostgreSQL versions installed on the system - we need to exactly point what version we want to link with(and 32 or 64 bit). > If so, could you describe the exact failure and the message? Now let's see what we have if to remove explicit declaring -R/usr/postgres/9.4-pgdg/lib/64 from aol.properties file: $ ldd libpljava-so-1.5.0-BETA2.so libecpg.so.6 => (file not found) libpgtypes.so.3 => /opt/csw/lib/64/libpgtypes.so.3 libpq.so.5 => /opt/csw/lib/64/libpq.so.5 At least we potentially will have one runtime linkage error. The other libraries may work and may not properly. The idea of my approach is to exactly point what I want to be done and expect the things will go in a planned way. I understand this may be not the only right way but in case of dynamic linkage I prefer to include the library path into SO rather than defining path to SO object by system variables. The SO library does not spend a time searching required library across the system. Regards, Eugenie. > The aol.properties file should really be about the compiler tool chain > and not contain references to specific PostgreSQL versions or locations. > > If PL/Java has to be built with an RPATH on Solaris for some reason, that > may have to be handled in the pom.xml, but first I am just wondering > whether it is really necessary. > > I have another reported issue where an RPATH *is* necessary when using > EnterpriseDB community builds, because in their lib directory they are > supplying substitute versions of standard system libraries. But I do not > see any sign of that in the PGDG downloads for Solaris. > > -Chap