Ubuntu 11.10 64bit, g++ 4.6.1
After some investigation, I found out that the error might be related to linking problems.
As a workaround, I tried changing the line
in build.xml (when building with GNU classpath; I did not try Harmony) to
and the build suceeded. Unfortunately, I do not have much experience with gcc or g++, so I cannot provide a proper fix.
Erik's right on the money. There was a toolchain change in 11.10 to disable indirect linking (see this wiki page, but it didn't actually happen in Natty). This made the linker sensitive to the order in which libraries are specified, and we got caught in this because librvm depends on pthreads and librt but we specify those in the wrong order. This patch puts them in the right order.
committed patch in 10398:cd1258740580