From: pierce at hogranch.com (John R Pierce) Date: Thu, 15 Apr 2010 15:43:02 -0700 Subject: [Pljava-dev] building pljava for solaris 10 sparc 64bit In-Reply-To: References: <4BC78D22.7020809@hogranch.com> Message-ID: <4BC79676.8050007@hogranch.com> Kris Jurka wrote: > > > On Thu, 15 Apr 2010, John R Pierce wrote: > >> so I've been having fun getting pl/java 'HEAD' working with Postgres >> 8.4.3 64bit on Solaris Sparc, with JDK 1.5.0_23 64bit... >> >> ERROR: could not load library "/opt/FIS/pljava/pljava.so": ld.so.1: >> postgres: fatal: libjvm.so: open failed: No such file or directory >> >> These are in the postgres server 'start' method script (I'm running >> postgres under SMF control) >> >> JAVA_HOME=/usr/jdk/jdk1.5.0_23 >> >> LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/sparcv9:$JAVA_HOME/jre/lib/sparcv9/server:/opt/FIS/pljava >> >> PATH=$JAVA_HOME/bin/sparcv9:$PATH >> > > I'm not familiar with SMF, but putting environment variables into > start scripts often doesn't work because they start as root and then > su to the user running postgres and when that happens the current > environment is scrapped and replaced by that of the postgres user's. this script is setting PGBIN, PGDATA, and PGLOG before running pg_ctl, so I am pretty sure its already in the target user. yes, indeed, SMF has a service property "method_context/user astring postgres" which specifies what user to run the start method as, so its looking like changing the user is done -before- running this script. what alternative methods would you suggest for getting LD_LIBRARY_PATH etc setup ?