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
1
vote
1 answer

Linux libffi-3.0.11 installation issue

I try to install libffi-3.0.11 I followed that side http://www.linuxfromscratch.org/blfs/view/svn/general/libffi.html But I got this error message. How can I solve that? make[3]: *** [src/powerpc/ffi.lo] Error 1 make[3]: Leaving directory…
Peter
  • 1,629
  • 2
  • 25
  • 45
0
votes
1 answer

Call name of function, rather than pointer of function

The manpage for libffi features an example that, essentially, requires a pointer to the function (in the examples case, puts). However, what do I do if I only know the name of the function, but don't actually have a pointer (which would usually…
0
votes
1 answer

Install rb-inotify on solaris

I am trying to install rb-inotify on a Solaris box. Result of uname -a: SunOS test9 5.10 Generic_142901-02 i86pc i386 i86pc ruby-1.8.7 and rubygems-1.7.2 have been compiled and installed but after running gem install rb-inotify I got following…
Jifeng Zhang
  • 5,037
  • 4
  • 30
  • 43
0
votes
1 answer

FFI: how to pass pointers in C to C functions?

I am struggling with libffi (Function Foreign Interface library), probably, due to the lack of C experience. I have the following program that calls a function my_func dynamically using libffi: #include #include #include…
Dmitry Kabanov
  • 710
  • 1
  • 7
  • 20
0
votes
1 answer

Problems building Ruby on ARM-64 MacOS machine

Unable to build Ruby 3.1.1 on my Mac OS ARM-64 machine, as it tries to use x86_64 versions of some files. I'm trying to use brew and rbenv to manage my Ruby installation. I have used several sources online to try to specify the OpenSSL and libFFI…
0
votes
1 answer

Failed to build ffi gem native extension on mac

Tried to install cocoapods and other React Native pod installs. Installing the libffi gem native extension is part of the process, and it keeps failing with this output: configure: error: C++ preprocessor "/lib/cpp" fails sanity check The dependency…
Quinlan Jung
  • 156
  • 5
0
votes
0 answers

Create Environment with Libraries in Eclipse C++ Linux

I'am code a program that needs a newer version of a lib. However, Fedora 16 doesn't support this new version installation package (libffi 3.1). Can I create an environment for Eclipse with the path of .so to run this lib only in my program?
Guilherme
  • 33
  • 4
0
votes
1 answer

Error in thread 'main' panicked at 'Building libffi',

System: Ubuntu 22.04 LTS (Wayland). I am trying to build a simple rsmpi code (Rust+MPI), but I am unable to build it because of the error : thread 'main' panicked at 'Building libffi'. My Carg.toml file is: [package] name =…
BoringSession
  • 55
  • 1
  • 7
0
votes
1 answer

otool is referencing an old version of libffi

I'm trying to compile an R package (which compiles in Linux) on Mac OS 10.15.7. I'm getting a weird problem right at the end of the installation, related to llvm-objdump-mp-7.0 referencing /opt/local/bin/libffi.7.dylib. The problem seems to be with…
ralmond
  • 116
  • 5
0
votes
1 answer

gcc on OS X leads to dyld: Library not loaded: /opt/local/lib/libffi.6.dylib

$ gcc t0.c dyld: Library not loaded: /opt/local/lib/libffi.6.dylib Referenced from: /opt/local/libexec/llvm-9.0/lib/libLLVM.dylib Reason: image not found fatal error: /opt/local/bin/as: fatal error in /opt/local/bin/clang-mp-9.0 $ gcc…
pmor
  • 5,392
  • 4
  • 17
  • 36
0
votes
1 answer

Nodejs app on Heroku "error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory"

I have an executable file called "Main" that I want to run in a node app on heroku. In order to do that I use this function function run(code, params) { const { execFileSync } = require('child_process'); const child = execFileSync('/app/Main',…
0
votes
2 answers

Javascript String to C++ char pointer -LPSTR buffer in JSCTypes

I am accessing the DLL from JavaScript using JSCTypes. I have to receive data by passing a character buffer to the following API, __declspec(dllexport) WORD WINAPI receive( LPWORD lpwBufferSize, LPSTR …
Yeshvanthni
  • 207
  • 2
  • 15
0
votes
2 answers

Wrong value with a function that returns a double (libffi)

It seems that a function returning a double data type, from libffi, is not correctly casted when the function returns its value, here is the code I used: #include #include #include #include // The make call the…
Foxy
  • 980
  • 8
  • 17
0
votes
1 answer

Python wrapper install gives "Command "python setup.py egg_info" failed with error code 1"

I've been trying to install this Python wrapper for the past two days. I went through all the other questions here on Stack Overflow. Tried literally everything, and nothing seems to work. Processing /../../../../../wrappers/Python Complete output…
0
votes
3 answers

How to create an `ffi_type` that represents a c array?

typedef struct _StructWithCArray { char a[3]; char b; } StructWithCArray; I represent the a[3] as a struct contain three char, but it will fail on iOS i386 simulator. Anyone has any ideas how to handle this? Here is a demo to show the bug. You…
Karl
  • 665
  • 4
  • 19