Skip to content

FFI not supported message #39189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shamblett opened this issue Oct 31, 2019 · 7 comments
Closed

FFI not supported message #39189

shamblett opened this issue Oct 31, 2019 · 7 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi

Comments

@shamblett
Copy link

I've been putting together a package using FFI developed on linux X64 with the target machine being linux on arm architectures, all going very well until I upgraded the arm board to Dart 2.6.0-dev8.2, I'm now getting :-

'import of ffi is not supported in the current dart runtime'

when I run my Dart app. It works OK on my X64 dev machine, am I missing something?

@mraleph mraleph added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi labels Oct 31, 2019
@mraleph
Copy link
Member

mraleph commented Oct 31, 2019

@dcharkes Daco could you investigate?

@dcharkes
Copy link
Contributor

We do not support the hardfp (Linux on Arm32) calling convention yet (#36309).

@shamblett is your arm board 32 or 64 bit?

@dcharkes dcharkes self-assigned this Oct 31, 2019
@shamblett
Copy link
Author

I'm using the Dart ARM7 SDK, as I said above this was working fine, I can't remember exactly what dev release it was, maybe Dart 2.6.0-dev4, it was before FFI was upgraded to use extension methods where we didn't have the separate FFI package which now does allocate etc.

@dcharkes
Copy link
Contributor

If your board is Arm32, then it was never supposed to be enabled. However, we had a bug in which it was not properly disabled on Arm32 Linux. I fixed that on October 2nd. 2.6.0-dev.4.0 (345c4b6) was released on September 30, so in that version the FFI was erroneously enabled.

If you were not using floating points in FFI calls, using the FFI would have been fine. However, if you were using floating points in FFI calls, I would have expected to see errors (like passing random values to native functions). Did you use floating points in FFI calls?

As a solution now, we can try to bring forward work on supporting the FFI Linux Arm32 (#36309).

cc @mkustermann

@shamblett
Copy link
Author

I have a few wrapper API calls that return floats, however my testing on my target board didn't use these so I wouldn't have noticed, everything else(mainly pointers, ints, strings) worked fine. OK thanks, I'll keep an eye on the work for this, I can move to arm64 in the meantime.

@mkustermann
Copy link
Member

@dcharkes This is probably the only missing thing in our configuration matrix for the current feature set, right?

Since new features might take longer to implement (i.e. after D27), we could consider prioritizing this (hopefully small) task for D27. wdyt?

@dcharkes
Copy link
Contributor

dcharkes commented Nov 1, 2019

Yeah sure.

I'll close this issue, as it is a duplicate. Progress will be tracked in #36309.

@dcharkes This is probably the only missing thing in our configuration matrix for the current feature set, right?

Well, there's also the arm simulator.

@dcharkes dcharkes closed this as completed Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi
Projects
None yet
Development

No branches or pull requests

4 participants