cefsharp / cef-binary

NuGet repackaging of the CEF binaries provided by Chromium Embedded Framework
https://cef-builds.spotifycdn.com/index.html
Other
110 stars 87 forks source link

AppVeyor Build Failure with CMake >=3.12 #70

Closed amaitland closed 3 years ago

amaitland commented 6 years ago

Builds started failing example is https://ci.appveyor.com/project/cefsharp/cef-binary/build/64.0.0-CI66 The error is generated by cmake

Reverted to using the previous build worker image in commit https://github.com/cefsharp/cef-binary/commit/c510ba27ee33a962c120f528cb9d9935de9dac36

Looking at https://www.appveyor.com/updates/2018/08/29/ it appears that cmake was upgraded to 3.12.1 which I suspect as the root cause.

Building locally with 3.12.2 and the build succeeds.

Likely when appveyor upgrades to a new cmake version this will be resolved, so waiting appears to be the easier path forward. Will need to revert https://github.com/cefsharp/cef-binary/commit/c510ba27ee33a962c120f528cb9d9935de9dac36 when the next build image is updated.

amaitland commented 6 years ago

Reverted to using the previous build worker image in commit c510ba2

Build succeeded https://ci.appveyor.com/project/cefsharp/cef-binary/build/64.0.0-CI67

amaitland commented 5 years ago

Builds are failing again.

amaitland commented 5 years ago

According to https://www.appveyor.com/docs/windows-images-software/ the version of cmake has been upgraded to 3.12.2 so appears the problem is something different than initially though.

Will test with Visual Studio 2017 Preview and see if there's any change.

perlun commented 5 years ago

FWIW (and I'm sure you already saw this), here is the failure. VS2017 Preview doesn't seem to help, unfortunately:

Caught an exception: Cannot bind argument to parameter 'Path' because it is null.
    Exception Type: System.Management.Automation.ParameterBindingValidationException
    Stack Trace: at Msvs, C:\projects\cef-binary\build.ps1: line 270
    at VSX, C:\projects\cef-binary\build.ps1: line 376
    at <ScriptBlock>, C:\projects\cef-binary\build.ps1: line 714
    at <ScriptBlock>, <No file>: line 1
Cannot bind argument to parameter 'Path' because it is null.
amaitland commented 5 years ago

Building locally now fails with the same exception, just in a different place. So it appears VS2017 15.8.8 breaks something. Will likely have to deal with that at some point

amaitland commented 5 years ago

Switching to latest cmake in https://github.com/cefsharp/cef-binary/commit/bdfb0a05c10a225d992156b3a3c733e31e1c0cfb has made no effect. Local builds are working as expected. Will have to find a way to get cmake to output more detailed info (it does running locally, that info is lost when running on appveyor).

amaitland commented 5 years ago

Looking closer at the local output and I see the same warning, so It's probably not the root cause. Need to get cmake error output or be able to download it's log file.

CMake Warning (dev) at CMakeLists.txt:187 (find_package):
Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
command to set the policy and suppress this warning.

CMake variable CEF_ROOT is set to:

C:/projects/cef-binary/cef_binary_3.y.z_windows32
amaitland commented 5 years ago

Build https://ci.appveyor.com/project/cefsharp/cef-binary/builds/21030987 was successful when rolling back to cmake 3.11.4 (commit https://github.com/cefsharp/cef-binary/commit/55140b1386fdfdb895aff26598f7007b86882228)

It appears that CMake Policy CMP0074 writes a warning to stderr which Appveyor was treating as fatal and terminating the build.

For now build.ps1 is only usable if you have cmake.portable installed using chocolatey.

mitchcapper commented 5 years ago

I am not sure if we want to try and modify the cmakelist file after it's generated to add something like:

if(POLICY CMP0074)
  cmake_policy(SET CMP0074 OLD)
endif()

to disable the warning to allow it to work on Appveyor.

amaitland commented 5 years ago

I'd largely forgotten about this, builds have been working.

Long term it would be better to have CEF clearly define the expected behaviour and avoid the warning.

From my point of view this really isn't even on my TODO list, if the cmake requirements suddenly change then I'll do something about it.

If it's causing you problems then by all means submit a PR with a different workaround.

amaitland commented 5 years ago

CMake-3.14 would be required to build VS2019 with AppVeyor, if we are to look into that further then yes we'd need to implement a different workaround for this.

amaitland commented 3 years ago

Using advice from https://help.appveyor.com/discussions/problems/10014-false-build-fail-status I've changed how the build script is run from the AppVeyor.

The warning is now ignored and the first build using VS2019 as the default was successful.

https://ci.appveyor.com/project/cefsharp/cef-binary/builds/40187622