On 2015-01-08 12:54, Andrew Haley wrote:
On 01/08/2015 11:38 AM, Erik Joelsson wrote:
I tried building locally (Ubuntu 14.04 with llvm 3.4) but it failed with
undefined references at link time:
/usr/lib/llvm-3.4/lib/libLLVMSupport.a(Process.o): In function
`llvm::sys::Process::FileDescriptorHasColors(int)':
(.text+0x5b7): undefined reference to `setupterm'
/usr/lib/llvm-3.4/lib/libLLVMSupport.a(Process.o): In function
`llvm::sys::Process::FileDescriptorHasColors(int)':
(.text+0x5e0): undefined reference to `tigetnum'
/usr/lib/llvm-3.4/lib/libLLVMSupport.a(Process.o): In function
`llvm::sys::Process::FileDescriptorHasColors(int)':
(.text+0x5e9): undefined reference to `set_curterm'
/usr/lib/llvm-3.4/lib/libLLVMSupport.a(Process.o): In function
`llvm::sys::Process::FileDescriptorHasColors(int)':
(.text+0x5f1): undefined reference to `del_curterm'
collect2: error: ld returned 1 exit status
That should be in the ncurses-devel package (or whatever it's called on
Ubuntu) which I thought was an OpenJDK requirement anyway. Maybe the
only problem is that we're not linking with -lncurses.
On my machine, "llvm-config --ldflags" outputs:
-L/usr/lib/llvm-3.4/lib -lpthread -lffi -ltinfo -ldl -lm
But configure filters only -L arguments into LLVM_LDFLAGS. The rest of
the -l flags above are already present on the libjvm link line, but
before $(LLVM_LIBS). If I explicitly add -ltinfo last on the link line
(after LLVM_LIBS), my build succeeds.
/Erik