Skip to content
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

[libffi] Build failure on x64-osx #44227

Open
yonamine opened this issue Mar 7, 2025 · 2 comments
Open

[libffi] Build failure on x64-osx #44227

yonamine opened this issue Mar 7, 2025 · 2 comments
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@yonamine
Copy link

yonamine commented Mar 7, 2025

Package: libffi:[email protected]

Host Environment

  • Host: x64-osx
  • Compiler: AppleClang 16.0.0.16000026
  • vcpkg-tool version: 2025-02-11-bec4296bf5289dc9ce83b4f5095943e44162f9c2
    vcpkg-scripts version: d5ec528 2025-02-14 (3 weeks ago)

To Reproduce

vcpkg install libffi

Failure logs

Downloading https://github.com/libffi/libffi/releases/download/v3.4.6/libffi-3.4.6.tar.gz -> libffi-3.4.6.tar.gz
Successfully downloaded libffi-3.4.6.tar.gz
-- Extracting source /Volumes/ExternalHDD/github/vcpkg/downloads/libffi-3.4.6.tar.gz
-- Applying patch dll-bindir.diff
-- Using source at /Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean
-- Getting CMake variables for x64-osx
-- Getting CMake variables for x64-osx-dbg
-- Getting CMake variables for x64-osx-rel
-- Configuring x64-osx-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: /bin/bash -c "V=1 ./../src/libffi-3-5867c437e9.clean/configure  \"--enable-portable-binary\" \"--disable-docs\" \"--disable-multi-os-directory\" \"CCAS=cc\" \"--disable-silent-rules\" \"--verbose\" \"--disable-shared\" \"--enable-static\" \"--prefix=/Volumes/ExternalHDD/github/vcpkg/installed/x64-osx/debug\" \"--bindir=\\${prefix}/../tools/libffi/debug/bin\" \"--sbindir=\\${prefix}/../tools/libffi/debug/sbin\" \"--libdir=\\${prefix}/lib\" \"--includedir=\\${prefix}/../include\" \"--datarootdir=\\${prefix}/share/libffi\""
    Working Directory: /Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/x64-osx-dbg
    Error code: 77
    See logs for more information:
      /Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/config-x64-osx-dbg-config.log
      /Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/config-x64-osx-dbg-out.log
      /Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/config-x64-osx-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:866 (vcpkg_execute_required_process)
  ports/libffi/portfile.cmake:49 (vcpkg_configure_make)
  scripts/ports.cmake:196 (include)



/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/config-x64-osx-dbg-err.log
configure: error: in `/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/x64-osx-dbg':
configure: error: C compiler cannot create executables
See `config.log' for more details
/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/config-x64-osx-dbg-out.log
checking build system type... x86_64-apple-darwin23.6.0
checking host system type... x86_64-apple-darwin23.6.0
checking target system type... x86_64-apple-darwin23.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... ./../src/libffi-3-5867c437e9.clean/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... /usr/bin/cc -isysroot -g -fPIC
checking whether the C compiler works... no
/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/config-x64-osx-dbg-config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libffi configure 3.4.6, which was
generated by GNU Autoconf 2.71.  Invocation command line was

  $ ./../src/libffi-3-5867c437e9.clean/configure --enable-portable-binary --disable-docs --disable-multi-os-directory CCAS=cc --disable-silent-rules --verbose --disable-shared --enable-static --prefix=/Volumes/ExternalHDD/github/vcpkg/installed/x64-osx/debug '--bindir=${prefix}/../tools/libffi/debug/bin' '--sbindir=${prefix}/../tools/libffi/debug/sbin' '--libdir=${prefix}/lib' '--includedir=${prefix}/../include' '--datarootdir=${prefix}/share/libffi'

## --------- ##
## Platform. ##
## --------- ##

hostname = FRANKs-MacBook-Air.local
uname -m = x86_64
uname -r = 23.6.0
uname -s = Darwin
uname -v = Darwin Kernel Version 23.6.0: Thu Dec 19 20:44:50 PST 2024; root:xnu-10063.141.1.703.2~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
	 Darwin Kernel Version 23.6.0: Thu Dec 19 20:44:50 PST 2024; root:xnu-10063.141.1.703.2~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 8.00 gigabytes
Default processor set: 618 tasks, 2157 threads, 4 processors
Load average: 2.25, Mach factor: 1.76
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /Users/frank.yonamine/.gem/ruby/3.1.3/bin/
PATH: /Users/frank.yonamine/.rubies/ruby-3.1.3/lib/ruby/gems/3.1.0/bin/
PATH: /Users/frank.yonamine/.rubies/ruby-3.1.3/bin/
PATH: /usr/local/bin/
PATH: /usr/local/sbin/
PATH: /Applications/CMake.app/Contents/bin/
PATH: /System/Cryptexes/App/usr/bin/
PATH: /usr/bin/
PATH: /bin/
PATH: /usr/sbin/
PATH: /sbin/
PATH: /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin/
PATH: /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin/
PATH: /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin/
PATH: /Library/Apple/usr/bin/
PATH: /usr/local/share/dotnet/
PATH: ~/.dotnet/tools/
PATH: /Library/Frameworks/Mono.framework/Versions/Current/Commands/
PATH: /Users/frank.yonamine/.cargo/bin/
PATH: /Applications/Utilities/iTerm.app/Contents/Resources/utilities/
PATH: /Volumes/ExternalHDD/github/vcpkg/downloads/tools/ninja/1.12.1-osx/
PATH: /usr/bin/
PATH: /Volumes/ExternalHDD/github/vcpkg/downloads/tools/ninja/1.12.1-osx/


## ----------- ##
## Core tests. ##
## ----------- ##

configure:3015: looking for aux files: ltmain.sh compile missing install-sh config.guess config.sub
configure:3028:  trying ./../src/libffi-3-5867c437e9.clean/
configure:3057:   ./../src/libffi-3-5867c437e9.clean/ltmain.sh found
configure:3057:   ./../src/libffi-3-5867c437e9.clean/compile found
configure:3057:   ./../src/libffi-3-5867c437e9.clean/missing found
configure:3039:   ./../src/libffi-3-5867c437e9.clean/install-sh found
configure:3057:   ./../src/libffi-3-5867c437e9.clean/config.guess found
configure:3057:   ./../src/libffi-3-5867c437e9.clean/config.sub found
configure:3178: checking build system type
configure:3193: result: x86_64-apple-darwin23.6.0
configure:3213: checking host system type
configure:3227: result: x86_64-apple-darwin23.6.0
configure:3247: checking target system type
configure:3261: result: x86_64-apple-darwin23.6.0
configure:3359: checking for gsed
configure:3395: result: sed
configure:3424: checking for a BSD-compatible install
configure:3497: result: /usr/bin/install -c
configure:3508: checking whether build environment is sane
configure:3563: result: yes
configure:3718: checking for a race-free mkdir -p
configure:3762: result: ./../src/libffi-3-5867c437e9.clean/install-sh -c -d
configure:3769: checking for gawk
configure:3804: result: no
configure:3769: checking for mawk
configure:3804: result: no
configure:3769: checking for nawk
configure:3804: result: no
configure:3769: checking for awk
configure:3790: found /usr/bin/awk
configure:3801: result: awk
configure:3812: checking whether make sets $(MAKE)
configure:3835: result: yes
configure:3865: checking whether make supports nested variables
configure:3883: result: yes
configure:4092: checking for gcc
configure:4124: result: /usr/bin/cc -isysroot -g -fPIC
configure:4477: checking for C compiler version
configure:4486: /usr/bin/cc -isysroot -g -fPIC --version >&5
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: x86_64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:4497: $? = 0
configure:4486: /usr/bin/cc -isysroot -g -fPIC -v >&5
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: x86_64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: warning: argument unused during compilation: '-isysroot -g' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-fPIC' [-Wunused-command-line-argument]
configure:4497: $? = 0
configure:4486: /usr/bin/cc -isysroot -g -fPIC -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:4497: $? = 1
configure:4486: /usr/bin/cc -isysroot -g -fPIC -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:4497: $? = 1
configure:4486: /usr/bin/cc -isysroot -g -fPIC -version >&5
clang: error: unknown argument '-version'; did you mean '--version'?
clang: error: no input files
configure:4497: $? = 1
configure:4517: checking whether the C compiler works
configure:4539: /usr/bin/cc -isysroot -g -fPIC -fPIC -isysroot -g -isysroot conftest.c  >&5
clang: error: no input files
configure:4543: $? = 1
configure:4583: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libffi"
| #define PACKAGE_TARNAME "libffi"
| #define PACKAGE_VERSION "3.4.6"
| #define PACKAGE_STRING "libffi 3.4.6"
| #define PACKAGE_BUGREPORT "http://github.com/libffi/libffi/issues"
| #define PACKAGE_URL ""
| #define PACKAGE "libffi"
| #define VERSION "3.4.6"
| /* end confdefs.h.  */
| 
| int
| main (void)
| {
| 
|   ;
|   return 0;
| }
configure:4588: error: in `/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/x64-osx-dbg':
configure:4590: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-apple-darwin23.6.0
ac_cv_env_CCASFLAGS_set=
ac_cv_env_CCASFLAGS_value=
ac_cv_env_CCAS_set=set
ac_cv_env_CCAS_value=cc
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-isysroot -g'
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-apple-darwin23.6.0
ac_cv_path_ax_enable_builddir_sed=sed
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_ac_ct_CC='/usr/bin/cc -isysroot -g -fPIC'
ac_cv_prog_make_make_set=yes
ac_cv_target=x86_64-apple-darwin23.6.0
am_cv_make_support_nested_variables=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} '\''/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean/missing'\'' aclocal-1.16'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_LTLDFLAGS=''
AM_RUNTESTFLAGS=''
AM_V='$(V)'
AR='/usr/bin/ar'
AUTOCONF='${SHELL} '\''/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean/missing'\'' autoconf'
AUTOHEADER='${SHELL} '\''/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean/missing'\'' autoheader'
AUTOMAKE='${SHELL} '\''/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean/missing'\'' automake-1.16'
AWK='awk'
BUILD_DOCS_FALSE=''
BUILD_DOCS_TRUE=''
CC='/usr/bin/cc -isysroot -g -fPIC'
CCAS='cc'
CCASDEPMODE=''
CCASFLAGS=''
CCDEPMODE=''
CFLAGS='-fPIC'
CPPFLAGS='-isysroot -g'
CSCOPE='cscope'
CTAGS='ctags'
CXX='/usr/bin/c++'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS='-fPIC'
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
ETAGS='etags'
EXEEXT=''
FFI_DEBUG_FALSE=''
FFI_DEBUG_TRUE=''
FFI_EXEC_TRAMPOLINE_TABLE=''
FFI_EXEC_TRAMPOLINE_TABLE_FALSE=''
FFI_EXEC_TRAMPOLINE_TABLE_TRUE=''
FGREP=''
FILECMD=''
GREP=''
HAVE_LONG_DOUBLE=''
HAVE_LONG_DOUBLE_VARIANT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD='/usr/bin/ld'
LDFLAGS='-isysroot'
LIBFFI_BUILD_VERSIONED_SHLIB_FALSE=''
LIBFFI_BUILD_VERSIONED_SHLIB_GNU_FALSE=''
LIBFFI_BUILD_VERSIONED_SHLIB_GNU_TRUE=''
LIBFFI_BUILD_VERSIONED_SHLIB_SUN_FALSE=''
LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE=''
LIBFFI_BUILD_VERSIONED_SHLIB_TRUE=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO='${SHELL} '\''/Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean/missing'\'' makeinfo'
MANIFEST_TOOL=''
MKDIR_P='./../src/libffi-3-5867c437e9.clean/install-sh -c -d'
NM='/usr/bin/nm'
NMEDIT=''
OBJDUMP='/usr/bin/objdump'
OBJEXT=''
OPT_LDFLAGS=''
OTOOL64=''
OTOOL=''
PACKAGE='libffi'
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
PACKAGE_NAME='libffi'
PACKAGE_STRING='libffi 3.4.6'
PACKAGE_TARNAME='libffi'
PACKAGE_URL=''
PACKAGE_VERSION='3.4.6'
PATH_SEPARATOR=':'
PRTDIAG=''
RANLIB='/usr/bin/ranlib'
READELF=''
SECTION_LDFLAGS=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP='/usr/bin/strip'
TARGET=''
TARGETDIR=''
TARGET_OBJ=''
TESTSUBDIR_FALSE=''
TESTSUBDIR_TRUE=''
VERSION='3.4.6'
ac_ct_AR=''
ac_ct_CC='/usr/bin/cc -isysroot -g -fPIC'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCCAS_FALSE=''
am__fastdepCCAS_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=' -I$(srcdir)'
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
ax_enable_builddir_sed='sed'
bindir='${prefix}/../tools/libffi/debug/bin'
build='x86_64-apple-darwin23.6.0'
build_alias=''
build_cpu='x86_64'
build_os='darwin23.6.0'
build_vendor='apple'
datadir='${datarootdir}'
datarootdir='${prefix}/share/libffi'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-apple-darwin23.6.0'
host_alias=''
host_cpu='x86_64'
host_os='darwin23.6.0'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/../include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /Volumes/ExternalHDD/github/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean/install-sh'
libdir='${prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/Volumes/ExternalHDD/github/vcpkg/installed/x64-osx/debug'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${prefix}/../tools/libffi/debug/sbin'
sharedstatedir='${prefix}/com'
sys_symbol_underscore=''
sysconfdir='${prefix}/etc'
target='x86_64-apple-darwin23.6.0'
target_alias=''
target_cpu='x86_64'
target_os='darwin23.6.0'
target_vendor='apple'
tmake_file=''
toolexecdir=''
toolexeclibdir=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "libffi"
#define PACKAGE_TARNAME "libffi"
#define PACKAGE_VERSION "3.4.6"
#define PACKAGE_STRING "libffi 3.4.6"
#define PACKAGE_BUGREPORT "http://github.com/libffi/libffi/issues"
#define PACKAGE_URL ""
#define PACKAGE "libffi"
#define VERSION "3.4.6"

configure: exit 77
@Cheney-W Cheney-W added the requires:repro The issue is not currently repro-able label Mar 7, 2025
@Cheney-W
Copy link
Contributor

Cheney-W commented Mar 7, 2025

I can't reproduce this issue in my side with the latest vcpkg 2025-02-11-bec4296bf5289dc9ce83b4f5095943e44162f9c2.
Regarding this issue, I have the following suggestions:

  1. Check the local compiler to ensure it is available.
  2. Check the permissions of the external hard drive to see if it is readable and writable.
  3. Try storing vcpkg on the local disk and reinstalling the port.

@yonamine
Copy link
Author

yonamine commented Mar 7, 2025

Change folder to $HOME,
I've just cloned from main branch:

commit 8c901fe (HEAD -> master, origin/master, origin/HEAD)
Author: MonicaLiu [email protected]
Date: Fri Mar 7 04:29:37 2025 -0800

[imgui-sfml] Fix dependency opengl (#44203)

And my compiler is

Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: x86_64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Same build error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

2 participants