postgresql 7.2.3-r1 depends on java sun-jdk-1.3.1.06. I installed sun-jdk-1.3.1.06. After executing java-config --set-system-vm=blah and env-update and sourcing /etc/profile, java -version gives: Error occurred during initialization of VM Unable to load native library: /opt/sun-jdk-1.3.1.06/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference My gcc version is 3.2-r2. My glibc is glibc-2.3.1-r1. Incidentally if I comment out the dependencies for jdk-1.3 from the .ebuild and try to force postgresql to compile with already installed (and working) sun-jdk-1.4.1.01, the ebuild fails during the java compilation phase with the following errors: compile: [javac] Compiling 53 source files to /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/build [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/xa/XAConnectionImpl.java:57: cannot resolve symbol [javac] symbol : class RollbackException [javac] location: package transaction [javac] import javax.transaction.RollbackException; [javac] ^ [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java:60: org.postgresql.jdbc2.ResultSet should be declared abstract; it does not define getURL(int) in org.postgresql.jdbc2.ResultSet [javac] public class ResultSet extends org.postgresql.ResultSet implements java.sql.ResultSet [javac] ^ [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java:25: org.postgresql.jdbc2.Statement should be declared abstract; it does not define getMoreResults(int) in org.postgresql.jdbc2.Statement [javac] public class Statement extends org.postgresql.Statement implements java.sql.Statement [javac] ^ [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/jdbc2/Connection.java:37: org.postgresql.jdbc2.Connection should be declared abstract; it does not define setHoldability(int) in org.postgresql.jdbc2.Connection [javac] public class Connection extends org.postgresql.Connection implements java.sql.Connection [javac] ^ [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java:40: org.postgresql.jdbc2.DatabaseMetaData should be declared abstract; it does not define supportsSavepoints() in org.postgresql.jdbc2.DatabaseMetaData [javac] public class DatabaseMetaData implements java.sql.DatabaseMetaData [javac] ^ [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java:32: org.postgresql.jdbc2.PreparedStatement should be declared abstract; it does not define setURL(int,java.net.URL) in org.postgresql.jdbc2.PreparedStatement [javac] public class PreparedStatement extends Statement implements java.sql.PreparedStatement [javac] ^ [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/jdbc2/CallableStatement.java:42: org.postgresql.jdbc2.CallableStatement should be declared abstract; it does not define registerOutParameter(java.lang.String,int) in org.postgresql.jdbc2.CallableStatement [javac] public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement implements java.sql.CallableStatement [javac] ^ [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/largeobject/PGblob.java:26: org.postgresql.largeobject.PGblob should be declared abstract; it does not define setBytes(long,byte[]) in org.postgresql.largeobject.PGblob [javac] public class PGblob implements java.sql.Blob [javac] ^ [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/largeobject/PGclob.java:26: org.postgresql.largeobject.PGclob should be declared abstract; it does not define setString(long,java.lang.String) in org.postgresql.largeobject.PGclob [javac] public class PGclob implements java.sql.Clob [javac] ^ [javac] /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/org/postgresql/xa/ClientConnection.java:70: org.postgresql.xa.ClientConnection should be declared abstract; it does not define setHoldability(int) in org.postgresql.xa.ClientConnection [javac] final class ClientConnection [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 10 errors So any ideas what I'm supposed to do? Get a working a copy of jdk 1.3.1? How?
BTW, I DO know about the hint to compile java from scratch for gcc3.2 and in fact, I DID use it to compile my 1.4.1 jdk to get a working mozilla plugin. However, it was such a painful experience that I don't foresee going through it again to recompile jdk from scratch for version 1.3.1. On another note, the postgresql site has downloads for precompiled jdbc drivers. Any way for me to sort of "inject" it in manually into the ebuild? I have already downloaded the pgjdbc2.jar file for postgresql 7.2. Perhaps I could start the ebuild and when it fails, copy the .jar file to the appropriate place in the work directory. Would /var/tmp/portage/postgresql-7.2.3-r1/work/postgresql-7.2.3/src/interfaces/jdbc/jars be the correct place? Then I could use: ebuild /usr/portage/dev-db/postgresql/postgresql-7.2.3-r1.ebuild compile ebuild /usr/portage/dev-db/postgresql/postgresql-7.2.3-r1.ebuild install ebuild /usr/portage/dev-db/postgresql/postgresql-7.2.3-r1.ebuild qmerge Does that sound feasible?
Finally it works. Here's my workaround: emerge /usr/portage/dev-java/blackdown-jdk/blackdown-jdk-1.3.1-r7.ebuild java-config --set-system-vm=blackdown-jdk-1.3.1 env-update . /etc/profile emerge postgresql ebuild /usr/portage/dev-db/postgresql/postgresql-7.2.3.ebuild config and it builds out of the box.