java.lang.IllegalArgumentException: Unrecognized calling convention: 4

338 views
Skip to first unread message

tinca

unread,
May 16, 2012, 3:59:15 AM5/16/12
to Java Native Access
Hello,

While using current gradle (rc-3) I got above error coming from jna
[1]:

It seems that my FreeBSD version (8.2) is not supported by the jna
libs shipped with gradle (jna-3.2.7, jna-posix-1.0.3). From another
post it seems it should [2].

I would welcome any advice how it can be resolved.

Thanks
Zsolt


[1]
http://forums.gradle.org/gradle/topics/jar_task_throws_java_lang_illegalargumentexception_unrecognized_calling_convention_4?utm_content=topic_link&utm_medium=email&utm_source=reply_notification
[2] http://gradle.1045684.n5.nabble.com/unknown-os-support-td5538146.html

Timothy Wall

unread,
May 16, 2012, 7:27:45 AM5/16/12
to jna-...@googlegroups.com
It'd be helpful if you could provide more of a stack.

At any rate it looks like the problem is likely within jna-posix; first of all it's not degrading gracefully, and probably incorrectly. Only a JNA client can generate the calling convention error; JNA will not do so internally.

tinca

unread,
May 16, 2012, 7:44:06 AM5/16/12
to Java Native Access
Hello Timothy,

On máj. 16, 13:27, Timothy Wall <twallj...@java.net> wrote:
> It'd be helpful if you could provide more of a stack.
>
> At any rate it looks like the problem is likely within jna-posix; first of all it's not degrading gracefully, and probably incorrectly.  Only a JNA client can generate the calling convention error; JNA will not do so internally.

In the meantime I came to this conclusion too. Wrote a small test that
proves that chmod is working on my system using jna.

Thanks for your comment!
Zsolt

tinca

unread,
May 17, 2012, 4:48:52 AM5/17/12
to Java Native Access
On máj. 16, 13:27, Timothy Wall <twallj...@java.net> wrote:
> It'd be helpful if you could provide more of a stack.
>
> At any rate it looks like the problem is likely within jna-posix; first of all it's not degrading gracefully, and probably incorrectly.  Only a JNA client can generate the calling convention error; JNA will not do so internally.

Timothy,

I found something.
The jna-jar shipped with gradle contains a libjnidispatch.so under
freebsd-i386 that does not work on my system.
If I compile jna on my system and use that libjnidispatch.so
everything is OK.

Do you want me to create an issue?

Thanks
Zsolt

Timothy Wall

unread,
May 17, 2012, 7:20:47 AM5/17/12
to jna-...@googlegroups.com
What version is the gradle version?

tinca

unread,
May 17, 2012, 7:36:39 AM5/17/12
to Java Native Access
On máj. 17, 13:20, Timothy Wall <twallj...@java.net> wrote:
> What version is the gradle version?

gradle-1.0-rc-3

Timothy Wall

unread,
May 17, 2012, 7:35:27 PM5/17/12
to jna-...@googlegroups.com
I meant what version of JNA is included with gradle?

tinca

unread,
May 18, 2012, 1:37:11 AM5/18/12
to Java Native Access
On máj. 18, 01:35, Timothy Wall <twallj...@java.net> wrote:
> I meant what version of JNA is included with gradle?

Among gradle's libs there is a jna-3.2.7.jar.

Timothy Wall

unread,
May 18, 2012, 6:55:57 AM5/18/12
to jna-...@googlegroups.com
And does the prebuilt 3.4.0 version of JNA from github work? if not, it probably needs to be built differently (I think I'm building on a 6.x freebsd).

tinca

unread,
May 20, 2012, 3:42:28 PM5/20/12
to Java Native Access
On máj. 18, 12:55, Timothy Wall <twallj...@java.net> wrote:
> And does the prebuilt 3.4.0 version of JNA from github work?  if not, it probably needs to be built differently (I think I'm building on a 6.x freebsd).
Yes, it does work!
Reply all
Reply to author
Forward
0 new messages