Skip to contentSkip to conversation

rpath problem for llvm libs?

meta-java Koen Kooi 3 participants 7 messages Dec 2, 2011 – Dec 5, 2011

lore
Share & tools
lore

Koen Kooi

author
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I installed openjdk + openjdk-shark on my target and I get:

root@beaglebone:~# java
dl failure on line 696Error: failed
/usr/lib/jvm/java-6-openjdk/jre/lib/arm/shark/libjvm.so, because
libLLVMARMCodeGen.so: cannot open shared object file: No such file or directory

The 'fix' I used:

root@beaglebone:~# for i in /usr/lib/llvm2.9/libLLVM*.so ; do ln -sf $i
/usr/lib ; done
root@beaglebone:~# java
Usage: java [-options] class [args...]
           (to execute a class)

I came up with a number of workarounds, but I'm not sure which is best:

1) do the for ; ln thing in a postinst
2) have llvm install into ${libdir} instead of ${libdir}${LLVM_RELEASE}
3) Use u-a for the libs
4) add rpaths
5) convince people java is evil and have them switch to C

I have a preference for 5), but I suspect Henning would like a different solution :)

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAk7YnmQACgkQMkyGM64RGpHTCwCdGfG86k7u/9QRKqN8KQIT6D1F Vq8An0Q/rjJ4C/oDX1OA/xzm8cop7/rq
=bnBj
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 23 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I installed openjdk + openjdk-shark on my target and I get:

root@beaglebone:~# java
dl failure on line 696Error: failed
/usr/lib/jvm/java-6-openjdk/jre/lib/arm/shark/libjvm.so, because
libLLVMARMCodeGen.so: cannot open shared object file: No such file or directory

The 'fix' I used:

root@beaglebone:~# for i in /usr/lib/llvm2.9/libLLVM*.so ; do ln -sf $i
/usr/lib ; done
root@beaglebone:~# java
Usage: java [-options] class [args...]
          (to execute a class)

I came up with a number of workarounds, but I'm not sure which is best:

Quoted 8 lines

1) do the for ; ln thing in a postinst
2) have llvm install into ${libdir} instead of ${libdir}${LLVM_RELEASE}
3) Use u-a for the libs
4) add rpaths
5) convince people java is evil and have them switch to C

I have a preference for 5), but I suspect Henning would like a different solution :)

Well, what's Fedora or Debian/Ubuntu look like here?

Signature · 1 line
Tom
author
#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 03-12-11 16:42, Tom Rini schreef:

Quoted 29 lines
Quoted 27 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hi,

I installed openjdk + openjdk-shark on my target and I get:

root@beaglebone:~# java dl failure on line 696Error: failed 
/usr/lib/jvm/java-6-openjdk/jre/lib/arm/shark/libjvm.so, because 
libLLVMARMCodeGen.so: cannot open shared object file: No such file or
directory

The 'fix' I used:

root@beaglebone:~# for i in /usr/lib/llvm2.9/libLLVM*.so ; do ln -sf
$i /usr/lib ; done
root@beaglebone:~# java Usage: java [-options] class [args...] (to
execute a class)

I came up with a number of workarounds, but I'm not sure which is best:

1) do the for ; ln thing in a postinst 2) have llvm install into ${libdir} instead of ${libdir}${LLVM_RELEASE} 3) Use u-a for the libs
4) add rpaths 5) convince people java is evil and have them switch to C

Quoted 4 lines
Quoted 2 lines

I have a preference for 5), but I suspect Henning would like a different solution :)

Well, what's Fedora or Debian/Ubuntu look like here?

They seem to lack the shark jre, but the 'llvm' package looks like this:

root@dominion:/data/ssd# find /usr/lib | grep llvm | grep Printer | head -n2
/usr/lib/llvm/lib/libLLVMCellSPUAsmPrinter.a
/usr/lib/llvm/lib/libLLVMXCoreAsmPrinter.a

So if we were to follow that option 4) seems to be the way.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAk7aSxcACgkQMkyGM64RGpGD4wCfQojBBu41NzAvjl9mT8vjPE+Y lcUAnA6Bfne8yFGuw+5m9QSZbQ0fktht
=4DKv
-----END PGP SIGNATURE-----

#3 lore raw
Quoted 6 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
So if we were to follow that option 4) seems to be the way.

regards,

Koen

Hi,

our original Idea was, that you can install diffrent llvm versions at the same time. We need
to discuss if we have still the case or really only one version of llvm. If not we can use directly /usr/lib if not solution 4 with rpath is my favourit. Besides this llvm should go to core, but I wanted to wait for the 3.0 release and christmas holidays to do it.

Bye Henning

author
#4 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 03-12-11 17:34, Henning Heinold schreef:

Quoted 8 lines · Koen Kooi
Quoted 6 lines

-----BEGIN PGP SIGNED MESSAGE----- So if we were to follow that option
4) seems to be the way.

regards,

Koen

Quoted 7 lines

Hi,

our original Idea was, that you can install diffrent llvm versions at the same time. We need to discuss if we have still the case or really only one version of llvm. If not we can use directly /usr/lib if not solution 4 with rpath is my favourit. Besides this llvm should go to core, but I wanted to wait for the 3.0 release and christmas holidays to do it.

- From the llvm website: "December 1, 2011: LLVM 3.0 is now available for download!"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAk7acD8ACgkQMkyGM64RGpF6ZACfX2Mby+mhVCxNvx7FzFbBUMmS zmcAnRgLUHbfFZLIjaQZQI0dor057JNO
=l4wJ
-----END PGP SIGNATURE-----

#5 lore raw
Quoted 14 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 03-12-11 17:34, Henning Heinold schreef:

Quoted 10 lines · Koen Kooi
Quoted 6 lines

-----BEGIN PGP SIGNED MESSAGE----- So if we were to follow that option
4) seems to be the way.

regards,

Koen

Hi,

Quoted 8 lines
Quoted 5 lines

our original Idea was, that you can install diffrent llvm versions at the same time. We need to discuss if we have still the case or really only one version of llvm. If not we can use directly /usr/lib if not solution 4 with rpath is my favourit. Besides this llvm should go to core, but I wanted to wait for the 3.0 release and christmas holidays to do it.

- From the llvm website: "December 1, 2011: LLVM 3.0 is now available for download!"

I know ;)

Bye Henning

author
#6 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 04-12-11 12:14, Henning Heinold schreef:

Quoted 21 lines · Koen Kooi
Quoted 20 lines

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Op 03-12-11 17:34, Henning Heinold schreef:

Quoted 16 lines · Koen Kooi
Quoted 6 lines

-----BEGIN PGP SIGNED MESSAGE----- So if we were to follow that option 4) seems to be the way.

regards,

Koen

Hi,

our original Idea was, that you can install diffrent llvm versions at the same time. We need to discuss if we have still the case or really only one version of llvm. If not we can use directly /usr/lib if not solution 4 with rpath is my favourit. Besides this llvm should go to core, but I wanted to wait for the 3.0 release and christmas holidays to do it.

Quoted 4 lines
Quoted 2 lines

- From the llvm website: "December 1, 2011: LLVM 3.0 is now available for download!"

I know ;)

FWIW, even after 'fixing' the llvm problems with ln shark still shows some problems:

root@beaglebone:~/java# javac -O Linpack.java
javac:
/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/llvm2.9-2.9-r0/llvm-2.9/include/llvm/Support/Casting.h:202:
typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
llvm::ConstantInt, Y = llvm::Value*, typename llvm::cast_retty<To,
From>::ret_type = llvm::ConstantInt*]: Assertion `isa<X>(Val) && "cast<Ty>()
argument of incompatible type!"' failed.
Stack dump:
0.	Running pass 'ARM Instruction Selection' on function
'@"com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory::readEntry"'
Aborted

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAk7cuSYACgkQMkyGM64RGpGM/wCcCekfcU2mGzHYPmY3pCk9ExXO 68kAnitsMmhDfADPCYA6NsTNRHP8Bujc
=qnMt
-----END PGP SIGNATURE-----