Jikes RVM fails to build on Ubuntu 11.10 with undefined references in sys.c

Description

The Jikes RVM fails to build on Ubuntu 11.10 with an error about undefined references in sys.c (original report by Swarnendu Biswas).

Environment

Ubuntu 11.10 64bit, g++ 4.6.1

Activity

Show:
Erik Brangs
October 14, 2011, 11:05 PM

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.

James Bornholt
October 15, 2011, 10:31 AM

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.

DaveG
December 7, 2011, 10:07 PM

committed patch in 10398:cd1258740580

Assignee

DaveG

Reporter

Erik Brangs

Labels

None

Components

Fix versions

Affects versions

Priority

Highest
Configure