Skip to content

[libmagic] Clean build failure on Windows #11832

@emptyVoid

Description

@emptyVoid

Host Environment

  • OS: Windows 10 64-bit
  • Compiler: not applicable

To Reproduce
Steps to reproduce the behavior:

git clean -fXd
.\bootstrap-vcpkg.bat
.\vcpkg.exe install libmagic

Failure logs

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message):
    Command failed: D:/Projects/GitHub/vcpkg/downloads/tools/msys2/msys64/usr/bin/bash.exe --noprofile --norc --debug -c "autoreconf -vfi"
    Working Directory: D:/Projects/GitHub/vcpkg/buildtrees/libmagic/src/9852e25398-4363addce8/
    Error code: 127
    See logs for more information:
      D:\Projects\GitHub\vcpkg\buildtrees\libmagic\autoconf-x64-windows-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:349 (vcpkg_execute_required_process)
  ports/libmagic/portfile.cmake:9 (vcpkg_configure_make)
  scripts/ports.cmake:76 (include)

autoconf-x64-windows-err.log

Additional context
I believe it's a defect in vcpkg_configure_make, since the necessity of autoconf gets decided too late for it to be acquired.

Here's where decision to use autoconf is made:

# Run autoconf if necessary
if(EXISTS "${SRC_DIR}/configure" AND NOT _csc_SKIP_CONFIGURE)
set(REQUIRES_AUTOCONFIG FALSE) # use autotools and configure.ac
set(REQUIRES_AUTOGEN FALSE) # use autogen.sh
elseif(EXISTS "${SRC_DIR}/configure.ac")
set(REQUIRES_AUTOCONFIG TRUE)
set(REQUIRES_AUTOGEN FALSE)
elseif(EXISTS "${SRC_DIR}/autogen.sh")
set(REQUIRES_AUTOGEN TRUE)
set(REQUIRES_AUTOCONFIG FALSE)
endif()

And here's where it gets acquired:
if (_csc_AUTOCONFIG)
list(APPEND MSYS_REQUIRE_PACKAGES autoconf
autoconf-archive
automake
m4
)
endif()
vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${MSYS_REQUIRE_PACKAGES})

@Neumann-A, could you, please, take a look?

Metadata

Metadata

Assignees

Labels

category:tool-updateThe issue is with build tool or build script, which requires update or should be executed correctly

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions