libreadline-java installs into /opt/libreadline-java. Install jython and set up the registry to use readline. When you run jython, you'll get an UnsatisfiedLinkError because it cannot find libJavaReadline.so. However if you create a symlink from /usr/lib/libJavaReadline.so to /opt/libreadline-java/lib/libJavaReadline.so, jython will work perfectly. jython 2.1-r6 libreadline-java 0.8.0-r1 Reproducible: Always Steps to Reproduce: 1. 2. 3.
How exactly are you running jython to get this error? Also, could you post the contents of /usr/bin/jython? I have the same versions of jython and libreadline-java, and just ran 'jython', but don't get an UnsatisfiedLinkError.
I just ran jython at the bash prompt and got that error. The interesting thing here is that I had just emerged jython on this particular machine when I got the error. On another Gentoo box, I'd had jython on it for a long time, so I hopped over there and jython ran just fine. On the working box, I had a /usr/lib/libJavaReadline.so and no /opt/libreadline-java/lib/libJavaReadline.so. So I was looking at the differences and then went to the working box and re-emerged jython and libreadline-java. Sure enough, the so in /usr/lib got removed and the /opt one appeared, and then jython broke on that box too! The reason is pretty clear: /opt/readline-java/lib is not in /etc/ld.so.conf so it doesn't end up on a search path for ld.so and Java can never find it. Creating a symlink from /usr/lib/libJavaReadline.so to /opt/libreadline-java/lib/libJavaReadline.so "fixed" the problem.
I'm still not able to replicate the problem using the most recent ebuilds. I did a 'emerge =libreadline-java-0.8.0-r1 =jython-2.1-r6' After that, I run 'jython' and get the >>> prompt. I have a few questions / suggestions / requests for more info: * When was the last time you did an emerge sync? If it's been awhile, could you please give that a shot, and re-emerge libreadline-java and jython? * What are the contents of /usr/share/libreadline-java/package.env, /usr/bin/jython, and /usr/share/jython/package.env ?
I do a sync every night. ;) Just to be positive, you also have these entries in your Jython registry right (e.g. ~/.jython)? python.console=org.python.util.ReadlineConsole python.console.readlinelib=GnuReadline I will attach the requested files.
Created attachment 73493 [details] libreadline package.env file
Created attachment 73494 [details] jython package.env file
Created attachment 73495 [details] jython bin script
Created attachment 73655 [details] proposed jython script This should properly get the libreadline-java library. Please remove the libJavaReadline.so you copied/symlinked to /usr/lib, and give this a try.
Your attached jython script works great, thanks!
Fixed in CVS. Thanks for reporting!