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 #43590

Closed
Ywandung-Lyou opened this issue Feb 2, 2025 · 4 comments
Closed

[libffi] build failure #43590

Ywandung-Lyou opened this issue Feb 2, 2025 · 4 comments
Assignees
Labels
category:question This issue is a question

Comments

@Ywandung-Lyou
Copy link

Operating system

Windows

Compiler

MSVC

Steps to reproduce the behavior

`vcpkg install libffi`

Failure logs

Computing installation plan...
The following packages will be built and installed:
    libffi:[email protected]
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe
Restored 0 package(s) from C:\Users\liouyuandong\AppData\Local\vcpkg\archives in 486 us. Use --debug to see more details.
Installing 1/1 libffi:[email protected]...
Building libffi:[email protected]...
-- Using cached libffi-3.4.6.tar.gz.
-- Cleaning sources at C:/Program Files/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Program Files/vcpkg/downloads/libffi-3.4.6.tar.gz
-- Applying patch dll-bindir.diff
-- Using source at C:/Program Files/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean
-- Found external ninja('1.12.1').
-- Getting CMake variables for x64-windows
-- Getting CMake variables for x64-windows
-- Warning: Paths with embedded space may be handled incorrectly by configure:
   C:/Program Files/vcpkg/packages/libffi_x64-windows
   C:/Program Files/vcpkg/installed/x64-windows
   Please move the path to one without whitespaces!
-- Using cached msys2-autoconf-wrapper-20240607-1-any.pkg.tar.zst.
-- Using cached msys2-automake-wrapper-20240607-1-any.pkg.tar.zst.
-- Using cached msys2-binutils-2.43.1-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libtool-2.4.7-4-x86_64.pkg.tar.zst.
-- Using cached msys2-make-4.4.1-2-x86_64.pkg.tar.zst.
-- Using cached msys2-pkgconf-2.3.0-1-x86_64.pkg.tar.zst.
-- Using cached msys2-which-2.21-4-x86_64.pkg.tar.zst.
-- Using cached msys2-bash-5.2.037-1-x86_64.pkg.tar.zst.
-- Using cached msys2-coreutils-8.32-5-x86_64.pkg.tar.zst.
-- Using cached msys2-file-5.45-3-x86_64.pkg.tar.zst.
-- Using cached msys2-gawk-5.3.1-1-x86_64.pkg.tar.zst.
-- Using cached msys2-grep-1~3.0-6-x86_64.pkg.tar.zst.
-- Using cached msys2-gzip-1.13-1-x86_64.pkg.tar.zst.
-- Using cached msys2-diffutils-3.10-1-x86_64.pkg.tar.zst.
-- Using cached msys2-sed-4.9-1-x86_64.pkg.tar.zst.
-- Using cached msys2-msys2-runtime-3.5.4-2-x86_64.pkg.tar.zst.
-- Using cached msys2-autoconf2.72-2.72-1-any.pkg.tar.zst.
-- Using cached msys2-automake1.16-1.16.5-1-any.pkg.tar.zst.
-- Using cached msys2-automake1.17-1.17-1-any.pkg.tar.zst.
-- Using cached msys2-libiconv-1.17-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libintl-0.22.4-1-x86_64.pkg.tar.zst.
-- Using cached msys2-zlib-1.3.1-1-x86_64.pkg.tar.zst.
-- Using cached msys2-tar-1.35-2-x86_64.pkg.tar.zst.
-- Using cached msys2-findutils-4.10.0-2-x86_64.pkg.tar.zst.
-- Using cached msys2-gmp-6.3.0-1-x86_64.pkg.tar.zst.
-- Using cached msys2-gcc-libs-13.3.0-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libbz2-1.0.8-4-x86_64.pkg.tar.zst.
-- Using cached msys2-liblzma-5.6.3-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libzstd-1.5.6-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libreadline-8.2.013-1-x86_64.pkg.tar.zst.
-- Using cached msys2-mpfr-4.2.1-1-x86_64.pkg.tar.zst.
-- Using cached msys2-libpcre-8.45-4-x86_64.pkg.tar.zst.
-- Using cached msys2-m4-1.4.19-2-x86_64.pkg.tar.zst.
-- Using cached msys2-perl-5.38.2-2-x86_64.pkg.tar.zst.
-- Using cached msys2-ncurses-6.5.20240831-2-x86_64.pkg.tar.zst.
-- Using cached msys2-libxcrypt-4.4.36-1-x86_64.pkg.tar.zst.
-- Using msys root at C:/Program Files/vcpkg/downloads/tools/msys2/2db36fb050d01f45
-- Using cached msys2-mingw-w64-x86_64-pkgconf-1~2.3.0-1-any.pkg.tar.zst.
-- Using cached msys2-msys2-runtime-3.5.4-2-x86_64.pkg.tar.zst.
-- Using msys root at C:/Program Files/vcpkg/downloads/tools/msys2/21caed2f81ec917b
-- Configuring x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: "C:/Program Files/vcpkg/downloads/tools/msys2/2db36fb050d01f45/usr/bin/bash.exe" --noprofile --norc --debug -c "V=1 CPP='compile cl.exe -E' CC='compile cl.exe' CC_FOR_BUILD='compile cl.exe' CPP_FOR_BUILD='compile cl.exe -E' CXX_FOR_BUILD='compile cl.exe' CXX='compile cl.exe' RC='windres-rc rc.exe' WINDRES='windres-rc rc.exe' AR='ar-lib lib.exe' LD='link.exe -verbose' RANLIB=':' STRIP=':' NM='dumpbin.exe -symbols -headers' DLLTOOL='link.exe -verbose -dll' CCAS=':' AS=':' ./../src/libffi-3-5867c437e9.clean/configure --build=x86_64-pc-mingw32 \"--enable-portable-binary\" \"--disable-docs\" \"--disable-multi-os-directory\" \"CFLAGS=${CFLAGS} -DFFI_BUILDING_DLL\" \"CCAS=msvcc.sh -m64\" \"ac_cv_prog_ac_ct_STRIP=:\" \"gl_cv_double_slash_root=yes\" \"ac_cv_func_memmove=yes\" \"--disable-silent-rules\" \"--verbose\" \"--enable-shared\" \"--disable-static\" \"--prefix=/C/Program Files/vcpkg/installed/x64-windows/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: C:/Program Files/vcpkg/buildtrees/libffi/x64-windows-dbg
    Error code: 127
    See logs for more information:

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)


error: building libffi:x64-windows failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle libffi:x64-windows: 6.2 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libffi
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[libffi]+Build+error+on+x64-windows&body=Copy+issue+body+from+C%3A%2FProgram%20Files%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md

Additional context

No response

@Ywandung-Lyou Ywandung-Lyou added the category:port-bug The issue is with a library, which is something the port should already support label Feb 2, 2025
@Chiassonastraypatrick
Copy link

Try esi157 code at c++

@Ywandung-Lyou
Copy link
Author

Sorry but what is esi157 code?

@MonicaLiu0311 MonicaLiu0311 added requires:repro The issue is not currently repro-able and removed category:port-bug The issue is with a library, which is something the port should already support labels Feb 5, 2025
@MonicaLiu0311
Copy link
Contributor

Sorry I didn't repro your issue.

PS E:\vcpkg> ./vcpkg install libffi:x64-windows
Computing installation plan...
The following packages will be built and installed:
    libffi:[email protected]
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe
Installing 1/1 libffi:[email protected]...
Building libffi:[email protected]...
-- Using cached libffi-3.4.6.tar.gz

...

-- Configuring x64-windows-dbg
-- Configuring x64-windows-rel
-- Building x64-windows-dbg
-- Installing x64-windows-dbg
-- Building x64-windows-rel
-- Installing x64-windows-rel
-- Fixing pkgconfig file: E:/vcpkg/packages/libffi_x64-windows/lib/pkgconfig/libffi.pc
-- Fixing pkgconfig file: E:/vcpkg/packages/libffi_x64-windows/debug/lib/pkgconfig/libffi.pc
-- Installing: E:/vcpkg/packages/libffi_x64-windows/share/libffi/usage
-- Installing: E:/vcpkg/packages/libffi_x64-windows/share/unofficial-libffi/unofficial-libffi-config.cmake
-- Installing: E:/vcpkg/packages/libffi_x64-windows/share/libffi/libffiConfig.cmake
-- Installing: E:/vcpkg/packages/libffi_x64-windows/share/libffi/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 127 ms.
Elapsed time to handle libffi:x64-windows: 3.1 min
libffi:x64-windows package ABI: 836dfad52e44ab08c9b98ec23fc8d5f23fca1be8c10d27d1e091fda522daaf92
Total install time: 3.1 min
libffi can be imported via CMake FindPkgConfig module:

    find_package(PkgConfig)
    pkg_check_modules(LIBFFI REQUIRED IMPORTED_TARGET libffi)
    target_link_libraries(main PRIVATE PkgConfig::LIBFFI)

vcpkg provides proprietary CMake targets:

    find_package(unofficial-libffi CONFIG REQUIRED)
    target_link_libraries(main PRIVATE unofficial::libffi::libffi)

@MonicaLiu0311
Copy link
Contributor

C:/Program Files/vcpkg/buildtrees/libffi/src/libffi-3-5867c437e9.clean

The path should not contain spaces or non-ASCII characters.

@MonicaLiu0311 MonicaLiu0311 added category:question This issue is a question and removed requires:repro The issue is not currently repro-able labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

3 participants