Skip to content

Outdated version of vendored libffi causes build error on macOS Big Sur with M1 processor #30

Closed

Description

@fanninpm

FYI, I'm testing this from the RustPython project, whose jit feature imports an outdated version of this library. RustPython/RustPython#3050 updates the libffi crate to v2.0.0, which unfortunately still has this problem. A workaround is to specify the system feature.

Output from cargo build
   Compiling libffi-sys v1.1.3
error: failed to run custom build command for `libffi-sys v1.1.3`

Caused by:
  process didn't exit successfully: `~/Documents/GitHub/RustPython/target/release/build/libffi-sys-d3f96f963a2ec199/build-script-build` (exit status: 101)
  --- stdout
  glibtoolize: putting auxiliary files in '.'.
  glibtoolize: copying file './ltmain.sh'
  glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
  glibtoolize: copying file 'm4/libtool.m4'
  glibtoolize: copying file 'm4/ltoptions.m4'
  glibtoolize: copying file 'm4/ltsugar.m4'
  glibtoolize: copying file 'm4/ltversion.m4'
  glibtoolize: copying file 'm4/lt~obsolete.m4'
  checking build system type... arm-apple-darwin20.6.0
  checking host system type... arm-apple-darwin20.6.0
  checking target system type... arm-apple-darwin20.6.0
  continue configure in default builddir "./aarch64-apple-darwin"
  ....exec /bin/sh ../configure "--srcdir=.." "--enable-builddir=aarch64-apple-darwin" "darwin20.6.0"
  checking build system type... arm-apple-darwin20.6.0
  checking host system type... arm-apple-darwin20.6.0
  checking target system type... arm-apple-darwin20.6.0
  checking for gsed... sed
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a race-free mkdir -p... ../install-sh -c -d
  checking for gawk... no
  checking for mawk... no
  checking for nawk... no
  checking for awk... awk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables... 
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether the compiler supports GNU C... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to enable C11 features... none needed
  checking whether gcc understands -c and -o together... yes
  checking whether make supports the include directive... yes (GNU style)
  checking dependency style of gcc... gcc3
  checking for g++... g++
  checking whether the compiler supports GNU C++... yes
  checking whether g++ accepts -g... yes
  checking for g++ option to enable C++11 features... none needed
  checking dependency style of g++... gcc3
  checking dependency style of gcc... gcc3
  checking how to print strings... printf
  checking for a sed that does not truncate output... /usr/bin/sed
  checking for grep that handles long lines and -e... /usr/bin/grep
  checking for egrep... /usr/bin/grep -E
  checking for fgrep... /usr/bin/grep -F
  checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
  checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
  checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
  checking the name lister (/usr/bin/nm -B) interface... BSD nm
  checking whether ln -s works... yes
  checking the maximum length of command line arguments... 786432
  checking how to convert arm-apple-darwin20.6.0 file names to arm-apple-darwin20.6.0 format... func_convert_file_noop
  checking how to convert arm-apple-darwin20.6.0 file names to toolchain format... func_convert_file_noop
  checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
  checking for objdump... objdump
  checking how to recognize dependent libraries... pass_all
  checking for dlltool... no
  checking how to associate runtime and link libraries... printf %s\n
  checking for ar... ar
  checking for archiver @FILE support... no
  checking for strip... strip
  checking for ranlib... ranlib
  checking command to parse /usr/bin/nm -B output from gcc object... ok
  checking for sysroot... no
  checking for a working dd... /bin/dd
  checking how to truncate binary pipes... /bin/dd bs=4096 count=1
  checking for mt... no
  checking if : is a manifest tool... no
  checking for dsymutil... dsymutil
  checking for nmedit... nmedit
  checking for lipo... lipo
  checking for otool... otool
  checking for otool64... no
  checking for -single_module linker flag... yes
  checking for -exported_symbols_list linker flag... yes
  checking for -force_load linker flag... yes
  checking for stdio.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for strings.h... yes
  checking for sys/stat.h... yes
  checking for sys/types.h... yes
  checking for unistd.h... yes
  checking for dlfcn.h... yes
  checking for objdir... .libs
  checking if gcc supports -fno-rtti -fno-exceptions... yes
  checking for gcc option to produce PIC... -fno-common -DPIC
  checking if gcc PIC flag -fno-common -DPIC works... yes
  checking if gcc static flag -static works... no
  checking if gcc supports -c -o file.o... yes
  checking if gcc supports -c -o file.o... (cached) yes
  checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
  checking dynamic linker characteristics... darwin20.6.0 dyld
  checking how to hardcode library paths into programs... immediate
  checking whether stripping libraries is possible... yes
  checking if libtool supports shared libraries... yes
  checking whether to build shared libraries... yes
  checking whether to build static libraries... yes
  checking how to run the C++ preprocessor... g++ -E
  checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
  checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
  checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
  checking for g++ option to produce PIC... -fno-common -DPIC
  checking if g++ PIC flag -fno-common -DPIC works... yes
  checking if g++ static flag -static works... no
  checking if g++ supports -c -o file.o... yes
  checking if g++ supports -c -o file.o... (cached) yes
  checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
  checking dynamic linker characteristics... darwin20.6.0 dyld
  checking how to hardcode library paths into programs... immediate
  checking size of size_t... 8
  checking for C compiler vendor... clang

  ********************************************************
  * WARNING: Don't know the best CFLAGS for this system  *
  * Use ./configure CFLAGS=... to specify your own flags *
  * (otherwise, a default of CFLAGS=-O3 will be used)    *
  ********************************************************

  checking whether C compiler accepts -O3... yes
  checking CFLAGS for maximum warnings... -Wall
  checking whether to enable maintainer-specific portions of Makefiles... no
  checking for sys/mman.h... yes
  checking for mmap... yes
  checking for mkostemp... yes
  checking for sys/mman.h... (cached) yes
  checking for mmap... (cached) yes
  checking whether read-only mmap of a plain file works... yes
  checking whether mmap from /dev/zero works... no
  checking for MAP_ANON(YMOUS)... yes
  checking whether mmap with MAP_ANON(YMOUS) works... yes
  checking for egrep... (cached) /usr/bin/grep -E
  checking for memcpy... yes
  checking for size_t... yes
  checking for working alloca.h... yes
  checking for alloca... yes
  checking size of double... 8
  checking size of long double... 8
  checking whether byte ordering is bigendian... no
  checking assembler .cfi pseudo-op support... no
  checking for _ prefix in compiled symbols... yes
  checking whether .eh_frame section should be read-only... no
  checking for __attribute__((visibility("hidden")))... yes
  checking for ld used by gcc... (cached) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
  checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... (cached) no
  configure: versioning on shared library symbols is no
  checking that generated files are newer than configure... done
  configure: creating ./config.status
  config.status: creating include/Makefile
  config.status: creating include/ffi.h
  config.status: creating Makefile
  config.status: creating testsuite/Makefile
  config.status: creating man/Makefile
  config.status: creating doc/Makefile
  config.status: creating libffi.pc
  config.status: creating fficonfig.h
  config.status: executing buildir commands
  config.status: create top_srcdir/Makefile guessed from local Makefile
  config.status: build in aarch64-apple-darwin (HOST=aarch64-apple-darwin)
  config.status: executing depfiles commands
  config.status: executing libtool commands
  config.status: executing include commands
  config.status: executing src commands
  MAKE aarch64-apple-darwin :        1 * install
  Making install in include
  make[3]: Nothing to be done for `install-exec-am'.
   ../../install-sh -c -d '~/Documents/GitHub/RustPython/target/release/build/libffi-sys-dc92f43a95626daf/out/libffi-root/include'
   /usr/bin/install -c -m 644 ffi.h ffitarget.h '~/Documents/GitHub/RustPython/target/release/build/libffi-sys-dc92f43a95626daf/out/libffi-root/include'
  Making install in testsuite
  make[3]: Nothing to be done for `install-exec-am'.
  make[3]: Nothing to be done for `install-data-am'.
  Making install in man
  make[3]: Nothing to be done for `install-exec-am'.
   ../../install-sh -c -d '~/Documents/GitHub/RustPython/target/release/build/libffi-sys-dc92f43a95626daf/out/libffi-root/share/man/man3'
   /usr/bin/install -c -m 644 ../../man/ffi.3 ../../man/ffi_call.3 ../../man/ffi_prep_cif.3 ../../man/ffi_prep_cif_var.3 '~/Documents/GitHub/RustPython/target/release/build/libffi-sys-dc92f43a95626daf/out/libffi-root/share/man/man3'
  depbase=`echo src/prep_cif.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
  	/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src   -O3 -Wall -fexceptions -MT src/prep_cif.lo -MD -MP -MF $depbase.Tpo -c -o src/prep_cif.lo ../src/prep_cif.c &&\
  	mv -f $depbase.Tpo $depbase.Plo
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/prep_cif.lo -MD -MP -MF src/.deps/prep_cif.Tpo -c ../src/prep_cif.c  -fno-common -DPIC -o src/.libs/prep_cif.o
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/prep_cif.lo -MD -MP -MF src/.deps/prep_cif.Tpo -c ../src/prep_cif.c  -fno-common -DPIC -o src/prep_cif.o >/dev/null 2>&1
  depbase=`echo src/types.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
  	/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src   -O3 -Wall -fexceptions -MT src/types.lo -MD -MP -MF $depbase.Tpo -c -o src/types.lo ../src/types.c &&\
  	mv -f $depbase.Tpo $depbase.Plo
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/types.lo -MD -MP -MF src/.deps/types.Tpo -c ../src/types.c  -fno-common -DPIC -o src/.libs/types.o
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/types.lo -MD -MP -MF src/.deps/types.Tpo -c ../src/types.c  -fno-common -DPIC -o src/types.o >/dev/null 2>&1
  depbase=`echo src/raw_api.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
  	/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src   -O3 -Wall -fexceptions -MT src/raw_api.lo -MD -MP -MF $depbase.Tpo -c -o src/raw_api.lo ../src/raw_api.c &&\
  	mv -f $depbase.Tpo $depbase.Plo
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/raw_api.lo -MD -MP -MF src/.deps/raw_api.Tpo -c ../src/raw_api.c  -fno-common -DPIC -o src/.libs/raw_api.o
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/raw_api.lo -MD -MP -MF src/.deps/raw_api.Tpo -c ../src/raw_api.c  -fno-common -DPIC -o src/raw_api.o >/dev/null 2>&1
  depbase=`echo src/java_raw_api.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
  	/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src   -O3 -Wall -fexceptions -MT src/java_raw_api.lo -MD -MP -MF $depbase.Tpo -c -o src/java_raw_api.lo ../src/java_raw_api.c &&\
  	mv -f $depbase.Tpo $depbase.Plo
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/java_raw_api.lo -MD -MP -MF src/.deps/java_raw_api.Tpo -c ../src/java_raw_api.c  -fno-common -DPIC -o src/.libs/java_raw_api.o
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/java_raw_api.lo -MD -MP -MF src/.deps/java_raw_api.Tpo -c ../src/java_raw_api.c  -fno-common -DPIC -o src/java_raw_api.o >/dev/null 2>&1
  depbase=`echo src/closures.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
  	/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src   -O3 -Wall -fexceptions -MT src/closures.lo -MD -MP -MF $depbase.Tpo -c -o src/closures.lo ../src/closures.c &&\
  	mv -f $depbase.Tpo $depbase.Plo
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/closures.lo -MD -MP -MF src/.deps/closures.Tpo -c ../src/closures.c  -fno-common -DPIC -o src/.libs/closures.o
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/closures.lo -MD -MP -MF src/.deps/closures.Tpo -c ../src/closures.c  -fno-common -DPIC -o src/closures.o >/dev/null 2>&1
  depbase=`echo src/arm/ffi.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
  	/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src   -O3 -Wall -fexceptions -MT src/arm/ffi.lo -MD -MP -MF $depbase.Tpo -c -o src/arm/ffi.lo ../src/arm/ffi.c &&\
  	mv -f $depbase.Tpo $depbase.Plo
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/arm/ffi.lo -MD -MP -MF src/arm/.deps/ffi.Tpo -c ../src/arm/ffi.c  -fno-common -DPIC -o src/arm/.libs/ffi.o
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -O3 -Wall -fexceptions -MT src/arm/ffi.lo -MD -MP -MF src/arm/.deps/ffi.Tpo -c ../src/arm/ffi.c  -fno-common -DPIC -o src/arm/ffi.o >/dev/null 2>&1
  depbase=`echo src/arm/sysv.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
  	/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src  -I. -I../include -Iinclude -I../src  -MT src/arm/sysv.lo -MD -MP -MF $depbase.Tpo -c -o src/arm/sysv.lo ../src/arm/sysv.S &&\
  	mv -f $depbase.Tpo $depbase.Plo
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -MT src/arm/sysv.lo -MD -MP -MF src/arm/.deps/sysv.Tpo -c ../src/arm/sysv.S  -fno-common -DPIC -o src/arm/.libs/sysv.o
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -MT src/arm/sysv.lo -MD -MP -MF src/arm/.deps/sysv.Tpo -c ../src/arm/sysv.S  -fno-common -DPIC -o src/arm/sysv.o >/dev/null 2>&1
  /bin/sh ./libtool  --tag=CC   --mode=link gcc  -O3 -Wall -fexceptions   -o libffi_convenience.la  src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo   src/arm/ffi.lo src/arm/sysv.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/arm/.libs/ffi.o src/arm/.libs/sysv.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 gcc  -O3 -Wall -fexceptions -no-undefined -version-info `grep -v '^#' ../libtool-version`     -o libffi.la -rpath ~/Documents/GitHub/RustPython/target/release/build/libffi-sys-dc92f43a95626daf/out/libffi-root/lib src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo  src/arm/ffi.lo src/arm/sysv.lo 
  libtool: link: gcc -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/arm/.libs/ffi.o src/arm/.libs/sysv.o    -O3   -install_name  ~/Documents/GitHub/RustPython/target/release/build/libffi-sys-dc92f43a95626daf/out/libffi-root/lib/libffi.7.dylib -compatibility_version 9 -current_version 9.0 -Wl,-single_module

  --- stderr
  autoreconf: export WARNINGS=
  autoreconf: Entering directory '.'
  autoreconf: configure.ac: not using Gettext
  autoreconf: running: aclocal -I m4
  autoreconf: configure.ac: tracing
  autoreconf: running: glibtoolize --copy
  autoreconf: configure.ac: not using Intltool
  autoreconf: configure.ac: not using Gtkdoc
  autoreconf: running: aclocal -I m4
  autoreconf: running: /opt/homebrew/Cellar/autoconf/2.71/bin/autoconf
  configure.ac:8: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete.
  configure.ac:8: You should run autoupdate.
  ./lib/autoconf/general.m4:2081: AC_CANONICAL_SYSTEM is expanded from...
  configure.ac:8: the top level
  configure.ac:41: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
  configure.ac:41: You should run autoupdate.
  m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
  configure.ac:41: the top level
  configure.ac:68: warning: The macro `AC_TRY_COMPILE' is obsolete.
  configure.ac:68: You should run autoupdate.
  ./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
  lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
  lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
  ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
  ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
  acinclude.m4:3: AC_FUNC_MMAP_BLACKLIST is expanded from...
  configure.ac:68: the top level
  configure.ac:85: warning: The macro `AC_HEADER_STDC' is obsolete.
  configure.ac:85: You should run autoupdate.
  ./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
  configure.ac:85: the top level
  configure.ac:112: warning: The macro `AC_TRY_COMPILE' is obsolete.
  configure.ac:112: You should run autoupdate.
  ./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
  lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
  lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
  ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
  ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
  m4/asmcfi.m4:1: GCC_AS_CFI_PSEUDO_OP is expanded from...
  configure.ac:112: the top level
  configure.ac:116: warning: The macro `AC_TRY_LINK' is obsolete.
  configure.ac:116: You should run autoupdate.
  ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
  lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
  lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
  ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
  ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
  configure.ac:116: the top level
  configure.ac:132: warning: The macro `AC_TRY_COMPILE' is obsolete.
  configure.ac:132: You should run autoupdate.
  ./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
  lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
  lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
  ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
  ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
  configure.ac:132: the top level
  configure.ac:286: warning: The macro `AC_HELP_STRING' is obsolete.
  configure.ac:286: You should run autoupdate.
  ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
  configure.ac:286: the top level
  configure.ac:380: warning: The macro `AC_HELP_STRING' is obsolete.
  configure.ac:380: You should run autoupdate.
  ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
  acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from...
  configure.ac:380: the top level
  configure.ac:380: warning: The macro `AC_PROG_LD' is obsolete.
  configure.ac:380: You should run autoupdate.
  m4/libtool.m4:3325: AC_PROG_LD is expanded from...
  acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from...
  acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from...
  configure.ac:380: the top level
  configure.ac:380: warning: The macro `AC_TRY_RUN' is obsolete.
  configure.ac:380: You should run autoupdate.
  ./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from...
  acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from...
  acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from...
  configure.ac:380: the top level
  configure.ac:380: warning: The macro `AC_TRY_LINK' is obsolete.
  configure.ac:380: You should run autoupdate.
  ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
  acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from...
  configure.ac:380: the top level
  autoreconf: running: /opt/homebrew/Cellar/autoconf/2.71/bin/autoheader
  autoreconf: running: automake --add-missing --copy --no-force
  configure.ac:31: installing './compile'
  configure.ac:19: installing './install-sh'
  configure.ac:19: installing './missing'
  Makefile.am: installing './depcomp'
  doc/Makefile.am:3: installing 'doc/mdate-sh'
  doc/Makefile.am:3: installing 'doc/texinfo.tex'
  autoreconf: Leaving directory '.'
  clang: error: unsupported option '-print-multi-os-directory'
  clang: error: no input files
  ../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));
                                                         ^
  ../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.
  Undefined symbols for architecture arm64:
    "_ffi_call", referenced from:
        _ffi_raw_call in raw_api.o
        _ffi_java_raw_call in java_raw_api.o
    "_ffi_closure_trampoline_table_page", referenced from:
        _ffi_closure_alloc in closures.o
    "_ffi_prep_cif_machdep", referenced from:
        _ffi_prep_cif_core in prep_cif.o
    "_ffi_prep_cif_machdep_var", referenced from:
        _ffi_prep_cif_core in prep_cif.o
    "_ffi_prep_closure_loc", referenced from:
        _ffi_prep_closure in prep_cif.o
        _ffi_prep_raw_closure_loc in raw_api.o
        _ffi_prep_raw_closure in raw_api.o
        _ffi_prep_java_raw_closure_loc in java_raw_api.o
        _ffi_prep_java_raw_closure in java_raw_api.o
  ld: symbol(s) not found for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[2]: *** [libffi.la] Error 1
  make[1]: *** [install-recursive] Error 1
  make: *** [install] Error 2
  thread 'main' panicked at 'Building libffi', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/libffi-sys-1.1.3/build/common.rs:8:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The current version of libffi is v3.4.2, while this crate vendors v3.3. v3.4.2 contains libffi/libffi#565, which adds some support for the M1 processor.

Activity

  1. yorickpeterse commented on Oct 24, 2021

    @yorickpeterse
    Contributor

    The fix for this has been released in libffi-sys 1.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions