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

对于跨操作系统的分布式编译应该怎么做 #29

Open
lijiaonothing opened this issue Jan 28, 2022 · 2 comments
Open

对于跨操作系统的分布式编译应该怎么做 #29

lijiaonothing opened this issue Jan 28, 2022 · 2 comments

Comments

@lijiaonothing
Copy link

机器1:client(user,且不不接受任务):ubuntu1804,gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
机器2:servant(专用编译机):ubuntu2004,gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0。
servant上支持的gcc-7的哈希值与user需要的不一致,对于这种情况有什么建议吗?ubuntu2004能编译出来和ubuntu1804哈希值一样的gcc吗?你们对于这样的场景,你们是怎么做的?

@0x804d8000
Copy link
Collaborator

  1. 这个问题之前内部考虑过,可以这么解决:1) 客户端支持某个环境变量指定编译器特征码(目前是哈希,手动指定的时候可以用比如arch-version这种格式);2) 编译机支持从配置读取一系列特征码=路径来配合客户端;3) 客户端把特征码作为哈希传到请求的compiler_digest去。

另外一些思路:1) 通过环境变量开启某种新的配置然后客户端自动识别版本号,编译机那边也新增参数允许用版本号做区分; 2) 也可以编译机允许接受一系列哈希=路径手动override;3) 在调度器和编译机两方完全忽略哈希匹配。

但是这些方案都不是特别令人满意(相对来说自动识别版本号+支持从~/.yadcc.conf读配置可能最合适),而且内部也没这个需求(见下),所以就没做这个事了。

  1. 不能,可以考虑使用docker之类的方式来统一环境。

  2. 内部来说我们用的工具链是额外统一提供的,没有使用系统的版本,所以编译器的bin是一致的。另外我们的系统自带的是gcc 4,也有点老了。

@Tencent Tencent deleted a comment from CrazyWood2020 Feb 14, 2022
@Tencent Tencent deleted a comment from CrazyWood2020 Feb 14, 2022
@lijiaonothing
Copy link
Author

十分感谢您的回复。对于这种跨操作系统的场景,可以把ubuntu1804的gcc打包到ubuntu2004的servant上,在servant上通过bwrap的方式去执行gcc命令。

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

No branches or pull requests

2 participants