microsoft / vcpkg

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

[chromium-base] Build error on x64-windows #39337

Open 860git opened 2 months ago

860git commented 2 months ago

Package: chromium-base:x64-windows@86.0.4199.1#5

Host Environment

To Reproduce

vcpkg install chromium-base Failure logs

CMake Warning at scripts/ports.cmake:167 (message):
  Unexpected READ_ACCESS on variable WIN32 in script mode.

  This variable name insufficiently expresses whether it refers to the target
  system or to the host system.  Use a prefixed variable instead.

  - Variables providing information about the host:

    CMAKE_HOST_<SYSTEM>
    VCPKG_HOST_IS_<SYSTEM>

  - Variables providing information about the target:

    VCPKG_TARGET_IS_<SYSTEM>
    VCPKG_DETECTED_<VARIABLE> (using vcpkg_cmake_get_vars)

Call Stack (most recent call first):
  ports/chromium-base/portfile.cmake:2147483647 (z_vcpkg_warn_ambiguous_system_variables)
  ports/chromium-base/portfile.cmake:71 (if)
  scripts/ports.cmake:191 (include)

CMake Warning at scripts/ports.cmake:167 (message):
  Unexpected READ_ACCESS on variable WIN32 in script mode.

  This variable name insufficiently expresses whether it refers to the target
  system or to the host system.  Use a prefixed variable instead.

  - Variables providing information about the host:

    CMAKE_HOST_<SYSTEM>
    VCPKG_HOST_IS_<SYSTEM>

  - Variables providing information about the target:

    VCPKG_TARGET_IS_<SYSTEM>
    VCPKG_DETECTED_<VARIABLE> (using vcpkg_cmake_get_vars)

Call Stack (most recent call first):
  ports/chromium-base/portfile.cmake:2147483647 (z_vcpkg_warn_ambiguous_system_variables)
  ports/chromium-base/portfile.cmake:91 (if)
  scripts/ports.cmake:191 (include)

CMake Warning at scripts/ports.cmake:167 (message):
  Unexpected UNKNOWN_READ_ACCESS on variable APPLE in script mode.

  This variable name insufficiently expresses whether it refers to the target
  system or to the host system.  Use a prefixed variable instead.

  - Variables providing information about the host:

    CMAKE_HOST_<SYSTEM>
    VCPKG_HOST_IS_<SYSTEM>

  - Variables providing information about the target:

    VCPKG_TARGET_IS_<SYSTEM>
    VCPKG_DETECTED_<VARIABLE> (using vcpkg_cmake_get_vars)

Call Stack (most recent call first):
  ports/chromium-base/portfile.cmake:2147483647 (z_vcpkg_warn_ambiguous_system_variables)
  ports/chromium-base/portfile.cmake:91 (if)
  scripts/ports.cmake:191 (include)

CMake Warning at scripts/ports.cmake:167 (message):
  Unexpected UNKNOWN_READ_ACCESS on variable APPLE in script mode.

  This variable name insufficiently expresses whether it refers to the target
  system or to the host system.  Use a prefixed variable instead.

  - Variables providing information about the host:

    CMAKE_HOST_<SYSTEM>
    VCPKG_HOST_IS_<SYSTEM>

  - Variables providing information about the target:

    VCPKG_TARGET_IS_<SYSTEM>
    VCPKG_DETECTED_<VARIABLE> (using vcpkg_cmake_get_vars)

Call Stack (most recent call first):
  ports/chromium-base/portfile.cmake:2147483647 (z_vcpkg_warn_ambiguous_system_variables)
  ports/chromium-base/portfile.cmake:104 (if)
  scripts/ports.cmake:191 (include)

-- Generating build (x64-windows-dbg)...
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: F:/Downloads/curlvcpkg/vcpkg/installed/x64-windows/tools/gn/gn.exe gen F:/Downloads/curlvcpkg/vcpkg/buildtrees/chromium-base/x64-windows-dbg "--args=     use_custom_libcxx=false     clang_use_chrome_plugins=false     forbid_non_component_debug_builds=false     treat_warnings_as_errors=false use_lld=false clang_base_path=\"F:/Downloads/curlvcpkg/vcpkg/downloads/tools/clang/clang-15.0.6\" is_component_build=true is_debug=true symbol_level=2"
    Working Directory: F:/Downloads/curlvcpkg/vcpkg/buildtrees/chromium-base/src/25ce732
    Error code: 1
    See logs for more information:
      F:\Downloads\curlvcpkg\vcpkg\buildtrees\chromium-base\generate-x64-windows-dbg-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-gn/vcpkg_gn_configure.cmake:10 (vcpkg_execute_required_process)
  installed/x64-windows/share/vcpkg-gn/vcpkg_gn_configure.cmake:34 (z_vcpkg_gn_configure_generate)
  ports/chromium-base/portfile.cmake:113 (vcpkg_gn_configure)
  scripts/ports.cmake:191 (include)
F:\Downloads\curlvcpkg\vcpkg\buildtrees\chromium-base\generate-x64-windows-dbg-out.log ``` ERROR at //build/config/BUILDCONFIG.gn:401:1: Unknown function. set_sources_assignment_filter(sources_assignment_filter) ^---------------------------- ```
dg0yt commented 2 months ago

Does this really occur for vcpkg install chromium-base? The new diagnostic message should raise errors for CI but not for users.
But chromium-base doesn't take part in CI...

dg0yt commented 2 months ago

Please try #39343.

dg0yt commented 2 months ago

Not yet...

BillyONeal commented 2 months ago

It looks like gn failed is the actual failure and the spew of warnings above it are unrelated:

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: F:/Downloads/curlvcpkg/vcpkg/installed/x64-windows/tools/gn/gn.exe gen F:/Downloads/curlvcpkg/vcpkg/buildtrees/chromium-base/x64-windows-dbg "--args=     use_custom_libcxx=false     clang_use_chrome_plugins=false     forbid_non_component_debug_builds=false     treat_warnings_as_errors=false use_lld=false clang_base_path=\"F:/Downloads/curlvcpkg/vcpkg/downloads/tools/clang/clang-15.0.6\" is_component_build=true is_debug=true symbol_level=2"
    Working Directory: F:/Downloads/curlvcpkg/vcpkg/buildtrees/chromium-base/src/25ce732
    Error code: 1
    See logs for more information:
      F:\Downloads\curlvcpkg\vcpkg\buildtrees\chromium-base\generate-x64-windows-dbg-out.log

gn.exe does not care about this new warning from dg0yt

dg0yt commented 2 months ago

Yeah, gn also fails on linux for this port. Most gn stuff in vpckg is fragile (if not broken) and mostly excluded from CI. Tensorflow is another example. skia is fairly okay and has a a test port, but there is still trouble with icu, vcpkg vs. Windows SDK.

dg0yt commented 2 months ago

https://stackoverflow.com/questions/73533906/unknown-function-set-sources-assignment-filter

860git commented 2 months ago

Not yet...

Thanks for your reply, I will try other methods

jimwang118 commented 2 months ago

You can refer to this document. Google has deleted this function in gn since October 2020. The gn used by vcpkg is from February 2024, which makes this function not found. To solve this issue , you can download a gn before 2020 locally, or wait until we upgrade chromium-base. https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/no_sources_assignment_filter.md

860git commented 2 months ago

Yes, I see the info on the Internet that a version of gn before 2020 is needed. hope vcpkg can be used in the future.

dg0yt commented 2 months ago

It is probably better to not use the outdated and unmaintained vcpkg port of chromium base.