Vega-strike-engine-source: Readme instructions obsolete & build problem

Created on 26 Jun 2020  Â·  9Comments  Â·  Source: vegastrike/Vega-Strike-Engine-Source

Hello,

I tried to build VS on debian 10, and ran into problems

build is broken by fb901e989ff2c1deec2c82e432adf8940e069836:

/usr/include/stdint.h:102:22: error: conflicting declaration ‘typedef __uintmax_t uintmax_t’
 typedef __uintmax_t  uintmax_t;
                      ^~~~~~~~~
In file included from /home/vince/dev/repo/upstream/Vega-Strike-Engine-Source/engine/src/cmd/collide2/Stdafx.h:20,
                 from /home/vince/dev/repo/upstream/Vega-Strike-Engine-Source/engine/src/cmd/collide2/Ice/Stdafx.h:1,
                 from /home/vince/dev/repo/upstream/Vega-Strike-Engine-Source/engine/src/cmd/collide2/Ice/IceAABB.cpp:21:
/home/vince/dev/repo/upstream/Vega-Strike-Engine-Source/engine/src/cmd/collide2/opcodetypes.h:178:16: note: previous declaration as ‘typedef uint64 uintmax_t’
 typedef uint64 uintmax_t;
                ^~~~~~~~~

With the preceding commit (672dba0a8) I could build VS:

mkdir build
cd build
cmake ..
make -j16
mkdir ../bin && cp vegastrike ../bin/ && cp setup/vegasettings ../bin/ && cd ..

but then cannot run it:

$ ./bin/vegasettings 
Error: Failed to find Version.txt anywhere.
vince@ryzen:~/dev/repo/upstream/Vega-Strike-Engine-Source$ ./bin/vegastrike 
Registering codec ogg.
 In path /home/vince/dev/repo/upstream/Vega-Strike-Engine-Source/bin
Vega Strike  
See http://www.gnu.org/copyleft/gpl.html for license details.

GOT SUBDIR ARG = 
Found MODDIR = /mods
USING HOMEDIR : /home/vince/.vegastrike As the home directory 
CONFIGFILE - No config found in home : /home/vince/.vegastrike/vegastrike.config
CONFIGFILE - No config found in data dir : /vegastrike.config
CONFIG FILE NOT FOUND !!!
Panic exit - no configuration

Am I missing something or are the README.md instructions obsolete ?

Thanks

bug

All 9 comments

I can confirm the issue when doing a complete manual build as described. It seems there might be an issue with it detecting the presence of stdint.h in that build methodology.

@vincele can you please try running ./sh/vsbuild.sh from the root directory? It should also be mentioned in the documentation.

Assigning to 0.7.x as we can probably refactor some of that code out. All Unix systems support stdint.h and Visual Studios finally added it in VS2013 or VS2015; as we're only going to be supporting VS2017 (for the time being) all compilers and libc libraries we use should be supporting that header and there for logic in engine/src/cmd/collide2/opcodetypes.h is largely obsolete going forward.

@vincele, the binaries don't know where to look for the data files. You have a few options now.

  1. Change directory to the location where the Vega Strike game data is. Run vegasettings and vegastrike from this directory.
  1. Specify to the binaries where to find the data. For vegastrike that is vegastrike -d/usr/share/vegastrike on my system, your mileage may vary. For vegasettings, the command is vegasettings --target /usr/share/vegastrike, again, modify the target part to suit your system.

In the future, we really should either pass that to the source at compile time, or have a field in the config file that tells the binaries where to look for the data.

@vincele are you sure about the building instructions that you have posted?
It should be cmake ../engine
As an experiment I would also try instead of make -j16 to run cmake --build .

The problem is that, as of https://github.com/vegastrike/Vega-Strike-Engine-Source/commit/fb901e989ff2c1deec2c82e432adf8940e069836 , the CMakeLists.txt default build configuration refers to a configuration that is no longer present. RelWithDebInfo no longer exists.

We can fix this one of two ways:

  1. by changing the default build configuration to one of the valid options, Debug or Release
  2. by adding the RelWithDebInfo build config back in.

Which route do we want to go?

And yes, the README has an issue in that the compilation instructions do not mention the need to download the assets.

Number 2 as it would make building release .deb's better though there should a fall back for a manual build.

@stephengtuggy RelWithDebInfo is a CMake Configuration value that sets the compiler to build an optimized (release) build but to keep the symbols, etc that are required for debugging. Release strips all that stuff out and Debug leaves all the optimizations out.

So we really need to continue building with the debug info (RelWithDebInfo) as the build type.

@vincele Thank you for reporting this issue. It should now be fixed. Please try it, and if you still encounter issues, feel free to reopen this ticket.

Hello, the above failure is now fixed, thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stephengtuggy picture stephengtuggy  Â·  5Comments

nabaco picture nabaco  Â·  3Comments

BenjamenMeyer picture BenjamenMeyer  Â·  4Comments

nabaco picture nabaco  Â·  4Comments

viktorradnai picture viktorradnai  Â·  3Comments