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

NMAKE : fatal error U1077: 'cl' : return code '0x2' on Windows #42

Closed
AakLak opened this issue May 11, 2018 · 3 comments
Closed

NMAKE : fatal error U1077: 'cl' : return code '0x2' on Windows #42

AakLak opened this issue May 11, 2018 · 3 comments

Comments

@AakLak
Copy link

AakLak commented May 11, 2018

Windows 10, 64 bit
Ruby 2.5.1
Visual Studio 2015 Update 3

Command Ran:
rubyc my_script.rb

Debug:

-> Project root not supplied, C:/Users/yohoj/Downloads/rs_acc_creator assumed.
Ruby Compiler (rubyc) v0.4.0
- entrance: C:/Users/yohoj/Downloads/rs_acc_creator/rs_acc_creator.rb
- options: {:make_args=>"-j4", :output=>"C:/Users/yohoj/Downloads/rs_acc_creator/a.exe", :tmpdir=>"C:/Users/yohoj/AppData/Local/Temp/rubyc"}

-> mkdir -p C:/Users/yohoj/AppData/Local/Temp/rubyc
-> cd C:/Users/yohoj/AppData/Local/Temp/rubyc/ruby-2.4.1-0.4.0
-> Running [{"CI"=>"true", "ENCLOSE_IO_USE_ORIGINAL_RUBY"=>"1", "ENCLOSE_IO_RUBYC_1ST_PASS"=>"1", "ENCLOSE_IO_RUBYC_2ND_PASS"=>nil}, "call win32\\configure.bat                                   --disable-install-doc                                   --prefix=\"C:/Users/yohoj/AppData/Local/Temp/rubyc/ruby-2.4.1-0.4.0/build\""]
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
-> Running [{"CI"=>"true", "ENCLOSE_IO_USE_ORIGINAL_RUBY"=>"1", "ENCLOSE_IO_RUBYC_1ST_PASS"=>"1", "ENCLOSE_IO_RUBYC_2ND_PASS"=>nil}, "nmake "]

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-> Running [{"CI"=>"true", "ENCLOSE_IO_USE_ORIGINAL_RUBY"=>"1", "ENCLOSE_IO_RUBYC_1ST_PASS"=>"1", "ENCLOSE_IO_RUBYC_2ND_PASS"=>nil}, "nmake install"]

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'install'
Stop.
Failed running [{"CI"=>"true", "ENCLOSE_IO_USE_ORIGINAL_RUBY"=>"1", "ENCLOSE_IO_RUBYC_1ST_PASS"=>"1", "ENCLOSE_IO_RUBYC_2ND_PASS"=>nil}, "nmake install"]

Maybe related issue?
#34

@AakLak AakLak closed this as completed May 11, 2018
@AakLak AakLak reopened this May 12, 2018
@AakLak AakLak changed the title NMAKE : fatal error U1073: don't know how to make 'install' on Windows NMAKE : fatal error U1077: 'cl' : return code '0x2' on Windows May 12, 2018
@AakLak
Copy link
Author

AakLak commented May 12, 2018

I believe this was occurring due to differing bit versions, specifically I believe I was running Visual Studio x86 instead of x64.

After getting everything on x64, get this issue:
#34

Going to continue this thread there.

@AakLak AakLak closed this as completed May 12, 2018
@artyomkalm
Copy link

The same error, even if I use x64 (set PATH for amd64/cl)

@hsandt
Copy link

hsandt commented Jul 3, 2019

It worked for me with the Developer Command Prompt for VS 2017. If you want a script:

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
rubyc ...

Maybe you can use some environment variables to reduce the amount of hardcoded paths.

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

3 participants