-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
--plat=linux need support more archs such as armv8, mips64 with conan package manager #615
Comments
If you pass xmake/xmake/platforms/linux/load.lua Lines 28 to 45 in e51e92e
if config.get("cross") or config.get("bin") or config.get("sdk") then
-- will return ..
return
end
-- not reached
local archflags = nil
local arch = config.get("arch")
if arch then
if arch == "x86_64" then archflags = "-m64"
elseif arch == "i386" then archflags = "-m32"
end
end About the conan package, I only tested the pc host architecture and I have not supported other archs. I'm not sure if conan supports pulling armv8 and mips64 packages. If conan supports them, I can improve the xmake generator to support it. |
I'm sure that conan supports pulling armv8 and mips64 packages. It's very useful for cross compile c++ projects to support multiple architectures. |
Here are my conan package info on my conan-local repo by Jfrog Artifactory CE for c/c++.
|
I don't have an environment for now, you can try to modify the code below to support it, or help me to submit a pr to support it. xmake/xmake/modules/package/manager/conan/install_package.lua Lines 156 to 163 in e51e92e
xmake/xmake/modules/package/manager/conan/find_package.lua Lines 37 to 43 in e51e92e
|
I tried to modify code in install_package.lua and find_package.lua to no effect.
And I modify conan's default profile and set arch_build=armv8, but it doesn't work. 'arch' is still x86_64. |
I have supported it. You can run Please remove the previous conan package and conan remove xxx
rm -rf .xmake
xmake f -c -p linux -a arm64-v8a
xmake f -c -p linux -a mips xmake/xmake/modules/package/manager/conan/install_package.lua Lines 154 to 163 in 22d8164
In addition, I do not fully support for ios and android package, I will improve it in future, if you are interested, you can also help improve it. |
I have tested it, it (dev version) supports for conan/ios package. (conan >= 1.20) ref: https://docs.conan.io/en/latest/systems_cross_building/cross_building.html |
It works. |
I am using xmake v2.2.8 to cross compile(x86_64, armv8 and mips64) for several Embedded Linux OS. My build OS is Ubuntu/x86_64, and use CONAN as package manager.
First I got an error "plat is 'nil' value" when I execute command "xmake f -p linux -a armv8 --sdk=... --cross=...". I looked source code and found in modules/pakcage/manager/conan/install_package.lua
Xmake only support x64 and x86 now. Then I add code to support armv8 and mips64, but I got another error.
I debug xmake and found the issue at /data/scp-rpc-trunk/pack-cpp/build/.conan/thrift/0.13.0@lanxum/testing/conanbuildinfo.xmake.lua
The xmake-generator for conan generates this file and seems wrong, 'Linux_x86_64_Release' should be 'Linux_mips64_Release'. I fix it in this file, and all went right.
Is this an issue or what I missed?
The text was updated successfully, but these errors were encountered: