Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113208 - libreadline-java installation breaks jython
Summary: libreadline-java installation breaks jython
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-21 15:35 UTC by Frank Lomax
Modified: 2005-12-04 20:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
libreadline package.env file (package.env,145 bytes, text/plain)
2005-11-24 06:45 UTC, Frank Lomax
Details
jython package.env file (package.env,99 bytes, text/plain)
2005-11-24 06:45 UTC, Frank Lomax
Details
jython bin script (jython,363 bytes, text/plain)
2005-11-24 06:46 UTC, Frank Lomax
Details
proposed jython script (jython,388 bytes, text/plain)
2005-11-26 16:26 UTC, Josh Nichols (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Lomax 2005-11-21 15:35:37 UTC
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.
Comment 1 Josh Nichols (RETIRED) gentoo-dev 2005-11-21 19:17:42 UTC
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.
Comment 2 Frank Lomax 2005-11-22 05:35:29 UTC
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.
Comment 3 Josh Nichols (RETIRED) gentoo-dev 2005-11-23 21:50:24 UTC
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 ?
Comment 4 Frank Lomax 2005-11-24 06:42:34 UTC
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.
Comment 5 Frank Lomax 2005-11-24 06:45:08 UTC
Created attachment 73493 [details]
libreadline package.env file
Comment 6 Frank Lomax 2005-11-24 06:45:52 UTC
Created attachment 73494 [details]
jython package.env file
Comment 7 Frank Lomax 2005-11-24 06:46:42 UTC
Created attachment 73495 [details]
jython bin script
Comment 8 Josh Nichols (RETIRED) gentoo-dev 2005-11-26 16:26:29 UTC
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.
Comment 9 Frank Lomax 2005-11-28 09:02:34 UTC
Your attached jython script works great, thanks!
Comment 10 Josh Nichols (RETIRED) gentoo-dev 2005-12-04 20:00:47 UTC
Fixed in CVS. Thanks for reporting!