Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420451 - dev-java/jnr-netdb:0: Use dev-java/jnr-ffi:0.5 instead of dev-java/jaffl
Summary: dev-java/jnr-netdb:0: Use dev-java/jnr-ffi:0.5 instead of dev-java/jaffl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-10 00:57 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2016-10-30 20:20 UTC (History)
0 users

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


Attachments
jnr-netdb.patch (jnr-netdb.patch,1.23 KB, patch)
2012-06-10 00:57 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2012-06-10 00:57:19 UTC
http://overlays.gentoo.org/proj/java/changeset/8878 (released in dev-java/java-config-2.1.12) changed order of classpath.

If jnr-netdb:0 uses jaffl instead of jnr-ffi:0.5, then an application, which uses jnr-netdb:0 and jnr-posix:1.1, would use 2 jars (from jaffl and jnr-ffi:0.5), which provide com.kenai.jaffl.

The following error would occur when older version of com.kenai.jaffl from jaffl instead of jnr-ffi:0.5 happened to be actually used:
$ jython2.5
java.lang.IllegalArgumentException: unsupported parameter type class [Ljava.lang.CharSequence;
        at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateBufferInvocation(AsmLibraryLoader.java:604)
        at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateMethod(AsmLibraryLoader.java:511)
        at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:223)
        at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:125)
        at com.kenai.jaffl.provider.jffi.Provider.loadLibrary(Provider.java:31)
        at com.kenai.jaffl.provider.jffi.Provider.loadLibrary(Provider.java:25)
        at com.kenai.jaffl.Library.loadLibrary(Library.java:76)
        at org.jruby.ext.posix.POSIXFactory$LinuxLibCProvider$SingletonHolder.<clinit>(POSIXFactory.java:108)
        at org.jruby.ext.posix.POSIXFactory$LinuxLibCProvider.getLibC(POSIXFactory.java:112)
        at org.jruby.ext.posix.BaseNativePOSIX.<init>(BaseNativePOSIX.java:30)
        at org.jruby.ext.posix.LinuxPOSIX.<init>(LinuxPOSIX.java:17)
        at org.jruby.ext.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:70)
        at org.jruby.ext.posix.POSIXFactory.loadPOSIX(POSIXFactory.java:31)
        at org.jruby.ext.posix.LazyPOSIX.loadPOSIX(LazyPOSIX.java:29)
        at org.jruby.ext.posix.LazyPOSIX.posix(LazyPOSIX.java:25)
        at org.jruby.ext.posix.LazyPOSIX.isatty(LazyPOSIX.java:155)
        at org.python.core.io.StreamIO.isatty(StreamIO.java:234)
        at org.python.core.io.BufferedIOMixin.isatty(BufferedIOMixin.java:90)
        at org.python.core.io.TextIOBase.isatty(TextIOBase.java:175)
        at org.python.core.PyFile.file_isatty(PyFile.java:485)
        at org.python.core.PyFile.isatty(PyFile.java:480)
        at org.python.core.PySystemState.initEncoding(PySystemState.java:247)
        at org.python.core.PySystemState.<init>(PySystemState.java:191)
        at org.python.core.PySystemState.doInitialize(PySystemState.java:899)
        at org.python.core.PySystemState.initialize(PySystemState.java:809)
        at org.python.core.PySystemState.initialize(PySystemState.java:759)
        at org.python.core.PySystemState.initialize(PySystemState.java:752)
        at org.python.util.jython.run(jython.java:150)
        at org.python.util.jython.main(jython.java:129)
Jython 2.5.3+ (2.5:ff664e329084+, cze 9 2012, 18:02:23) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_03-icedtea
Type "help", "copyright", "credits" or "license" for more information.
>>>

I suggest to add dev-java/jnr-netdb-1.0.1-r1:0, which would use dev-java/jnr-ffi:0.5 instead of dev-java/jaffl. The attached patch implements this suggestion and fixes error seen during starting Jython 2.5.
(Jython 2.7 uses newer slots of jffi and jnr-* and is unaffected by this bug.)

This improvement also can allow to uninstall dev-java/jaffl, dev-java/jffi:0.4 and dev-java/jnr-x86asm:0.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2012-06-10 00:57:49 UTC
Created attachment 314833 [details, diff]
jnr-netdb.patch
Comment 2 James Le Cuirot gentoo-dev 2016-10-30 20:20:02 UTC
Looks like this was done ages ago.