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

v does not support Chinese character path name under Windows 10 #21502

Open
kbkpbot opened this issue May 15, 2024 · 3 comments
Open

v does not support Chinese character path name under Windows 10 #21502

kbkpbot opened this issue May 15, 2024 · 3 comments
Labels
Bug This tag is applied to issues which reports bugs. OS: Windows Bugs/feature requests, that are specific to Windows OS.

Comments

@kbkpbot
Copy link
Contributor

kbkpbot commented May 15, 2024

Describe the bug

v does not support Chinese character path name under Windows 10, it will fail when compile v program.

Reproduction Steps

create any v file, such as

module main
fn main() {
    println('hello,world')
}

Place this hello.v into a directory, which contain Chinese character, such as

D:\v\测\hello.v

Then compile it,

v -o hello hello.v

It will fail to compile the hello.v

Expected Behavior

compile and run without error

Current Behavior

D:\v\测>v -o hello hello.v
==================
C:/Users/DDT/AppData/Local/Temp/v_0/hello.01HXXJ9FKJCDVCS554MPZP4VFA.tmp.c:6903: warning: implicit declaration of function 'tcc_backtrace'
tcc: error: could not create 'D:\v\测试\hello.def': No such file or directory
...
==================
(Use `v -cg` to print the entire error message)

builder error:
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .

Possible Solution

No response

Additional Information/Context

compile with msvc , will fail also.

D:\v\测>v -o hello hello.v -cc msvc
用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.39.33523 版
版权所有(C) Microsoft Corporation。保留所有权利。

cl -w /we4013 /volatile:ms /Fo"C:\Users\DDT\AppData\Local\Temp\v_0\hello.01HXXJEEA7Q46BZ5FYGC4T1HAG.tmp.c.obj" /F 16777216 /MD /DNDEBUG "C:\Users\DDT\AppData\Local\Temp\v_0\hello.01HXXJEEA7Q46BZ5FYGC4T1HAG.tmp.c" -I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt" -I "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include" -I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um" -I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared" kernel32.lib user32.lib advapi32.lib ws2_32.lib dbghelp.lib /link /NOLOGO /OUT:"D:\v\娴嬭瘯\hello.exe" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt\X64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\X64" /LIBPATH:"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\lib\X64" /DEBUG:FULL

hello.01HXXJEEA7Q46BZ5FYGC4T1HAG.tmp.c
LINK : fatal error LNK1104: 无法打开文件“D:\v\娴嬭瘯\hello.exe”

builder error: msvc error

V version

V full version: V 0.4.5 58a8fc6

Environment details (OS name and version, etc.)

D:\v\测试>v doctor
V full version: V 0.4.5 58a8fc6
OS: windows, Microsoft Windows 10 ҵ LTSC v19044 64 λ
Processor: 16 cpus, 64bit, little endian,

getwd: D:\v\测试
vexe: D:\v\v\v\v.exe
vexe mtime: 2024-05-14 02:15:32

vroot: OK, value: D:\v\v\v
VMODULES: OK, value: C:\Users\DDT.vmodules
VTMP: OK, value: C:\Users\DDT\AppData\Local\Temp\v_0

Git version: git version 2.43.0.windows.1
Git vroot status: weekly.2024.20-dirty
.git/config present: true

CC version: Error: 'cc' is not recognized as an internal or external command,
operable program or batch file.

thirdparty/tcc status: thirdparty-windows-amd64 b99a453d

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@kbkpbot kbkpbot added the Bug This tag is applied to issues which reports bugs. label May 15, 2024
@kbkpbot
Copy link
Contributor Author

kbkpbot commented May 15, 2024

Under Ubuntu, has no this bug

@spytheman
Copy link
Member

It is a known problem affecting V through tcc.

Try using gcc or clang with -cc gcc as a workaround, or move the project to a folder that has only latin letters + numbers in its path on windows.

@spytheman
Copy link
Member

hm, msvc should have worked though 🤔 ... I'll have to check again.

@felipensp felipensp added the OS: Windows Bugs/feature requests, that are specific to Windows OS. label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. OS: Windows Bugs/feature requests, that are specific to Windows OS.
Projects
None yet
Development

No branches or pull requests

3 participants