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

win7下xmake编译cuda出错 #1972

Open
zt449569708 opened this issue Jan 12, 2022 · 3 comments
Open

win7下xmake编译cuda出错 #1972

zt449569708 opened this issue Jan 12, 2022 · 3 comments
Labels

Comments

@zt449569708
Copy link

现象:在cmd下,通过xmake编译xmake通过的CUDA测试代码console,出现问题如下:
图片

从图中可以看出,编译到25%就退出来,也没提示任何的错误信息。

版本:
xmake:v2.6.2 HEAD.90e499cb2
操作系统:win7
vs : vs2019

@waruqi
Copy link
Member

waruqi commented Jan 12, 2022

应该是吧 xmake 搞跪了,这种情况很少,之前只有一次低版本 vs 编译器的bug 吧 xmake 搞跪的情况出现。。

你可以先自己调下

os.runv(program, argv, {envs = self:runenvs()})
这块,我暂时没环境复现。。回头有环境了,我再看看

@soloist-v
Copy link

系统的用户名绝对不能有中文,有中文的话如果系统某些语言选项设置不正确是无法编译成功cuda程序的

@waruqi
Copy link
Member

waruqi commented Feb 21, 2022

如果中文编码问题,那可能跟 vs 有关,因为 nvcc 会内部调用 cl.exe ,但是 cl.exe 对 unicode 的处理支持,需要一些特殊处理。。

可以在

local outdata, errdata = os.iorunv(program, argv, {envs = self:runenvs()})

这行,替换成 vstool.iorunv 调用,来尝试解决验证这个问题。

参考

return vstool.iorunv(program, argv, {envs = self:runenvs()})

并导入相关模块:

import("private.tools.vstool")

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

3 participants