vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.8k stars 2.16k forks source link

V compiler failing to work properly with cyrillic paths. #8683

Open KatPurpy opened 3 years ago

KatPurpy commented 3 years ago

v doctor output

OS: windows, Microsoft Windows 8.1 Pro v9600 64-ࠧ�來��
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-6300 CPU @ 3.80GHz
CC version: cc (Rev1, Built by MSYS2 project) 10.2.0

getwd: C:\CompilationCrap\v
vmodules: C:\Users\[REDACTED]\.vmodules
vroot: C:\CompilationCrap\v
vexe: C:\CompilationCrap\v\v.exe
vexe mtime: 2021-02-08 18:39:43
is vroot writable: true
is vmodules writable: false
V full version: V 0.2.2 09cff69

Git version: git version 2.19.1.windows.1
Git vroot status: Error: fatal: not a git repository (or any of the parent directories): .git
.git/config present: false
thirdparty/tcc status: thirdparty-windows-amd64 f7691963

What did you do?

  1. Tried to use v help while the executable is under folder with cyrilic characters.
  2. Tried to compile tetris example after moving the executable to C:/CompilationCrap/v folder. The command was v run examples/tetris/tetris.v

What did you expect to see?

  1. Expected to see help
  2. Expected to see no errors and have tetris example running

What did you see instead? 1. C:\Users[REDACTED]\Downloads\v>v help V Error: Unknown help topic provided. Use v help for usage information.

  1. gcc: error: C:\Users[REDACTED].vmodules\cache\a0\a084424f774d8f05340437d1c93d0b91.o: No such file or directory gcc: error: C:\Users[REDACTED].vmodules\cache\4a\4a44544dbe66bd1cf288cf0b9ef7e0d1.o: No such file or directory [a lot of = that were removed because markdown engine parses them inadequately] builder error:

C error. This should never happen.

The [REDACTED] folder is a name in cyrillic censored for privacy reasons

The version is the latest one, precompiled, downloaded from the official website

Polydynamical commented 3 years ago

Try doing a clean install. Tell us if you still have the same error.

KatPurpy commented 3 years ago

What does clean install mean? Cloning from git repo and compiling manually?

KatPurpy commented 3 years ago

@cbracketdash Nope, same error.

Polydynamical commented 3 years ago

@KatPurpy Yes, deleted every download, path, temp file related to V and reinstalling it.

KatPurpy commented 3 years ago

not sure if I did clean it up properly i just copied V from official website but the problem is clearly presence of cyrillic characters

KatPurpy commented 3 years ago

by the way i just checked that in fact object files do exist in the directory, it is now clear that the trouble is somewhere with encoding and passing proper argument to gcc

JalonSolov commented 3 years ago

Can you try with -cc tcc and see if it has the same problem?

Also, try gcc from https://winlibs.com instead of the msys2 one you have.

KatPurpy commented 3 years ago

@JalonSolov I really doubt that would help since building tetris example fails as well as anything that requires linking to third party libraries is going to use gcc anyway. The other problem I found out that if the current working dir of the compiler contains cyrillic characters it can't do anything изображение

Polydynamical commented 3 years ago

Maybe just don't use Cyrillic characters?

Delta456 commented 3 years ago

Maybe just don't use Cyrillic characters?

IMO it should work with Cyrillic characters.

AnalogFeelings commented 3 years ago

Tried on Linux; issue doesnt happen. Seems to be a Windows only issue.

medvednikov commented 2 years ago

Still an issue on Windows.