xmake icon indicating copy to clipboard operation
xmake copied to clipboard

本地编译成功,但 GitHub action 失败

Open fasiondog opened this issue 1 year ago • 11 comments

Xmake 版本

2.8.9+master.22889863c

操作系统版本和架构

windows-2019, windows-2022

描述问题

原项目近期在未修改代码和编译配置的情况下,github action 中 windows 平台突然编译失败。但本地 windows 编译正常,请差两者的build版本不一样 github action 版本及报错: 8DBA3E8FBA33D4734D8E7186F17EA1FC B7FDD2A9288802C41224447A638F47C2

本地 xmake 版本: F09824ADC76DBC2F80D313190C1AFE57

期待的结果

github action 上编译恢复正常

工程配置

项目地址:https://github.com/fasiondog/hikyuu

附加信息和错误日志

B7FDD2A9288802C41224447A638F47C2

fasiondog avatar Apr 11 '24 05:04 fasiondog

https://github.com/fasiondog/hikyuu/actions/runs/8641770356

fasiondog avatar Apr 11 '24 06:04 fasiondog

windows-2019 失败,windows-2022 直接在 config 阶段就被自行终止了

fasiondog avatar Apr 11 '24 06:04 fasiondog

Bot detected the issue body's language is not English, translate it automatically.


windows-2019 failed, windows-2022 was terminated directly in the config stage.

Issues-translate-bot avatar Apr 11 '24 06:04 Issues-translate-bot

是 ci 上 openssl3 fetch到了 ci 环境的 openssl 库,获取到了 version,但是返回了 table 而不是 string 导致。。https://github.com/xmake-io/xmake-repo/pull/3762

waruqi avatar Apr 11 '24 15:04 waruqi

Bot detected the issue body's language is not English, translate it automatically.


It is caused by openssl3 fetch on ci to the openssl library of ci environment, and the version is obtained, but the table is returned instead of string. . https://github.com/xmake-io/xmake-repo/pull/3762

Issues-translate-bot avatar Apr 11 '24 15:04 Issues-translate-bot

更新下 repo 再试下

xrepo update-repo

waruqi avatar Apr 12 '24 02:04 waruqi

Bot detected the issue body's language is not English, translate it automatically.


Update the repo and try again

xrepo update-repo

Issues-translate-bot avatar Apr 12 '24 02:04 Issues-translate-bot

目前会卡在一些依赖于 openssl 的包上,cmake 找不到 openssl https://github.com/fasiondog/hikyuu/actions/runs/8651839923/job/23741336295#step:4:3904

CMake Error at C:/Program Files/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR: Found unsuitable version "1.1.1w", but required is at least "3.0.0" (found optimized;C:/Program Files/OpenSSL/lib/VC/libcrypto64MD.lib;debug;C:/Program Files/OpenSSL/lib/VC/libcrypto64MDd.lib, found components: Crypto SSL) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.29/Modules/FindOpenSSL.cmake:682 (find_package_handle_standard_args) CMakeLists.txt:116 (find_package)

fasiondog avatar Apr 12 '24 07:04 fasiondog

这个问题根本原因是,上游更新了 cpp-httplib 版本:https://github.com/xmake-io/xmake-repo/pull/3739

openssl3 是 cpp-httplib 的依赖,但 Windows ci 预装了 openssl 1.1.1w

两个解决方案:

  1. 让 cmake 找到 xrepo openssl3
  2. cpp-httplib 回退到 0.15 之前的版本

star-hengxing avatar Apr 12 '24 09:04 star-hengxing

OK,多谢

fasiondog avatar Apr 12 '24 09:04 fasiondog

Bot detected the issue body's language is not English, translate it automatically.


OK, thank you

Issues-translate-bot avatar Apr 12 '24 09:04 Issues-translate-bot