xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
10.11k stars 784 forks source link

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

Closed fasiondog closed 1 month ago

fasiondog commented 7 months ago

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 commented 7 months ago

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

fasiondog commented 7 months ago

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

Issues-translate-bot commented 7 months ago

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.

waruqi commented 7 months ago

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

Issues-translate-bot commented 7 months ago

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

waruqi commented 7 months ago

更新下 repo 再试下

xrepo update-repo

Issues-translate-bot commented 7 months ago

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


Update the repo and try again

xrepo update-repo

fasiondog commented 7 months ago

目前会卡在一些依赖于 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)

star-hengxing commented 7 months ago

这个问题根本原因是,上游更新了 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 之前的版本
fasiondog commented 7 months ago

OK,多谢

Issues-translate-bot commented 7 months ago

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


OK, thank you

star-hengxing commented 1 month ago

这个问题应该已经解决了,依赖 openssl 的库指定 OPENSSL_ROOT_DIR 就行

Issues-translate-bot commented 1 month ago

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


This problem should have been solved. Just specify OPENSSL_ROOT_DIR for the library that relies on openssl.