microsoft / vcpkg

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

[mpir] build failure #14827

Closed vmiheer closed 3 years ago

vmiheer commented 3 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install mpir

Failure logs

CMake Error at scripts/cmake/vcpkg_find_acquire_program.cmake:533 (message):
  Could not find yasm.  Please install it via your package manager:

      sudo apt-get install yasm
Call Stack (most recent call first):
  ports/mpir/portfile.cmake:27 (vcpkg_find_acquire_program)
  scripts/ports.cmake:136 (include)

I think vcpkg should be standalone and not dependent on apt?

vmiheer commented 3 years ago

After installing yasm+autoconf using apt, now I get:

-- Generating configure for x64-linux
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:106 (message):
    Command failed: /usr/bin/autoreconf -vfi
    Working Directory: /home/mvaidya/setup/vcpkg/buildtrees/mpir/src/3.0.0-a3f571144a.clean/
    Error code: 1
    See logs for more information:
      /home/mvaidya/setup/vcpkg/buildtrees/mpir/autoconf-x64-linux-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:533 (vcpkg_execute_required_process)
  ports/mpir/portfile.cmake:45 (vcpkg_configure_make)
  scripts/ports.cmake:136 (include)
$ cat /home/mvaidya/setup/vcpkg/buildtrees/mpir/autoconf-x64-linux-err.log
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
configure.ac:2833: warning: AC_LIBTOOL_PROG_COMPILER_PIC is m4_require'd but not m4_defun'd
acinclude.m4:2192: GMP_ASM_X86_GOT_UNDERSCORE is expanded from...
configure.ac:2833: the top level
configure.ac:2836: warning: AC_ENABLE_SHARED is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
configure.ac:2836: warning: AC_PROG_LIBTOOL is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
autoreconf: configure.ac: tracing
configure.ac:2833: warning: AC_LIBTOOL_PROG_COMPILER_PIC is m4_require'd but not m4_defun'd
acinclude.m4:2192: GMP_ASM_X86_GOT_UNDERSCORE is expanded from...
configure.ac:2833: the top level
configure.ac:2836: warning: AC_ENABLE_SHARED is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
configure.ac:2836: warning: AC_PROG_LIBTOOL is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:2833: warning: AC_LIBTOOL_PROG_COMPILER_PIC is m4_require'd but not m4_defun'd
acinclude.m4:2192: GMP_ASM_X86_GOT_UNDERSCORE is expanded from...
configure.ac:2833: the top level
configure.ac:2836: warning: AC_ENABLE_SHARED is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
configure.ac:2836: warning: AC_PROG_LIBTOOL is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
configure:11008: error: possibly undefined macro: AC_PROG_NM
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:14506: error: possibly undefined macro: AC_LIBTOOL_PROG_COMPILER_PIC
configure:14601: error: possibly undefined macro: AC_ENABLE_SHARED
configure:14602: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1
JackBoosY commented 3 years ago

@vmiheer Can you provide the full log /home/mvaidya/setup/vcpkg/buildtrees/mpir/autoconf-x64-linux-err.log and /home/mvaidya/setup/vcpkg/buildtrees/mpir/x64-linux-dbg/config.log?

Thanks.

vmiheer commented 3 years ago
$ cat /home/mvaidya/setup/vcpkg/buildtrees/mpir/autoconf-x64-linux-err.log
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
configure.ac:2833: warning: AC_LIBTOOL_PROG_COMPILER_PIC is m4_require'd but not m4_defun'd
acinclude.m4:2192: GMP_ASM_X86_GOT_UNDERSCORE is expanded from...
configure.ac:2833: the top level
configure.ac:2836: warning: AC_ENABLE_SHARED is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
configure.ac:2836: warning: AC_PROG_LIBTOOL is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
autoreconf: configure.ac: tracing
configure.ac:2833: warning: AC_LIBTOOL_PROG_COMPILER_PIC is m4_require'd but not m4_defun'd
acinclude.m4:2192: GMP_ASM_X86_GOT_UNDERSCORE is expanded from...
configure.ac:2833: the top level
configure.ac:2836: warning: AC_ENABLE_SHARED is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
configure.ac:2836: warning: AC_PROG_LIBTOOL is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:2833: warning: AC_LIBTOOL_PROG_COMPILER_PIC is m4_require'd but not m4_defun'd
acinclude.m4:2192: GMP_ASM_X86_GOT_UNDERSCORE is expanded from...
configure.ac:2833: the top level
configure.ac:2836: warning: AC_ENABLE_SHARED is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
configure.ac:2836: warning: AC_PROG_LIBTOOL is m4_require'd but not m4_defun'd
acinclude.m4:2506: GMP_ASM_X86_MCOUNT is expanded from...
configure.ac:2836: the top level
configure:11008: error: possibly undefined macro: AC_PROG_NM
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:14506: error: possibly undefined macro: AC_LIBTOOL_PROG_COMPILER_PIC
configure:14601: error: possibly undefined macro: AC_ENABLE_SHARED
configure:14602: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1
$ cat /home/mvaidya/setup/vcpkg/buildtrees/mpir/x64-linux-dbg/config.log                                                                                                                                                                                                                                                                                       
cat: /home/mvaidya/setup/vcpkg/buildtrees/mpir/x64-linux-dbg/config.log: No such file or directory
JackBoosY commented 3 years ago

Seems your autoconfig which installed manually is out-dated. Please update it and try again.

Thanks.

vmiheer commented 3 years ago

What version does it need? I got all updates installed on Ubuntu 20.04.

$ sudo apt update                                                                                                                                                                                                                                                                                                                                                :( 1 20-12-02 - 10:28:44
Hit:1 https://cli.github.com/packages focal InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 https://download.docker.com/linux/ubuntu focal InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:7 http://ppa.launchpad.net/rjeschmi/lmod/ubuntu focal InRelease
Hit:8 http://dl.google.com/linux/chrome/deb stable InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

$ sudo apt upgrade                                                                                                                                                                                                                                                                                                                                                    20-12-02 - 10:29:10
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ ~/setup/vcpkg/vcpkg install mpir                                                                                                                                                                                                                                                                                                                                    20-12-02 - 10:29:13
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
Computing installation plan...
The following packages will be built and installed:
    mpir[core]:x64-linux
Detecting compiler hash for triplet x64-linux...
Starting package 1/1: mpir:x64-linux
Building package mpir[core]:x64-linux...
Could not locate cached archive: /home/mvaidya/.cache/vcpkg/archives/f5/f5e513c863ca7c01996146192d588a5ce5dbb361.zip
-- Using cached /home/mvaidya/setup/vcpkg/downloads/mpir-3.0.0.tar.bz2
-- Cleaning sources at /home/mvaidya/setup/vcpkg/buildtrees/mpir/src/3.0.0-a3f571144a.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/mvaidya/setup/vcpkg/downloads/mpir-3.0.0.tar.bz2
-- Using source at /home/mvaidya/setup/vcpkg/buildtrees/mpir/src/3.0.0-a3f571144a.clean
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Generating configure for x64-linux
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:106 (message):
    Command failed: /usr/bin/autoreconf -vfi
    Working Directory: /home/mvaidya/setup/vcpkg/buildtrees/mpir/src/3.0.0-a3f571144a.clean/
    Error code: 1
    See logs for more information:
      /home/mvaidya/setup/vcpkg/buildtrees/mpir/autoconf-x64-linux-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:533 (vcpkg_execute_required_process)
  ports/mpir/portfile.cmake:45 (vcpkg_configure_make)
  scripts/ports.cmake:136 (include)

Error: Building package mpir:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `./vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: mpir:x64-linux
  Vcpkg version: 2020.11.12-unknownhash

Additionally, attach any relevant sections from the log files above.

$ autoconf -V                                                                                                                                                                                                                                                                                                                                                    :( 1 20-12-02 - 10:29:33
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
JackBoosY commented 3 years ago
configure:11008: error: possibly undefined macro: AC_PROG_NM
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:14506: error: possibly undefined macro: AC_LIBTOOL_PROG_COMPILER_PIC
configure:14601: error: possibly undefined macro: AC_ENABLE_SHARED
configure:14602: error: possibly undefined macro: AC_PROG_LIBTOOL

Please use command sudo apt-get install libtool first.

vmiheer commented 3 years ago

That worked! Thank you. Maybe libtool needs to be added here?

vmiheer commented 3 years ago

I'll create PR according to the comment: https://github.com/microsoft/vcpkg/pull/14929#issuecomment-738325979

JackBoosY commented 3 years ago

The message should report by vcpkg_configure_make instead of add it to the readme. I think.