Page 1 of 1

VS-0.5.3 compile failure - Debian 9 64 bit

Posted: Thu Feb 20, 2020 11:36 pm
by wirser
Aside for some warnings I got to compile vegastrike.
However the ending message was
[100%] Building CXX object CMakeFiles/vegastrike.dir/src/python/briefing_wrapper.cpp.o
[100%] Linking CXX executable vegastrike
[100%] Built target vegastrike
cp: cannot stat {edited_home_dir}/build/Vega-Strike-Engine-Source-0.5.3/build/{vegastrike,vegaserver,setup/vssetup,objconv/mesh_tool}': No such file or directory
enon@ws-0:~/build/Vega-Strike-Engine-Source-0.5.3$ bin/vegastrike
bash: bin/vegastrike: No such file or directory

:~/build/Vega-Strike-Engine-Source-0.5.3$ ls ./bin
:~/build/Vega-Strike-Engine-Source-0.5.3$

The built binaries were found in the "/Vega-Strike-Engine-Source-0.5.3/build" folder, however trying to run from {VS}/build/vegastrike produced this
$ build/vegastrike
Registering codec ogg.
In path /{edited_home_dir}/Vega-Strike-Engine-Source-0.5.3/build
Vega Strike
See http://www.gnu.org/copyleft/gpl.html for license details.

GOT SUBDIR ARG =
Found MODDIR = /mods
USING HOMEDIR : {edited_home_dir}.vegastrike As the home directory
CONFIGFILE - No config found in home :{edited_home_dir}/.vegastrike/vegastrike.config
CONFIGFILE - No config found in data dir : /vegastrike.config
CONFIG FILE NOT FOUND !!!
Panic exit - no configuration
so I tried running
$ build/setup/vssetup
and got
Error: Failed to find Version.txt anywhere.
looking further I found {VS}/data empty (not mentioned in README.md)
So I unzipped "Assets-Production-0.5.3.zip" and copied everthing from inside the "Assets-Production-0.5.3" folder into the {VS}/data foleder
BTW could you change the name from "Assets-Production-0.5.3" to data to avoid confusion.

Both " build/setup/vssetup" and "build/vegastrike" execute
"config.log" not found

Re: VS-0.5.3 compile failure - Debian 9 64 bit

Posted: Fri Feb 21, 2020 12:16 pm
by pyramid
wirser wrote:cp: cannot stat ...
In such a huge codebase, gcc sometimes gets confused with multi-threaded compilation. In such cases, cd build and make -j1 to see if the problem comes from that.

Help with codebase maintenance is always welcome ;-)

Re: VS-0.5.3 compile failure - Debian 9 64 bit

Posted: Fri Feb 21, 2020 9:09 pm
by wirser
pyramid wrote: cd build and make -j1
make completed correctly, I tracked the problem to the last line {VS_root}}/sh/vsbuild.sh

Code: Select all

cp $BUILD_DIR/{vegastrike,vegaserver,setup/vssetup,objconv/mesh_tool} $BIN_DIR
I toyed around a bit trying to solve the porblem ( before moving on to actually testing game :lol:

2 thoughts
Debian uses "Dash" instead "Bash" for normal shell scripts via /bin/sh. maybe this is specific to Dash.
And/or possibly some strange function on how cp behaves in a shell script. From what few examples I looked it looks fine. I tried using -R (recursive) option to no avail.

I even tried executing this line from direct cmdline. still nogo.

I'll kill some brain cells over the weekend on this :wink:

Re: VS-0.5.3 compile failure - Debian 9 64 bit

Posted: Sat Feb 22, 2020 1:49 pm
by pyramid
wirser wrote:

Code: Select all

cp $BUILD_DIR/{vegastrike,vegaserver,setup/vssetup,objconv/mesh_tool} $BIN_DIR
The safest way would be to split this line into one cp per file.

Re: VS-0.5.3 compile failure - Debian 9 64 bit

Posted: Sat Feb 22, 2020 5:24 pm
by wirser
I was right about suspecting bash/dash difference. I had thought about splitting up like you said.
but if you change the " #!/bin/sh" ---> "#! /bin/bash" the script euns correctly

See
https://stackoverflow.com/questions/572 ... 02#5725402
for a better explination

"BUT I Got all these other sh files"

Code: Select all

 grep -rl '#!/bin/sh' ./ | xargs sed -i 's\#!/bin/sh\#!/bin/bash\g'
will change all sh files recursiely (i am using this trick to change cs_*.h related #includes to respective Python #includes)

Re: VS-0.5.3 compile failure - Debian 9 64 bit

Posted: Fri Mar 27, 2020 9:35 am
by nabaco
Thank you for the info, I stumbled on this on Ubuntu too.
wirser wrote: "BUT I Got all these other sh files"

Code: Select all

 grep -rl '#!/bin/sh' ./ | xargs sed -i 's\#!/bin/sh\#!/bin/bash\g'
I think the better command would be:

Code: Select all

  grep --exclude-dir='.git/' -rl '#!/bin/sh' ./ | xargs sed -i 's\#!/bin/sh\#!/bin/bash\g' 
Just so you won't change anything in the .git/ files :)

Re: VS-0.5.3 compile failure - Debian 9 64 bit

Posted: Thu Apr 09, 2020 4:44 am
by wirser
nabaco wrote: Just so you won't change anything in the .git/ files :)
well changing /bin/sh to /bin/bash should run just fine - even .git/ files :roll:
it would be the same as if /bin/sh pointed to /bin/bash, as some do :shock:

It realy is a small point when the 0.5.3 GitHub branch gets stomped upon :cry: