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

Cannot install using Visual Studio 2017 #34

Open
henriquegemignani opened this issue Apr 5, 2017 · 4 comments
Open

Cannot install using Visual Studio 2017 #34

henriquegemignani opened this issue Apr 5, 2017 · 4 comments

Comments

@henriquegemignani
Copy link

Output when opening a prompt, running the VS script for variable setup, then calling hererocks

(here) C:\DELETEME>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
**********************************************************************
** Visual Studio 2017 RC Developer Command Prompt v15.0.26206.0
** Copyright (c) 2016 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

(here) C:\DELETEME>hererocks -l 5.1 lua51
Using cl.exe found in PATH.
Traceback (most recent call last):
  File "C:\DELETEME\here\Scripts\hererocks-script.py", line 9, in <module>
    load_entry_point('hererocks==0.15.0', 'console_scripts', 'hererocks')()
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 1892, in main
    if RioLua(opts.lua).update_identifiers(identifiers):
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 571, in update_identifiers
    self.set_identifiers()
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 1050, in set_identifiers
    super(RioLua, self).set_identifiers()
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 625, in set_identifiers
    cl_help = get_output("cl")
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 275, in get_output
    return run(get_output=True, *args)
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 272, in run
    return capture and output.decode("UTF-8").strip()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc6 in position 44: invalid continuation byte```

There's also no `vs17` option in the `--target` option.
@mpeterv
Copy link
Owner

mpeterv commented Apr 26, 2017

Looks like an error when decoding compiler output, what does cl command output after initializing VS17?

I'll add vs17 target, need to check what registry keys VS17 uses.

@henriquegemignani
Copy link
Author

VS17 does not use the registry anymore: https://blogs.msdn.microsoft.com/vcblog/2017/03/06/finding-the-visual-c-compiler-tools-in-visual-studio-2017/

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.24911 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

@mpeterv
Copy link
Owner

mpeterv commented May 2, 2017

I've fixed the encoding issue on master branch I hope, can you try it? (Set up variables first)

I'll research the COM option in the post you linked, it's not as easy to use as the registry. And other options rely on dependencies that may be missing.

@henriquegemignani
Copy link
Author

Seems to be working fine, if you setup the env vars before invoking hererocks.

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

2 participants