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

vccexe.exe does not work without VS2015 x64 Native Tools command prompt. #10358

Closed
demotomohiro opened this issue Jan 18, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@demotomohiro
Copy link
Contributor

commented Jan 18, 2019

I got following error when I try to compile testvcc.nim.

OS:Windows 8.1
Visual Studio 2015
Nim:devel branch

testvcc.nim:

echo "foo"

testvcc.nims:

--cc:vcc

Log:

f:\temp>nim c -r testvcc.nim
Hint: used config file 'f:\temp\nim-0.19.9\config\nim.cfg' [Conf]
Hint: used config file 'f:\temp\testvcc.nims' [Conf]
Hint: system [Processing]
Hint: testvcc [Processing]
CC: stdlib_system
CC: testvcc
Error: execution of an external compiler program 'vccexe.exe /c --platform:amd64 /nologo /If:\temp\nim-0.19.9\lib /If:\temp /
Fof:\temp\nimcache\testvcc\debug\stdlib_system.c.obj f:\temp\nimcache\testvcc\debug\stdlib_system.c' failed with exit code: 1

vccexe.nim(159) vccexe
vccexe.nim(25) discoverVccVcVarsAllPath
vccenv.nim(40) vccEnvVcVarsAllPath
vccenv.nim(47) vccEnvVcVarsAllPath
os.nim(1430) expandFilename
Error: unhandled exception: file does not exist [OSError]

I fixed this error in PR #10356.
But there is still problem.

Log:

f:\project\demotomohiro\testvcc>..\Nim\bin\nim.exe c testvcc.nim
Hint: used config file 'f:\project\demotomohiro\Nim\config\nim.cfg' [Conf]
Hint: used config file 'f:\project\demotomohiro\Nim\config\config.nims' [Conf]
Hint: system [Processing]
Hint: testvcc [Processing]
CC: stdlib_system
CC: testvcc
Error: execution of an external compiler program 'vccexe.exe /c --platform:amd64 /nologo  /If:\project\demotomohiro\Nim\lib /I
f:\project\demotomohiro\testvcc /Fof:\temp\nimcache\testvcc\debug\stdlib_system.c.obj f:\temp\nimcache\testvcc\debug\stdlib_sy
stem.c' failed with exit code: 1

vccexe.nim(183)          vccexe
osproc.nim(586)          startProcess
oserr.nim(67)            raiseOSError
Error: unhandled exception: 指定されたファイルが見つかりません。(means "Specified file was not found")
Additional info: "Requested command not found: \'cl.exe\'. OS error:" [OSError]..\lib\system.nim(3016)  sysFatal
Error: unhandled exception: errno: 2 `No such file or directory` [IOError]

It seems vccexe cannot find cl.exe.
When I run same command on VS2015 x64 Native Tools command prompt, it works.
When I use Nim-0.19.2, this command worked without using VS2015 x64 Native Tools command prompt.

@nc-x

This comment has been minimized.

Copy link
Contributor

commented Jan 18, 2019

Caused by #5575

PR => #10364

@Araq Araq closed this in #10364 Jan 21, 2019

Araq added a commit that referenced this issue Jan 23, 2019

Fix issue #10358 (#10383)
* Fix bug: vccexe finds oldest VCC

* echo path to vcvarsall.bat as hint when failed to execute cl.exe

ThomasTJdev added a commit to ThomasTJdev/Nim that referenced this issue Jan 27, 2019

Fix issue nim-lang#10358 (nim-lang#10383)
* Fix bug: vccexe finds oldest VCC

* echo path to vcvarsall.bat as hint when failed to execute cl.exe

narimiran added a commit that referenced this issue Apr 29, 2019

Fix issue #10358 (#10383)
* Fix bug: vccexe finds oldest VCC

* echo path to vcvarsall.bat as hint when failed to execute cl.exe

(cherry picked from commit bad5ad6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.