ffi: MacOS 11 - Big Sur Beta 3 - Compile Failure

Building with Ruby 2.6.0.

The following compile error results:

/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.12.2/gem_make.out

An error occurred while installing ffi (1.12.2), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.12.2' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  cocoapods was resolved to 1.9.1, which depends on
    cocoapods-core was resolved to 1.9.1, which depends on
      typhoeus was resolved to 1.4.0, which depends on
        ethon was resolved to 0.12.0, which depends on
          ffi
myuser@mycomputer app % nano /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.12.2/gem_make.out
myuser@mycomputer app % cat /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.12.2/gem_make.out 
current directory: /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200727-1004-fcv0em.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_call_without_gvl()... yes
checking for ruby_native_thread_p()... yes
checking for ruby_thread_has_gvl_p()... yes
creating extconf.h
creating Makefile

current directory: /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c
make "DESTDIR=" clean

current directory: /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c
make "DESTDIR="
mkdir -p "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c"/libffi-x86_64; (if [ ! -f "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi"/configure ]; then echo "Running autoreconf for libffi"; cd "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi" && /bin/sh /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/autogen.sh > /dev/null; fi); (if [ ! -f "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c"/libffi-x86_64/Makefile ]; then echo "Configuring libffi for x86_64"; cd "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c"/libffi-x86_64 && env CC=" xcrun clang" CFLAGS="-arch x86_64 " LDFLAGS="-arch x86_64" "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi"/configure --disable-static --with-pic=yes --disable-dependency-tracking --disable-docs --host=x86_64-apple-darwin > /dev/null; fi); /Applications/Xcode-beta.app/Contents/Developer/usr/bin/make -C "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c"/libffi-x86_64
Configuring libffi for x86_64
clang: error: unsupported option '-print-multi-os-directory'
clang: error: no input files
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make  all-recursive
Making all in include
make[3]: Nothing to be done for `all'.
Making all in testsuite
make[3]: Nothing to be done for `all'.
Making all in man
make[3]: Nothing to be done for `all'.
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/prep_cif.lo /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/prep_cif.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/prep_cif.c  -fno-common -DPIC -o src/.libs/prep_cif.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/types.lo /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/types.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/types.c  -fno-common -DPIC -o src/.libs/types.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/raw_api.lo /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/raw_api.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/raw_api.c  -fno-common -DPIC -o src/.libs/raw_api.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/java_raw_api.lo /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/java_raw_api.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/java_raw_api.c  -fno-common -DPIC -o src/.libs/java_raw_api.o
/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/java_raw_api.c:328:46: warning: 'ffi_java_raw_size' is deprecated [-Wdeprecated-declarations]
  ffi_java_raw *raw = (ffi_java_raw*)alloca (ffi_java_raw_size (cif));
                                             ^
include/ffi.h:299:56: note: 'ffi_java_raw_size' has been explicitly marked deprecated here
size_t ffi_java_raw_size (ffi_cif *cif) __attribute__((deprecated));
                                                       ^
/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/java_raw_api.c:331:3: warning: 'ffi_java_ptrarray_to_raw' is deprecated [-Wdeprecated-declarations]
  ffi_java_ptrarray_to_raw (cif, avalue, raw);
  ^
include/ffi.h:295:93: note: 'ffi_java_ptrarray_to_raw' has been explicitly marked deprecated here
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw) __attribute__((deprecated));
                                                                                            ^
2 warnings generated.
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/closures.lo /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/closures.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/closures.c  -fno-common -DPIC -o src/.libs/closures.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/x86/ffi64.lo /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/x86/ffi64.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/x86/ffi64.c  -fno-common -DPIC -o src/x86/.libs/ffi64.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64  -c -o src/x86/unix64.lo /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/x86/unix64.S
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64 -c /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/x86/unix64.S  -fno-common -DPIC -o src/x86/.libs/unix64.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/x86/ffiw64.lo /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/x86/ffiw64.c
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/x86/ffiw64.c  -fno-common -DPIC -o src/x86/.libs/ffiw64.o
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src  -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64  -c -o src/x86/win64.lo /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/x86/win64.S
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -I. -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/include -Iinclude -I/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src -arch x86_64 -c /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/src/x86/win64.S  -fno-common -DPIC -o src/x86/.libs/win64.o
/bin/sh ./libtool  --tag=CC   --mode=link xcrun clang  -arch x86_64  -Wall -fexceptions  -arch x86_64 -o libffi_convenience.la  src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo   src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffiw64.lo src/x86/win64.lo 
libtool: link: ar cru .libs/libffi_convenience.a src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi64.o src/x86/.libs/unix64.o src/x86/.libs/ffiw64.o src/x86/.libs/win64.o 
libtool: link: ranlib .libs/libffi_convenience.a
libtool: link: ( cd ".libs" && rm -f "libffi_convenience.la" && ln -s "../libffi_convenience.la" "libffi_convenience.la" )
/bin/sh ./libtool  --tag=CC   --mode=link xcrun clang  -arch x86_64  -Wall -fexceptions -no-undefined -version-info `grep -v '^#' /Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi/libtool-version`   '-arch' 'x86_64'  -arch x86_64 -o libffi.la -rpath /usr/local/lib src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo  src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffiw64.lo src/x86/win64.lo 
libtool: link:  xcrun clang -dynamiclib  -o .libs/libffi.7.dylib  src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi64.o src/x86/.libs/unix64.o src/x86/.libs/ffiw64.o src/x86/.libs/win64.o    -arch x86_64 -arch x86_64 -arch x86_64   -install_name  /usr/local/lib/libffi.7.dylib -compatibility_version 9 -current_version 9.0 -Wl,-single_module
libtool: link: (cd ".libs" && rm -f "libffi.dylib" && ln -s "libffi.7.dylib" "libffi.dylib")
libtool: link: ( cd ".libs" && rm -f "libffi.la" && ln -s "../libffi.la" "libffi.la" )
# Assemble into a FAT (x86_64, i386, ppc) library
/usr/bin/libtool -static -o "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi-universal-darwin20"/.libs/libffi_convenience.a \
	    "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c"/libffi-x86_64/.libs/libffi_convenience.a
rm -f "/Users/myuser/Dev/app/vendor/cache/ruby/2.6.0/gems/ffi-1.12.2/ext/ffi_c/libffi-universal-darwin20"/include/ffi.h
compiling AbstractMemory.c
In file included from AbstractMemory.c:47:
In file included from ./AbstractMemory.h:42:
In file included from ./Types.h:79:
./Type.h:50:5: error: unknown type name 'ffi_type'
    ffi_type* ffiType;
    ^
In file included from AbstractMemory.c:49:
In file included from ./Function.h:48:
./Call.h:93:5: error: unknown type name 'ffi_cif'
    ffi_cif cif;
    ^
In file included from AbstractMemory.c:49:
./Function.h:59:5: error: unknown type name 'ffi_type'
    ffi_type* ffiReturnType;
    ^
./Function.h:60:5: error: unknown type name 'ffi_type'
    ffi_type** ffiParameterTypes;
    ^
./Function.h:61:5: error: unknown type name 'ffi_cif'
    ffi_cif ffi_cif;
    ^
./Function.h:66:5: error: unknown type name 'ffi_abi'
    ffi_abi abi;
    ^
6 errors generated.
make: *** [AbstractMemory.o] Error 1

make failed, exit code 2

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 14
  • Comments: 20 (1 by maintainers)

Most upvoted comments

brew install libffi
ln -s $(brew --cellar libffi)/*/include/ffi.h /usr/local/include/ffi.h
ln -s $(brew --cellar libffi)/*/include/ffitarget.h /usr/local/include/ffitarget.h

This fixed it for me

As described in README

gem install ffi -- --enable-system-libffi

Helped me

I am using rvm and in my case, this worked for me

  • Step 1 Run in terminal: brew info libffi which will output the following:

    For compilers to find libffi you may need to set:

    export LDFLAGS="-L/opt/homebrew/opt/libffi/lib"
    export CPPFLAGS="-I/opt/homebrew/opt/libffi/include"
    

    For pkg-config to find libffi you may need to set:

    export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig"
    
  • Step 2 Run all 3 export commands in terminal to set the env variables.

  • Step 3 Finally, run the ruby installation command. In my case, it was: rvm install ruby-2.5.3

Hope it helps.

Reference: https://github.com/ffi/ffi/issues/869#issuecomment-810890178

`

brew install libffi

ln -s /usr/local//Cellar/libffi/3.3/include/ffi.h /usr/local/include/ffi.h

ln -s /usr/local//Cellar/libffi/3.3/include/ffitarget.h /usr/local/include/ffitarget.h

` this helps me.

Is there any reason to believe this is fixed in Monterey?

@Isnifer

As described in README

gem install ffi -- --enable-system-libffi

Helped me

Unfortunately this doesn’t work either :

Fetching ffi-1.13.1.gem
Building native extensions with: '--enable-system-libffi'
This could take a while...
ERROR:  Error installing ffi:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200807-11100-p896gb.rb extconf.rb --enable-system-libffi
checking for ffi_prep_closure_loc() in -lffi... no
checking for ffi_prep_closure_loc() in -llibffi... no
checking for ffi_prep_closure_loc() in -llibffi-8... no
system libffi is not usable
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Try: gem install ffi -v 'specify_version_here' -- --with-cflags="-Wno-error=implicit-function-declaration"

for example in my case: gem install ffi -v '1.9.18' -- --with-cflags="-Wno-error=implicit-function-declaration"

and finally hit: bundle install

This should work sudo su gem install ffi – --enable-system-libffi

At leases it did for me

this did work for me. Thanks.

@tibbon I’m a m1/ Big Sur user by the way… bundle update ffi ethon which make it possible to use CocoaPod without Rosseta didn’t work for me… so I tried gem install ffi -- --enable-system-libffi but it didn’t work for me either…(for the same reason above) so I gem install ffi -- --disable-system-libffi to undo it… I think it worked for you because you are a Intel user. https://github.com/ffi/ffi You better check it out

I updated Ruby on my MacBook Air to 2.7.1 using rbenv and then it successfully installed. I’d start there if you can @realityworks 👍🏼

Is there any reason to believe this is fixed in Monterey?

I managed to get ffi gem to install on Monterey 12.0.1 with this line in Gemfile:

gem 'ffi', '>= 1.15.2'

Make sure to install Command Line Tools if you want to use system ffi.h headers:

$ xcode-select --print-path
/Library/Developer/CommandLineTools

$ find /Library/Developer/CommandLineTools -iname 'ffi.h'
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/ffi/ffi.h
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/ffi/ffi.h
/Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/usr/include/ffi/ffi.h