-
-
Notifications
You must be signed in to change notification settings - Fork 773
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
Linux系统编译多出-framework选项 #5358
Comments
Title: Linux system compiles with extra -framework option |
|
|
用 |
Use |
|
自己找下 哪里引入的 |
Find out where you got it |
应该是etcd这个包 @waruqi |
那这也应该是 conan 的问题,xmake 是通过 conan 的输出,从里面取的所有 flags ,如果它给了 你可以检查下 conan 那边的包配置。 |
Then this should also be a problem with conan. xmake takes all the flags from the output of conan. If it is given to You can check the package configuration on conan. |
下班了, 我下周一检查一下 |
I'm off work, I'll check next Monday |
我去找了 https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3 源代码里面没有这个framework, 也在conan的看了 https://conan.io/center/recipes/etcd-cpp-apiv3?version=0.15.4 也在 https://github.com/conan-io/conan-center-index/tree/master/recipes/etcd-cpp-apiv3 找了都没有 -framework 这个选项 |
你调下这里
xmake 会调用 conan generators 去 dump 所有 flags 取信息,也会取 frameworks ,如果 conan 返回了。 如果是 linux ,就要看下为啥 conan 会返回 frameworks 值了 |
You can adjust it here
xmake will call conan generators to dump all flags to get information, and also get frameworks if conan returns. |
可以到 build 目录下找下 |
You can go to the build directory to find the |
在grpc的构建里面找到这个framework
|
那说明还是 conan 的包有问题,不应该提供这个 frameworks |
That means there is still a problem with the conan package, and this frameworks should not be provided. |
这个framework是在这里出现的 |
This framework appears here |
这边只能做个过滤去 workaround, |
You can only do a filter here to workaround, |
是现在这个版本吗
|
不要看版本,直接试下不就行了么 |
我吧.xmake和build都删掉了
|
Don't look at the version, just try it, right? |
刚改了下 再试试 |
fix
|
Just changed it, try again |
Xmake 版本
xmake v2.9.3+20240718
操作系统版本和架构
Linux accf9ce6fb9b 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 GNU/Linux
描述问题
在linux执行
xmake f -p linux
成功安装包但是xmake构建项目报错
error: gcc: error: unrecognized command-line option '-framework'
上网查了这个framework是苹果系统的option, 不应该出现在linux系统中
期待的结果
不应该有-framework
工程配置
add_rules("mode.debug", "mode.release")
set_languages("c++2a")
-- Debug Flag
add_defines("DEBUG")
add_defines("NOEXIT")
-- add_defines("NOTOKEN")
add_requires("conan::yaml-cpp/0.8.0",{alias = "yaml-cpp", configs = {settings = {"compiler.cppstd=20"}}})
add_requires("conan::cxxopts/3.2.0",{alias = "cxxopts", configs = {settings = {"compiler.cppstd=20"}}})
add_requires("conan::nlohmann_json/3.11.3",{alias = "json", configs = {settings = {"compiler.cppstd=20"}}})
add_requires("conan::uwebsockets/20.60.0",{alias = "uwebsockets", configs = {settings = {"compiler.cppstd=20"}}})
add_requires("conan::rocksdb/8.8.1",{alias = "rocksdb", configs = {settings = {"compiler.cppstd=20"}}})
add_requires("conan::yaml-cpp/0.8.0",{alias = "yaml-cpp", configs = {settings = {"compiler.cppstd=20"}}})
add_requires("conan::librdkafka/2.3.0",{alias = "librdkafka", configs = {settings = {"compiler.cppstd=20"}}})
add_requires("conan::cpp-httplib/0.15.3",{alias = "cpp-httplib", configs = {settings = {"compiler.cppstd=20"}}})
add_requires("conan::etcd-cpp-apiv3/0.15.4",{alias = "etcd", configs = {settings = {"compiler.cppstd=20"}}})
target("message_broker")
set_kind("binary")
add_includedirs("src/include")
add_files("src/.cpp")
add_files("src/WebSocketHandler/.cpp")
add_files("src/MessageHandler/.cpp")
add_files("src/InitWorker/Sync/.cpp")
add_files("src/InitWorker/Threading/*.cpp")
附加信息和错误日志
The text was updated successfully, but these errors were encountered: