microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.83k stars 6.3k forks source link

[gmp] build failure #40016

Closed iboisvert closed 1 month ago

iboisvert commented 1 month ago

Operating system

Linux

Compiler

gcc

Steps to reproduce the behavior

docker run -it --rm mcr.microsoft.com/devcontainers/cpp:ubuntu
mkdir ws && cd ws
apt-get update && apt-get install -y autoconf autoconf-archive
vcpkg new --application
vcpkg add gmp
vcpkg install --triplet=x64-linux gmp

### Failure logs

Text from console:

root ➜ /ws $ vcpkg install --triplet=x64-linux
Fetching registry information from https://github.com/microsoft/vcpkg (HEAD)... A suitable version of cmake was not found (required v3.29.2) Downloading portable cmake 3.29.2... Downloading cmake... https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-linux-x86_64.tar.gz->/usr/local/vcpkg-downloads/cmake-3.29.2-linux-x86_64.tar.gz Extracting cmake... Detecting compiler hash for triplet x64-linux... Compiler found: /usr/bin/c++ The following packages will be built and installed: gmp:x64-linux@6.3.0 -- /root/.cache/vcpkg/registries/git-trees/c28d96e8dd3ed941ba550f1e9d9f7bf1f2a83ac8

Call Stack (most recent call first): scripts/cmake/vcpkg_configure_make.cmake:731 (vcpkg_execute_required_process) /root/.cache/vcpkg/registries/git-trees/c28d96e8dd3ed941ba550f1e9d9f7bf1f2a83ac8/portfile.cmake:82 (vcpkg_configure_make) scripts/ports.cmake:192 (include)


### Additional context

root ➜ /ws $ cat /usr/local/vcpkg/buildtrees/gmp/autoconf-x64-linux-err.log autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force configure.ac:3856: warning: AC_LIBTOOL_PROG_COMPILER_PIC is m4_require'd but not m4_defun'd acinclude.m4:2363: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... configure.ac:3856: the top level configure.ac:3859: warning: AC_ENABLE_SHARED is m4_require'd but not m4_defun'd acinclude.m4:2717: GMP_ASM_X86_MCOUNT is expanded from... configure.ac:3859: the top level configure.ac:3859: warning: AC_PROG_LIBTOOL is m4_require'd but not m4_defun'd acinclude.m4:2717: GMP_ASM_X86_MCOUNT is expanded from... configure.ac:3859: the top level autoreconf: configure.ac: tracing configure.ac:3856: warning: AC_LIBTOOL_PROG_COMPILER_PIC is m4_require'd but not m4_defun'd acinclude.m4:2363: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... configure.ac:3856: the top level configure.ac:3859: warning: AC_ENABLE_SHARED is m4_require'd but not m4_defun'd acinclude.m4:2717: GMP_ASM_X86_MCOUNT is expanded from... configure.ac:3859: the top level configure.ac:3859: warning: AC_PROG_LIBTOOL is m4_require'd but not m4_defun'd acinclude.m4:2717: GMP_ASM_X86_MCOUNT is expanded from... configure.ac:3859: the top level autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf --force configure.ac:3856: warning: AC_LIBTOOL_PROG_COMPILER_PIC is m4_require'd but not m4_defun'd acinclude.m4:2363: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... configure.ac:3856: the top level configure.ac:3859: warning: AC_ENABLE_SHARED is m4_require'd but not m4_defun'd acinclude.m4:2717: GMP_ASM_X86_MCOUNT is expanded from... configure.ac:3859: the top level configure.ac:3859: warning: AC_PROG_LIBTOOL is m4_require'd but not m4_defun'd acinclude.m4:2717: GMP_ASM_X86_MCOUNT is expanded from... configure.ac:3859: the top level configure.ac:2726: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:2814: error: possibly undefined macro: AC_PROG_LIBTOOL configure.ac:2937: error: possibly undefined macro: AC_CHECK_LIBM configure:11298: error: possibly undefined macro: AC_PROG_NM configure:15278: error: possibly undefined macro: AC_LIBTOOL_PROG_COMPILER_PIC configure:15373: error: possibly undefined macro: AC_ENABLE_SHARED autoreconf: /usr/bin/autoconf failed with exit status: 1

iboisvert commented 1 month ago

Sorry, I should be clear: this step is run on host:

docker run -it --rm mcr.microsoft.com/devcontainers/cpp:ubuntu

These steps are run in the container:

mkdir ws && cd ws
apt-get update && apt-get install -y autoconf autoconf-archive
vcpkg new --application
vcpkg add gmp
vcpkg install --triplet=x64-linux gmp
FrankXie05 commented 1 month ago

@iboisvert Thanks for posting this issue. Please run sudo apt-get install autoconf automake libtool and reinstall gmp again.

iboisvert commented 1 month ago

That got it, thanks @FrankXie05 !