shinchiro/mpv-winbuild-cmake

cmake fails on clean build

Closed this issue · 1 comments

Hello,

Since commit c40250a, cmake fails because the final name of ExternalProject.cmake is ExternalProject.cmakeinline=false, so it fails patching, etc.

COMMAND curl -sLO https://gitlab.kitware.com/cmake/cmake/-/raw/release/Modules/ExternalProject.cmake?inline=false

Removing ?inline=false make it works.

Ubuntu 22.04 LTS on wsl2
curl 7.81.0

log:

ashyni@xxxxx:~/mpv-winbuild-cmake/build64$ cmake -DTARGET_ARCH=x86_64-w64-mingw32 -DGCC_ARCH=x86-64-v3 -G Ninja ..
-- The C compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
can't find file to patch at input line 16
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 940e275f4b13d27db906126e6aadbf6c3c8a3b32 Mon Sep 17 00:00:00 2001
|From: shinchiro <shinchiro@users.noreply.github.com>
|Date: Sun, 22 Jan 2023 23:58:28 +0800
|Subject: [PATCH] ExternalProject: changes
|
|support passing other flags in git clone operation
|---
| Modules/ExternalProject.cmake             | 11 +++++++++++
| Modules/ExternalProject/gitclone.cmake.in | 13 +++++++++++++
| 2 files changed, 24 insertions(+)
|
|diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
|index 3752cebad..226f111f0 100644
|--- a/Modules/ExternalProject.cmake
|+++ b/Modules/ExternalProject.cmake
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
5 out of 5 hunks ignored
patching file Modules/ExternalProject/gitclone.cmake.in
CMake Error at cmake/download_externalproject.cmake:28 (include):
  include could not find requested file:

    /home/ashyni/mpv-winbuild-cmake/build64/cmake/Modules/ExternalProject.cmake
Call Stack (most recent call first):
  CMakeLists.txt:4 (include)


CMake Error at toolchain/binutils.cmake:1 (ExternalProject_Add):
  Unknown CMake command "ExternalProject_Add".
Call Stack (most recent call first):
  toolchain/CMakeLists.txt:16 (include)


-- Configuring incomplete, errors occurred!
See also "/home/ashyni/mpv-winbuild-cmake/build64/CMakeFiles/CMakeOutput.log".

By the way, the instructions should mention that patch is required to build now.
Otherwise CMake silently fails patching and the subsequent errors are unclear.

Just thought I'd mention it since it's related to this, since c40250a.

edit: well don't mind, I hadn't noticed I was missing base-devel.