-
-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minio-cpp: add package #5019
minio-cpp: add package #5019
Conversation
cmake pass different openssl version includedirs on build, interesting. /usr/bin/c++ -DCURL_STATICLIB -I/github/home/.xmake/cache/packages/2408/m/minio-cpp/v0.3.0/source/include -isystem /github/home/.xmake/packages/l/libcurl/8.7.1/eb037cbc8bf3460aa31aea7c571a7311/include -isystem /github/home/.xmake/packages/o/openssl/1.1.1-w/6c51ab6278e2479b883dffafac69fdaf/include -isystem /github/home/.xmake/packages/c/curlpp/2023.07.27/0236f032d75b443d9c994fccf9b48ce4/include -isystem /github/home/.xmake/packages/i/inih/58/37a53745417c4966bdcabd3accb72565/include -isystem /github/home/.xmake/packages/n/nlohmann_json/v3.11.3/698e03555f7c4696bc4f9415a3132df3/include -isystem /github/home/.xmake/packages/p/pugixml/v1.14/26f29edcc686486ca09fb7ef20cbf2b8/include -isystem /github/home/.xmake/packages/o/openssl3/3.3.1/0ffd646775cf4e388dcea04a53a03673/include -isystem /github/home/.xmake/packages/z/zlib/v1.3.1/994fafa590ed48ac9f71516cc846d155/include -O3 -DNDEBUG -fPIC -Wall -Wextra -Wconversion -MD -MT CMakeFiles/miniocpp.dir/src/utils.cc.o -MF CMakeFiles/miniocpp.dir/src/utils.cc.o.d -o CMakeFiles/miniocpp.dir/src/utils.cc.o -c /github/home/.xmake/cache/packages/2408/m/minio-cpp/v0.3.0/source/src/utils.cc
In file included from /github/home/.xmake/packages/o/openssl3/3.3.1/0ffd646775cf4e388dcea04a53a03673/include/openssl/types.h:34,
from /github/home/.xmake/cache/packages/2408/m/minio-cpp/v0.3.0/source/src/utils.cc:35:
/github/home/.xmake/packages/o/openssl3/3.3.1/0ffd646775cf4e388dcea04a53a03673/include/openssl/macros.h:155:4: error: #error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
155 | # error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
| ^~~~~ deps chain:
|
on_load(function (package) | ||
-- xrepo package: curlpp -> libcurl -> openssl | ||
if package:is_plat("linux") then | ||
package:add("deps", "openssl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥其他平台用 openssl3 就不会冲突?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libcurl 在 linux 默认启用 openssl
xmake-repo/packages/l/libcurl/xmake.lua
Lines 33 to 37 in 02309f9
-- we init all configurations in on_load, because package("curl") need it. | |
on_load(function (package) | |
if package:is_plat("linux", "android", "cross") then | |
package:config_set("openssl", true) | |
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那可以用 if package:dep("libcurl"):config("openssl") then
是不是更准点?
另外,既然这个包 openssl 也可以,直接全用 openssl dep 呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那可以用
if package:dep("libcurl"):config("openssl") then
是不是更准点?
哦哦,这个可以。
另外,既然这个包 openssl 也可以,直接全用 openssl dep 呢
一个大问题是不稳定。
库代码用到 #include <openssl/types.h>
这个是 openssl3 才有。但即使 patch 了这个头文件,ci 在某些平台会因为没找到符号报错。
add_deps("pkgconf") | ||
else | ||
add_deps("pkg-config") | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这块感觉可以塞进 cmake 里面去。。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前是因为 patch 了 cmake,走 pkgconfig 找 xrepo 包才加,不知道有没有必要也加在 cmake。
另外我发现 cmake + pkgconfig + import target 这套好像挺稳定,或许可以用来改进 xrepo_cmake 和生成 cmakelists。
No description provided.