[Parrot-users] Inability to call "fp" NCI methods from PIR (solved)

S'orlok Reaves sorlok_reaves at yahoo.com
Tue Oct 18 18:06:58 UTC 2011



Actually, it was easier to track down than I thought. Even though I had libffi installed, pkg-config didn't add the proper cflags to locate ffi.h. I had to invoke Configure.pl with the following:

--ccflags=-I/usr/include/i686-linux-gnu


(running Linux Mint, so I imagine this also affects Ubuntu users).

It works like a charm now. Thanks again to everyone for your prompt, correct and encouraging advice. 

-->Seth





----- Original Message -----
From: S'orlok Reaves <sorlok_reaves at yahoo.com>
To: NotFound <julian.notfound at gmail.com>
Cc: "parrot-users at lists.parrot.org" <parrot-users at lists.parrot.org>
Sent: Tuesday, October 18, 2011 11:24 PM
Subject: Re: [Parrot-users] Inability to call "fp" NCI methods from PIR



Thanks for the advice. My output is:
auto::libffi -        Is libffi installed..................................no.


...so I think this may be the problem. It's late here; I'll try it out tomorrow and get back to the list. 

-->Seth




----- Original Message -----
From: NotFound <julian.notfound at gmail.com>
To: S'orlok Reaves <sorlok_reaves at yahoo.com>
Cc: "parrot-users at lists.parrot.org" <parrot-users at lists.parrot.org>
Sent: Tuesday, October 18, 2011 10:47 PM
Subject: Re: [Parrot-users] Inability to call "fp" NCI methods from PIR

Hello

Look at the configure output, the line "auto:libffi Is libffi installed"

Without libffi, the available signatures are limited.


On Tue, Oct 18, 2011 at 3:46 PM, S'orlok Reaves <sorlok_reaves at yahoo.com> wrote:
> Good evening everyone,
>
>       This is my first email to the Parrot list. First, I'd like to say thanks in general for the lovely Virtual Machine that is Parrot. The tutorials and documentation is great, and it is only now that I have found a problem I can't solve.
>
>
>       I am using PIR and NCI to write a small project. So far, I have had no problem hooking up functions with pointers, integers, and strings. According to the documentation, I can use "f" to specify a floating-point type. This works:
>       func = dlfunc lib, "get_nonclass_value", "f"
>
>       ...but this does not:
>       func = dlfunc lib, "get_class_value", "fp"
>
>       ..failing with the error "No NCI thunk available for signature `float (ptr)'", and specifying the line that calls "func()".
>
>        I have reduced my code down to the simplest example that exhibits the problem. The C++ library code and PIR test code can be seen here:
>        http://pastie.org/2717626
>        http://pastie.org/2717633
>
>        I'm hoping this is something incredibly obvious, but I've been banging my head against a wall for about an hour trying to figure out what's going on. Changing the function signature to "ip" returns something (a very large integer), so I am starting to wonder if this is a bug. My version of parrot is:
>        3.8.0-devel built for i386-linux
>
>       Please let me know if you need any more information, or if you have any ideas on what I'm doing wrong. I'd certainly appreciate it. Or, if anyone can verify that this problem occurs on their system too then perhaps it really is a bug.
>
> Thanks for your time,
> -->Seth
>
> _______________________________________________
> Parrot-users mailing list
> Parrot-users at lists.parrot.org
> http://lists.parrot.org/mailman/listinfo/parrot-users
>


-- 
Salu2

_______________________________________________
Parrot-users mailing list
Parrot-users at lists.parrot.org
http://lists.parrot.org/mailman/listinfo/parrot-users



More information about the Parrot-users mailing list