Page 1 of 1

Ubuntu 18.04 Compiling problem

Posted: Tue Jun 04, 2019 10:51 am
by toffuuu
HI I'm trying to see if I can get this compiled on 64Bit xUbuntu 18.04, now in terminal after it fail, points me to CMakeoutput.log file. so I will include that. I'd really like to try this game, but just hope I can get over this hurdle, and if at all any others.

Re: Ubuntu 18.04 Compiling problem

Posted: Tue Jun 04, 2019 4:47 pm
by loki1950
Sorry but the current source code will not complie on any modern up to date distro the API's of all our supporting libraries have changed sometimes quite drastically all of the library calls must be updated in the C++ and I am likely the last man standing on the project unfortunately I do not know C++ you might ckech Wiser's thread on updating the source here on the forum or check the GitHub page for activity wiser is also moving from Python 2.7 to 3 and he is having problems with the Python stub embedded in the engine's C++ code getting lib boost work correctly this is not a trivial exercise.

Enjoy the Choice :)

Re: Ubuntu 18.04 Compiling problem

Posted: Tue Jun 04, 2019 5:33 pm
by toffuuu
Hmm Well hopefully sooner or later someone may be able to "figure it out" lol I'm no developer myself.. Just know how to use source code though as long as it works.. But thank you for letting me know on the whole Dev side of this. Guess I'll just have to be patient.

Re: Ubuntu 18.04 Compiling problem

Posted: Sat Jun 08, 2019 11:46 pm
by p8Q4jgRoJ7n6qKXN
Was able to build on 18.04. Did a clean install of 18.04. Grabbed the code and ran the following commands. The biggest thing to be aware of is that boost doesn't check out with the rest of the source correctly. This is because of bad svn:externals for pulling it. The commands below correct that along with installing required packages and building.

Code: Select all

sudo apt install subversion
svn checkout https://svn.code.sf.net/p/vegastrike/code/trunk vegastrike-code
cd vegastrike-code/vegastrike/boost/1_53
touch tmpext

So at this point we have pulled the code, switched to the boost directory, and made an empty file.  We need this file to update the svn externals.  edit the file and put these lines in it:

boost https://svn.boost.org/svn/boost/tags/release/Boost_1_53_0/boost
src https://svn.boost.org/svn/boost/tags/release/Boost_1_53_0/libs/python/src
system https://svn.boost.org/svn/boost/tags/release/Boost_1_53_0/libs/system/src

Then continue with these commands:

svn propset svn:externals -F tmpext .
svn update
cd ../../..
mkdir build
cd build
sudo apt install cmake
sudo apt install build-essential
sudo apt install python-dev
sudo apt install libgl1-mesa-dev
sudo apt install freeglut3-dev
sudo apt install libopenal-dev
sudo apt install libvorbis-dev
sudo apt install libjpeg62-dev
sudo apt install pkg-config
sudo apt install libsdl-dev
sudo apt install libgtk2.0-dev
cmake ../vegastrike-code/vegastrike/ -DDISABLE_FFMPEG=ON
make
cd ..
cd vegastrike-code/
cd data/
ln -s ../../build/vegastrike 
ln -s ../../build/setup/vssetup 
./vssetup 
./vegastrike

Re: Ubuntu 18.04 Compiling problem

Posted: Sun Jun 09, 2019 3:13 pm
by toffuuu
Will give this a try when I have the time, Thanks.

Re: Ubuntu 18.04 Compiling problem

Posted: Fri Aug 30, 2019 6:16 pm
by the_mtn_who_glides
Thanks for putting that together, p8Q4jgRoJ7n6qKXN. Wish I had seen that before I went to the trouble of figuring it out for myself. LOL.

I came up with a slightly different set of steps, but the list of Ubuntu packages I installed was largely the same. My steps have the advantages that they avoid the "broken external" error messages, and they include hqtextures for nicer graphics.

Here is what I have for downloading Vega Strike from SVN, building it, and running it on Ubuntu 18.04 LTS:

Code: Select all

#!/usr/bin/env bash

# Install the necessary Ubuntu packages
sudo apt-get install automake
sudo apt-get install subversion
sudo apt-get install subversion-tools
sudo apt-get --install-suggests install libboost-python-dev
sudo apt-get install \
    libpng-dev \
    python2.7-dev \
    libexpat1-dev \
    libjpeg62-dev \
    freeglut3-dev \
    libopenal-dev \
    libgtk2.0-dev \
    libogg-dev \
    libvorbis-dev \
    build-essential \
    libgl1-mesa-dev \
    automake \
    autoconf \
    libsdl1.2-dev
sudo apt-get install \
    cmake \
    libxmu-dev
sudo apt-get install \
    p7zip-full \
    libavcodec-dev \
    libavformat-dev \
    ogre-1.9-tools \
    libavfilter-dev \
    curl

# Create the directory for Vega Strike, if it doesn't already exist
mkdir -p ~/Projects/repos/svn/VegaStrike && cd $_

# Check out the source code and accompanying files
svn checkout --ignore-externals https://svn.code.sf.net/p/vegastrike/code/trunk/vegastrike
svn checkout                    https://svn.code.sf.net/p/vegastrike/code/trunk/data
svn checkout                    https://svn.code.sf.net/p/vegastrike/code/trunk/hqtextures

# Get Boost separately
mkdir -p vegastrike/boost/1_53 && cd $_
curl -L https://downloads.sourceforge.net/project/boost/boost/1.53.0/boost_1_53_0.7z --output boost_1_53_0.7z
7z x boost_1_53_0.7z
mv -i boost_1_53_0/* .
./bootstrap.sh

# Prepare the build system
cd ../..
cmake -DDISABLE_FFMPEG=TRUE .

# Build Vega Strike!
make all

# Configure game settings for the current user
./setup/vssetup

# Run the game!
./vegastrike

Re: Ubuntu 18.04 Compiling problem

Posted: Fri Aug 30, 2019 6:31 pm
by the_mtn_who_glides
Note that, AFAIK, the latest source code is actually on GitHub: https://github.com/vegastrike I have tried downloading and building that, copying in Boost from where I downloaded it previously. But make fails with build errors. I couldn't find config.log on my system, but here are the last few lines of output from make vegastrike:

Code: Select all

In file included from /home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/cmd/beam.h:5:0,
                 from /home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/cmd/beam_generic.cpp:3:
/home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/cmd/unit_collide.h: In member function ‘void UnitHash3d<CTSIZ, CTACCURACY, CTHUGE>::Clear()’:
/home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/cmd/unit_collide.h:97:32: error: request for member ‘size’ in ‘((UnitHash3d<CTSIZ, CTACCURACY, CTHUGE>*)this)->active_huge’, which is of pointer type ‘UnitCollection*’ (maybe you meant to use ‘->’ ?)
         if ( this->active_huge.size() )
                                ^~~~
/home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/cmd/unit_collide.h:99:31: error: request for member ‘size’ in ‘((UnitHash3d<CTSIZ, CTACCURACY, CTHUGE>*)this)->accum_huge’, which is of pointer type ‘UnitCollection*’ (maybe you meant to use ‘->’ ?)
         if ( this->accum_huge.size() )
                               ^~~~
In file included from /home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/cmd/../gfx/camera.h:24:0,
                 from /home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/cmd/beam_generic.cpp:8:
/home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/physics.h: At global scope:
/home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/physics.h:30:34: error: ‘float copysign(float, float)’ conflicts with a previous declaration
 float copysign( float x, float y );
                                  ^
In file included from /usr/include/c++/7/math.h:36:0,
                 from /home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/vs_math.h:27,
                 from /home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/vegastrike.h:38,
                 from /home/<username>/Projects/repos/git/GitHub/vegastrike/Vega-Strike-Engine-Source/src/cmd/beam_generic.cpp:1:
/usr/include/c++/7/cmath:1301:3: note: previous declaration ‘constexpr float std::copysign(float, float)’
   copysign(float __x, float __y)
   ^~~~~~~~
CMakeFiles/engine_com.dir/build.make:614: recipe for target 'CMakeFiles/engine_com.dir/src/cmd/beam_generic.cpp.o' failed
make[3]: *** [CMakeFiles/engine_com.dir/src/cmd/beam_generic.cpp.o] Error 1
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/engine_com.dir/all' failed
make[2]: *** [CMakeFiles/engine_com.dir/all] Error 2
CMakeFiles/Makefile2:230: recipe for target 'CMakeFiles/vegastrike.dir/rule' failed
make[1]: *** [CMakeFiles/vegastrike.dir/rule] Error 2
Makefile:170: recipe for target 'vegastrike' failed
make: *** [vegastrike] Error 2

Re: Ubuntu 18.04 Compiling problem

Posted: Fri Aug 30, 2019 9:44 pm
by loki1950
All the errors in that make log seem to be related to API changes in the supporting libraries it has been several years since anyone with any skill has really looked at the code even though I first did coding on second generation main frames ie: IBM 360 Dos and VMX they where before OOS .

Enjoy the Choice :)

Re: Ubuntu 18.04 Compiling problem

Posted: Sun Sep 01, 2019 12:14 am
by the_mtn_who_glides
Thanks for your reply, @loki1950. I did manage to get the GitHub version of Vega Strike building and running on my machine, just today, with some small code tweaks to 8 files. I would be happy to submit a Pull Request on GitHub, if someone wants to add me as a contributor. GH username: stephengtuggy

Re: Ubuntu 18.04 Compiling problem

Posted: Sun Sep 01, 2019 12:19 am
by the_mtn_who_glides
P.S. I have been coding for 20+ years, and I do know a fair bit of C, C++, and Python. I am considering contributing my coding skills on an ongoing basis.

Did you guys ever settle on a set of community guidelines? That'll be important to have, in my opinion.

Thanks

Re: Ubuntu 18.04 Compiling problem

Posted: Sun Sep 01, 2019 2:55 am
by loki1950
We never did set any guidelines as there was only ever four at the most code contributors they thrashed their differences out on IRC then committed the code to svn while I kept the peace here on the forums will see about adding you to the GH team run it by the project's founder if he's not too busy(now a tenured Phd) as are a few of the other founders BTW glad you got it up and running in your going over the code I'm sure you noticed that we have a Python 2.7 interpreter embedded into the engine one of the reasons we never got to Python 3 just to much work involved in upgrading with marginal benefits will try to get back to you ASAP.

Enjoy the Choice :)

Re: Ubuntu 18.04 Compiling problem

Posted: Sun Sep 01, 2019 10:28 pm
by the_mtn_who_glides
loki1950 wrote:We never did set any guidelines as there was only ever four at the most code contributors they thrashed their differences out on IRC then committed the code to svn while I kept the peace here on the forums will see about adding you to the GH team run it by the project's founder if he's not too busy(now a tenured Phd) as are a few of the other founders BTW glad you got it up and running in your going over the code I'm sure you noticed that we have a Python 2.7 interpreter embedded into the engine one of the reasons we never got to Python 3 just to much work involved in upgrading with marginal benefits will try to get back to you ASAP.

Enjoy the Choice :)
Thanks!

Re: Ubuntu 18.04 Compiling problem

Posted: Sun Sep 15, 2019 9:41 pm
by Roy
Any chance of getting the diff of the eight files?
I'm interested in compiling the game and prefer not to duplicate the excellent work you've already done.

Re: Ubuntu 18.04 Compiling problem

Posted: Tue Sep 17, 2019 4:46 am
by the_mtn_who_glides
Roy wrote:Any chance of getting the diff of the eight files?
I'm interested in compiling the game and prefer not to duplicate the excellent work you've already done.
It actually turned out to be 10 files. See attached.

Note that, sadly, the GitHub code doesn't seem to be as stable as the code on SourceForge trunk. The GH code has crashed on me at least twice when I've been in the middle of a fierce battle with a pirate Thales. Rather frustrating. Feel free to try the GitHub code, though, if you want.

Re: Ubuntu 18.04 Compiling problem

Posted: Thu Sep 26, 2019 5:06 am
by the_mtn_who_glides
I think I will go ahead and fork Vega Strike on GitHub for code contribution purposes. Then I can create Pull Requests, and you guys can decide whether or not to merge them.

Re: Ubuntu 18.04 Compiling problem

Posted: Thu Sep 26, 2019 5:54 pm
by loki1950
Good lets get it moving along then.

Enjoy the Choice :)

Re: Ubuntu 18.04 Compiling problem

Posted: Wed Oct 02, 2019 11:49 pm
by crome
the_mtn_who_glides wrote:I think I will go ahead and fork Vega Strike on GitHub for code contribution purposes. Then I can create Pull Requests, and you guys can decide whether or not to merge them.
Which version are you going to fork? The one already present on GitHub? I compiled it and it segfaulted after 20 minutes of playing. I managed to compile version 0.5.1.r1 (latest official stable) for Slackware 14.2 and it has been running fine so far.

If you intend to fork from a stable version then I would be interested in following the progress.
loki1950 wrote:Good lets get it moving along then.

Enjoy the Choice :)
Would the original developers monitor the development at all, i.e., would they take time out of their schedule to evaluate pull requests and merge them?

Re: Ubuntu 18.04 Compiling problem

Posted: Thu Oct 03, 2019 12:44 am
by the_mtn_who_glides
crome wrote:
the_mtn_who_glides wrote:I think I will go ahead and fork Vega Strike on GitHub for code contribution purposes. Then I can create Pull Requests, and you guys can decide whether or not to merge them.
Which version are you going to fork? The one already present on GitHub? I compiled it and it segfaulted after 20 minutes of playing. I managed to compile version 0.5.1.r1 (latest official stable) for Slackware 14.2 and it has been running fine so far.

If you intend to fork from a stable version then I would be interested in following the progress.
loki1950 wrote:Good lets get it moving along then.

Enjoy the Choice :)
Would the original developers monitor the development at all, i.e., would they take time out of their schedule to evaluate pull requests and merge them?
Yes, I forked the version already on GitHub. I think you will find that it crashes a lot less with my latest changes, available here: https://github.com/stephengtuggy/Vega-S ... bug-output

Two of the previous developers reviewed my previous PR, but they haven't merged it yet. So I'm not sure yet how responsive they will be.

Re: Ubuntu 18.04 Compiling problem

Posted: Thu Oct 03, 2019 3:32 am
by loki1950
@crome that pull request is currently being reviewed and klauss will most likely merge it he after all was our main coder for several years after the project founders got on the academic tread mill and it is my intention to keep shepherding this effort with the consent of the founders which I have they are also members of the GitHub team though not active ATM so please do monitor the process I am not looking to alienate any potential contributor all comments are valid at this point as we finally have movement after such a long inactive period.

Enjoy the Choice :)

Re: Ubuntu 18.04 Compiling problem

Posted: Sun Oct 13, 2019 11:21 am
by crome
Thanks for the replies. I compiled the version on Github and encountered a bug in python module 'modules/missions/directions_mission.py'. I tried to do the first mission where I am asked by the guy in the bar to deliver some cargo to Jacobs in Bernard's star system. Upon making the second jump to Bernard's system the game crashed. The trace indicated that the error happened in aforementioned module. It was just a misnamed variable. I created a fork and fixed in a new branch: https://github.com/crts-crome/Assets-Pr ... thon_crash
I am going to create a pull request for that.

Please also take a look at my other post regarding some erratic behaviour I have encountered:
https://forums.vega-strike.org/viewtopi ... =2&t=49102

I have a "fix" for one of those issues (not yet uploaded to public repo). Please let me know if I shall create a pull request for that as well.

Since I do not know how much time the previous developers can/want to spent on reviewing new code let me know if there is a general interest in further contributions.

Thanks.

Re: Ubuntu 18.04 Compiling problem

Posted: Sun Oct 13, 2019 3:37 pm
by loki1950
Thx for the pull request crome remember that particular crash happening to me lo many years ago but at the time reproducing it was the issue glad you found a reason for the crash.

Enjoy the Choice :)