Skip to content
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

remote compilation error(windows -> linux) #2488

Closed
OuYangPaste opened this issue Jun 24, 2022 · 6 comments
Closed

remote compilation error(windows -> linux) #2488

OuYangPaste opened this issue Jun 24, 2022 · 6 comments
Labels
Milestone

Comments

@OuYangPaste
Copy link

OuYangPaste commented Jun 24, 2022

Xmake 版本

xmake v2.6.8+HEAD.e184712

操作系统版本和架构

Linux: 5.15.24-amd64-desktop
windows: windows 10 专业版 19044.1706

描述问题

我尝试在 windows 中远程编译 linux 的项目,报错如下

windows 错误:

 C:\Users\paste\Desktop\gv_core> xmake service --connect -vD
<remote_build_client>: connect 192.168.2.167:9691 ..
{
  xmakever = "2.6.8",
  token = "e90ea393a5df026363aa92ae8df783ec",
  status = true,
  code = 1,
  session_id = "79234280"
}

<remote_build_client>: connected!
<remote_build_client>: sync files in 192.168.2.167:9691 ..
Scanning files ..
Comparing 38 files ..
0 files has been changed!
<remote_build_client>: sync files failed in 192.168.2.167:9691, cannot make sha256 for /home/paste/.config/.xmake/service/server/remote_build/sessons/79234280/source/gv_tool\src\gv_resample.c, unknown errors

linux 下我对 log 中指向的路径进行查看
image

应该是路径转换的问题?

期待的结果

能正常跨 windows linux 远程编译

工程配置

No response

附加信息和错误日志

No response

@waruqi
Copy link
Member

waruqi commented Jun 24, 2022

更新下 dev 试试。 因为 '\' 在 linux 是有效路径字符,所以没对它做路径 normalize,从 win 发过来就有问题了。

两端都更新下

@waruqi waruqi added this to the v2.6.9 milestone Jun 24, 2022
@OuYangPaste
Copy link
Author

OuYangPaste commented Jun 24, 2022

嗯,可以了👌 编译完之后目标文件如果我想传回来本机,只能自己走别的传输方式么,xmake install 测试了下远程编译下是不会生效的

@waruqi
Copy link
Member

waruqi commented Jun 24, 2022

如果我想传回本机,只能自己走传输方式,xmake install 测试了么下远程编译下是不会结束的

目前还不支持 xmake install 和 回传,仅仅支持 xmake config/build/clean

@OuYangPaste
Copy link
Author

OuYangPaste commented Jun 24, 2022

👌了解,以后可能打算做 install 回传么,毕竟 config build clean install 四步曲经常敲

@waruqi
Copy link
Member

waruqi commented Jun 24, 2022

install 语义上做不了回传,远程编译,不一定编译的本机 host 程序。。回传可以,但不能 install 即使装到系统,也运行不了。。

比如 linux 上远程编译 win 程序。。xmake install 到 /usr/bin 基本没意义。。

即使要做回传。也是 xmake build 完,自动拉取对于 target file 到本地 build 目录下。。

@OuYangPaste
Copy link
Author

OuYangPaste commented Jun 24, 2022

install 语义上做不了回传,远程编译,不一定编译的本机 host 程序。。回传可以,但不能 install 即使装到系统,也运行不了。。

嗯,确实,因为我这边把 installdir 默认路径改了,更多是当做导出文件进行使用,所以没去想这一点

即使要做回传。也是 xmake build 完,自动拉取对于 target file 到本地 build 目录下。。

这个的话,既然有 service --sync,那有个反向 sync 似乎也是个可行的方式? 毕竟每次回传似乎不太必要

我这边能用到远程编译的场景,主要是一些小芯片,编译器只有 win上能跑,我们习惯了 linux,想把这部分给透明掉,和常规的 linux 嵌入式交叉编译统一起来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants