microsoft / vcpkg

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

[libxcrypt] Build error on x64-linux #39673

Closed hflemmen closed 3 months ago

hflemmen commented 3 months ago

Package: libxcrypt:x64-linux@4.4.36

I am trying to build (among other things) opencv in a docker image. I have installed libltdl-dev from apt.

Host Environment

To Reproduce

vcpkg install

Failure logs

-- Downloading https://github.com/besser82/libxcrypt/archive/v4.4.36.tar.gz -> besser82-libxcrypt-v4.4.36.tar.gz...
-- Extracting source /vcpkg/downloads/besser82-libxcrypt-v4.4.36.tar.gz
-- Using source at /vcpkg/buildtrees/libxcrypt/src/v4.4.36-645fb55159.clean
-- Found external ninja('1.11.1').
-- Getting CMake variables for x64-linux-dbg
-- Getting CMake variables for x64-linux-rel
-- Generating configure for x64-linux
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: /usr/bin/autoreconf -vfi
    Working Directory: /vcpkg/buildtrees/libxcrypt/src/v4.4.36-645fb55159.clean/
    Error code: 1
    See logs for more information:
      /vcpkg/buildtrees/libxcrypt/autoconf-x64-linux-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:731 (vcpkg_execute_required_process)
  buildtrees/versioning_/versions/libxcrypt/85a0274aca1b0c7bf756cb41f77d9dbfc2b6fb78/portfile.cmake:10 (vcpkg_configure_make)
  scripts/ports.cmake:192 (include)
/vcpkg/buildtrees/libxcrypt/autoconf-x64-linux-err.log ``` autoreconf: export WARNINGS= autoreconf: Entering directory '.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I build-aux/m4 autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: configure.ac: not using Intltool autoreconf: configure.ac: not using Gtkdoc autoreconf: running: /usr/bin/autoconf --force configure.ac:60: warning: _LT_CMD_GLOBAL_SYMBOLS is m4_require'd but not m4_defun'd aclocal.m4:779: LT_SYS_SYMBOL_USCORE is expanded from... configure.ac:60: the top level configure.ac:86: warning: LT_PATH_NM is m4_require'd but not m4_defun'd build-aux/m4/zw_detect_asan.m4:18: zw_ASAN_IFELSE 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:86: the top level autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:30: installing 'build-aux/m4-autogen/compile' configure.ac:29: installing 'build-aux/m4-autogen/config.guess' configure.ac:29: installing 'build-aux/m4-autogen/config.sub' configure.ac:16: installing 'build-aux/m4-autogen/install-sh' configure.ac:16: installing 'build-aux/m4-autogen/missing' Makefile.am: installing './INSTALL' Makefile.am:97: error: Libtool library used but 'LIBTOOL' is undefined Makefile.am:97: The usual way to define 'LIBTOOL' is to add 'LT_INIT' Makefile.am:97: to 'configure.ac' and run 'aclocal' and 'autoconf' again. Makefile.am:97: If 'LT_INIT' is in 'configure.ac', make sure Makefile.am:97: its definition is in aclocal's search path. Makefile.am: installing 'build-aux/m4-autogen/depcomp' parallel-tests: installing 'build-aux/m4-autogen/test-driver' autoreconf: error: automake failed with exit status: 1 ```

Additional context

vcpkg.json ``` { "name": "optical-flow", "version-string": "1.0.0", "builtin-baseline": "3850888eb8480abc8f73f84bf618de3b68900572", "dependencies": [ { "name": "manif", "version>=": "2023-07-17", "$comment": " # this is heuristically generated, and may not be correct\n\n find_package(manif CONFIG REQUIRED)\n\n target_link_libraries(main PRIVATE MANIF::manif)\n" }, { "name": "opencv", "version>=": "4.8.0", "$comment": " # this is heuristically generated, and may not be correct\n\n find_package(OpenCV CONFIG REQUIRED)\n\n # note: 15 additional targets are not displayed.\n\n target_link_libraries(main PRIVATE opencv_ml opencv_dnn opencv_core opencv_flann)\n", "features": [ "ffmpeg" ] }, { "name": "eigen3", "version>=": "3.4.0#2" }, { "name": "gtest", "version>=": "1.14.0" }, { "name": "geographiclib", "version>=": "2.3#1" }, { "name": "boost", "version>=": "1.84.0" }, { "name": "toml11", "version>=": "3.7.1" } ] } ```
dg0yt commented 3 months ago

I think you also need libtool from apt.

LangerDov commented 3 months ago

I think you also need libtool from apt.

this does not help on fedora 40

dg0yt commented 3 months ago

@LangerDov It doesn't need to help on Fedora 40. The original post explicitly mentioned "apt". git grep libtool ports will give more inspiration.

LangerDov commented 3 months ago

I’m not sure that this can help, but still, I’ve been racking my brains for the last week with installing SDL2 on Linux. I tried to install it on Ubuntu (wsl 22.04.4 LTS), Fedora and Arch and ran into problems every time. On Arch and Ubuntu, installing jinju2 in pip helped me, but on Fedora I still haven’t found any solution and the whole process crashes on the libxcrypt build. I looked at the error log and the Python script crashed out of the blue in the same place, as if there was an invisible broken symbol, I tried to edit that line, but did not get a positive result.

dg0yt commented 3 months ago

@LangerDov Open your own issue, with a proper report.

hflemmen commented 3 months ago

I think you also need libtool from apt.

Thanks! You are right. Now libxcrypt builds as well.

Perhaps not the place to raise this, but it would be great if each port would have a convenient way of listing all the packages we need to install from the os package manager.