premake-core icon indicating copy to clipboard operation
premake-core copied to clipboard

Got error while trying to build mcvs2017-22 project files.

Open vega0 opened this issue 1 year ago • 7 comments

Before opening a new bug report, please read Reporting Bugs and consider if this is something you can contribute yourself. If this a new bug, help us help you by filling in the template below.

What seems to be the problem? A clear and concise description of the bug, ex. "It crashes when I try to run it" or "There doesn't seem to be any way to do ...". If you are reporting a crash, be sure to include any error messages and stack trace information. Use code blocks to format code and console output nicely.

Running to build project files from config item, got error.

What did you expect to happen? A clear and concise description of what you expected to happen.

The project file that can be opened through visual studio and compiled.

What have you tried so far? Describe any steps you've taken to try to solve or workaround the bug.

Not sure how to fix it.

How can we reproduce this? Please provide a minimal, reproducible example we can use to replicate the problem in our own development environments. Use code blocks to format code and console output nicely.

Unpack premake5.exe and build any project files from sources.

  • [x] Visual Studio 2022 (vs2022)
  • [x] Visual Studio 2019 (vs2019)
  • [ ] Visual Studio 2017 (vs2017)
  • [ ] Visual Studio 2015 (vs2015)
  • [ ] Visual Studio 2012 (vs2012)
  • [ ] Visual Studio 2010 (vs2010)
  • [ ] Visual Studio 2008 (vs2008)
  • [ ] Visual Studio 2005 (vs2005)
  • [ ] GNU Makefile (gmake)
  • [ ] GNU Makefile 2 (gmake2)
  • [ ] XCode (xcode)
  • [ ] Codelite
  • [ ] Other (Please list below)

What version of Premake are you using? premake5 --version will show you the version. If you are running a "-dev" version, please make sure you are up to date with the latest master branch.

PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe --version Payloads Beigin. premake5 (Premake Build Script Generator) 5.0.0-beta2 PS G:\Workspace\cpp.machinarium.gui>

Anything else we should know? Add any other context about the problem here.


PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe
Payloads Beigin.
Type 'premake5 --help' for help
PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe msvc2019
Payloads Beigin.
Error: no such action 'msvc2019'
PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe msvc2017
Payloads Beigin.
Error: no such action 'msvc2017'
PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe --help
Payloads Beigin.
Premake 5.0.0-alpha16, a build script generator
Copyright (C) 2002-2021 Jason Perkins and the Premake Project
Lua 5.3 Lua 5.3.5  Copyright (C) 1994-2018 Lua.org, PUC-Rio

Usage: premake5 [options] action [arguments]

OPTIONS - General

 --debugger          Start MobDebug remote debugger. Works with ZeroBrane Studio
 --fatal             Treat warnings from project scripts as errors
 --file=FILE         Read FILE as a Premake script; default is 'premake5.lua'
 --help              Display this information
 --insecure          forfit SSH certification checks.
 --interactive       Interactive command prompt
 --os=VALUE          Generate files for a different operating system; one of:
     aix              IBM AIX
     android          Android
     bsd              OpenBSD, NetBSD, or FreeBSD
     haiku            Haiku
     hurd             GNU/Hurd
     ios              iOS
     linux            Linux
     macosx           Apple Mac OS X
     solaris          Solaris
     windows          Microsoft Windows

 --scripts=PATH      Search for additional scripts on the given path
 --systemscript=FILE Override default system script (premake5-system.lua)
 --verbose           Generate extra debug text output
 --version           Display version information

OPTIONS - compilers

 --cc=VALUE     Choose a C/C++ compiler set; one of:
     clang       Clang (clang)
     gcc         GNU GCC (gcc/g++)
     mingw       MinGW GCC (gcc/g++)

 --dc=VALUE     Choose a D compiler; one of:
     dmd         Digital Mars (dmd)
     gdc         GNU GDC (gdc)
     ldc         LLVM LDC (ldc2)

 --dotnet=VALUE Choose a .NET compiler set; one of:
     mono        Novell Mono (mcs)
     msnet       Microsoft .NET (csc)
     pnet        Portable.NET (cscc)


ACTIONS

 clean             Remove all binaries and generated files
 codelite          Generate CodeLite project files
 gmake             Generate GNU makefiles for POSIX, MinGW, and Cygwin
 gmake2            Generate GNU makefiles for POSIX, MinGW, and Cygwin
 vs2005            Generate Visual Studio 2005 project files
 vs2008            Generate Visual Studio 2008 project files
 vs2010            Generate Visual Studio 2010 project files
 vs2012            Generate Visual Studio 2012 project files
 vs2013            Generate Visual Studio 2013 project files
 vs2015            Generate Visual Studio 2015 project files
 vs2017            Generate Visual Studio 2017 project files
 vs2019            Generate Visual Studio 2019 project files
 xcode4            Generate Apple Xcode 4 project files

For additional information, see https://premake.github.io
PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe vs2017
Payloads Beigin.
Building configurations...
Running action 'vs2017'...
Error: [string "vstudio/vs2005.lua"]:9: attempt to index a nil value (field 'sln2005')
PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe vs2017
Payloads Beigin.
Building configurations...
Running action 'vs2017'...
Error: [string "vstudio/vs2005.lua"]:9: attempt to index a nil value (field 'sln2005')
PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe vs2022
Payloads Beigin.
Building configurations...
Running action 'vs2022'...
Error: [string "vstudio/vs2005.lua"]:9: attempt to index a nil value (field 'sln2005')
PS G:\Workspace\cpp.machinarium.gui>

How can it be happened.

(You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to issues like these!)

vega0 avatar Sep 06 '22 11:09 vega0

This is an old version of Premake. Please use the latest release binaries and let us know if you're still having the issue.

nickclark2016 avatar Sep 06 '22 11:09 nickclark2016

Where can i find latest version? From first of request in search box i've got this version

vega0 avatar Sep 06 '22 12:09 vega0

This is an old version of Premake. Please use the latest release binaries and let us know if you're still having the issue.

Its latest!

vega0 avatar Sep 06 '22 12:09 vega0

This is an old version of Premake. Please use the latest release binaries and let us know if you're still having the issue.

Its latest!

Are you saying you updated to the latest, or you think you're on the latest?

Latest is here: https://github.com/premake/premake-core/releases/tag/v5.0.0-beta2

nickclark2016 avatar Sep 06 '22 12:09 nickclark2016

What version of Premake are you using? premake5 --version will show you the version. If you are running a "-dev" version, please make sure you are up to date with the latest master branch.

> `PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe --version Payloads Beigin. premake5 (Premake Build Script Generator) 5.0.0-beta2 PS G:\Workspace\cpp.machinarium.gui>`

What version of Premake are you using?
premake5 --version will show you the version. If you are running a "-dev" version, please make sure you are up to date with the latest master branch.

PS G:\Workspace\cpp.machinarium.gui> ./premake5.exe --version Payloads Beigin. premake5 (Premake Build Script Generator) 5.0.0-beta2 PS G:\Workspace\cpp.machinarium.gui>

vega0 avatar Sep 06 '22 12:09 vega0

And it's still failing? I can't reproduce it locally. Can you share your premake file?

nickclark2016 avatar Sep 06 '22 12:09 nickclark2016

Just checking on an update for this. If you can provide a sample repo, that'd be great. If not, I'm going to move to close this as I couldn't reproduce it.

nickclark2016 avatar Jan 30 '23 14:01 nickclark2016