-
-
Notifications
You must be signed in to change notification settings - Fork 808
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
xmake l find_packages failed after conan install packages #1489
Comments
都安装失败了,去 find_packages 当然找不到了,失败了就 $ xmake f -c -vD
Downloading conan_export.tgz completed [0.25k]
Decompressing conan_export.tgz completed [0.00k]
openssl/1.1.1k: Downloaded recipe revision 0
ERROR: Conflict in cmake/3.16.2:
'cmake/3.16.2' requires 'openssl/1.1.1k' while 'libevent/2.1.12' requires 'openssl/1.1.1i'.
To fix this conflict you need to override the package 'openssl' in your root package.
error: @programdir/core/sandbox/modules/os.lua:392: execv(/usr/local/bin/conan install . --build=m
issing -s os=Macos -s arch=x86_64 -s build_type=Release) failed(1)
stack traceback: 我这里 mac 上测试,是它内部安装出错了,你这的情况,自己看下错误详情,自己调整下环境,xmake 也仅仅只是调用 conan install ,错误也都是 conan 自身出错。如果解不了,你也应给 conan 那边提 issues
conan 装的包,都是根据 sha256 分的目录,你直接是找不到具体哪个的,必须走它的脚本导出一个适配层,获取内部的 linkdirs/includedirs 等信息,都在 conanbuildinfo.xmake.lua 里面,这也是 conan 官方推荐的做法。。build 下并没有 conan 的包,仅仅只是为了接入获取安装后包的详情。。 |
感谢 @waruqi
https://xmake.io/#/zh-cn/package/system_package
|
尽量走 add_requires/add_packages,如果你自己已经安装了 conan 包,add_requires 并不会重复安装,也是优先使用 你装的包 或者系统库。。你也可以禁用安装,强制只走系统库, 走原始 find_packages 仅对 brew /vcpkg 的包有效,但是对于 conan 包比较特殊,直接找是找不到的,只能走 add_requires 来集成,内部也会自动先调用 find_packages 来找。。 |
今天刚尝鲜就卡住了,我的配置是下面这样的,系统环境是 windows 11 add_rules("mode.debug","mode.release")
set_languages("c++17")
-- { debug=true }
add_requires("vcpkg::gtest")
add_requires("vcpkg::libhv[ssl]")
target("ctime")
set_kind("binary")
add_files("src/*.cpp")
add_includedirs("include")
add_packages("vcpkg::gtest","vcpkg::libhv[ssl]") 不知道为什么按照上面这个配置,xmake跑完之后,工程文件中没有办法 |
xmake-repo 仓库有 gtest 和 libhv 干嘛不用,非得用 vcpkg 的 |
@waruqi 用了xmake-repo 的 gtest 也还是这样,在 vscode 当中仍然是红色波浪线,重启软件和计算机完全不起作用 |
那是 intellegense 的问题,自己配置 vscode ,跟 xmake 没啥关系,编译能过,就是正常 |
跟 这个 issues 无关的问题,单独开 issues |
Describe the bug
xmake l find_packages after conan install failed
root@docker-desktop:/folly# conan search folly
Existing package recipes:
folly/2020.08.10.00
xmake l find_packages conan::folly/2020.08.10.00
{}
Expected behavior
found one.
Error output
root@docker-desktop:/folly# xmake l -v find_packages conan::folly/2020.08.10.00
running builtin module find_packages with args:
find package conan folly/2020.08.10.00
conan get buildinfo /folly/build/.conan/folly/2020.08.10.00/conanbuildinfo.xmake.lua
checking for conan::folly/2020.08.10.00 ... no
{ }
Related Environment
Please provide compiling and running environment information:
xmake version: xmake v2.5.5+202107021419, A cross-platform build utility based on Lua
os: root@docker-desktop:/folly# uname -a
Linux docker-desktop 5.10.25-linuxkit win7 64位下 install.bat 执行到某一步后不再进行..安装不成功 #1 SMP PREEMPT Tue Mar 23 09:24:45 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
Ubuntu 18.04.5 LTS \n \l
target platform:
Additional context
Add any other context about the problem here.
1 为什么会查找项目下面的 build 路径里面找 conan 的 包
2 conan 安装的包, 应该跟 xmake 无交集, 为何查找 conanbuildinfo.xmake.lua , 这个文件应该不会生成吧.
The text was updated successfully, but these errors were encountered: