Questions tagged [libffi]

libffi is a portable Foreign Function Interface library, used to call functions defined in a different programming language

libffi defines a C API for calling functions defined in different languages with different calling conventions. It is commonly used to provide a bridge between compiled languages and interpreted languages.

See the project homepage or the Wikipedia page for more information.

84 questions
2
votes
0 answers

Building Python3.9.2 from source missing '_ctypes'

I have a similar issue to the one I was able to solve in here, when building Python3.9.2 in docker container the build finish successfully but ctypes is missing ModuleNotFoundError: No module named '_ctypes' Trying the same method in the above post…
Amir Rossert
  • 1,003
  • 2
  • 13
  • 33
2
votes
3 answers

Locally compiled libffi files not getting picked up while recompiling python 3 package

In a situation where I need to locally Install Python 3 and some related packages for enabling the Tkinter setup and use openpyxl to read/write .xlsx files using GUI setup. First I installed the Python 3.9.1 locally and when I tried doing import…
Vimo
  • 1,061
  • 3
  • 12
  • 22
2
votes
1 answer

Issues building the libffi gem native extension when trying to install Jekyll on macOS Catalina

EDIT: I wrote up a more detailed solution on my blog here if you want to walk through all the steps. I'm trying to install Jekyll via gem install Jekyll on macOS Catalina using Ruby install via homebrew and located at /usr/local/opt/ruby/bin/ruby…
dmarticus
  • 51
  • 7
2
votes
4 answers

ffi Ruby Gem fails to compile

Trying to install a jekyll theme the bundle install command failed with the following error: Fetching ffi 1.12.2 (was 1.11.3) Installing ffi 1.12.2 (was 1.11.3) with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native…
Mark
  • 4,338
  • 7
  • 58
  • 120
2
votes
0 answers

Libjna build - LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'

I'm re-posting an issue from github (https://github.com/libffi/libffi/issues/538) I had since last week. I'm currently having issue getting some JNA libraries built as jar deployables using Ant build script (FYI:…
dale
  • 439
  • 3
  • 11
  • 28
2
votes
1 answer

libffi segmentation fault with void function

I can't determine the cause of crash of this code: #define MACOSX #include #include #include #include void sum(int64_t *a, int64_t *b, int64_t *c) { *c = *a + *b; } int main() { int64_t ai =…
Leonid
  • 1,127
  • 2
  • 15
  • 29
2
votes
2 answers

libffi installed and recogonized by pkg-config, but not by glib

I want to cross compile glib for Windows. configure throws this error: configure: WARNING: using cross tools not prefixed with host triplet configure: error: Package requirements (libffi >= 3.0.0) were not met: No package 'libffi' found Consider…
user45891
  • 780
  • 6
  • 17
2
votes
1 answer

libffi doesn't pass the validation when creating a cocoapod

I recently try to create a cocoapod which includes only one third party library"BlocksKit". When I use the "pod spec lint" to validate the podspec file, it failed. It seems there are some problems related to the library "libffi" which is used by the…
Ricol
  • 45
  • 4
2
votes
2 answers

Undefined symbols for mac ocaml build

I've been trying to compile a recent application that uses ctypes and sqlexpr, but I'm having trouble with symbols not being resolved. I built ctypes and sqlexpr from OPAM, and have updated versions of libffi from brew, but don't understand why I…
Kristopher Micinski
  • 7,572
  • 3
  • 29
  • 34
2
votes
2 answers

Template programming: specialization and enable_if

I'm working with libffi and I've made a class with a similar template to std::function (i.e class Func { /* ... */};. I want to convert the return type (Ret) and each argument type (Args) to their corresponding libffi type (see this…
Elliott Darfink
  • 1,153
  • 14
  • 34
1
vote
0 answers

How to specify "double *" type in libffi?

I need to dynamically invoke a function in C with the function name and the arguments (and their types) only known during runtime. For that, I use libffi (Foreign Function Interface library). I need to specify that the argument is double * (pointer…
Dmitry Kabanov
  • 710
  • 1
  • 7
  • 20
1
vote
2 answers

mamba install of FASTBOOK leading to provider install issue

While trying to run command below mamba install -y fastbook I am receiving the problem/error below Looking for: ['fastbook'] fastai/linux-64 [====================] (00m:00s) Done fastchan/linux-64 [====================] (00m:00s)…
Judy007
  • 5,484
  • 4
  • 46
  • 68
1
vote
1 answer

Calling Windows API with libffi on MinGW

I'm trying to have FFI support for my new programming language, which is written in C++ with QT Creator using the MinGW toolchain. To do this I used a custom-built version of libffi found here:…
Mohamed Samy
  • 178
  • 1
  • 8
1
vote
1 answer

ffi_prep_closure(): bad user_data (it seems that the version of the libffi library seen at runtime is different from the 'ffi.h' seen at compile-time)

I am running few python scripts on my raspberry pi4 running Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-1034-raspi aarch64)..But today all scripts stopped working and I'm getting this exception in all of them.. ffi_prep_closure(): bad user_data (it seems…
algoTrader
  • 23
  • 5
1
vote
1 answer

Installing ccls through Homebrew outputs caveats messages related to libffi and llvm

I'm trying to set my neovim C++ development environment, and want to use ccls as my coc language server. When I installed ccls using Homebrew, it installs libffi and llvm as dependencies. It seems like ccls is installed successfully, but it seems…
jureaky
  • 11
  • 2