Ubuntu 18.04 Compiling problem

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
toffuuu
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Tue Jun 04, 2019 10:43 am

Ubuntu 18.04 Compiling problem

Post 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.
You do not have the required permissions to view the files attached to this post.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Ubuntu 18.04 Compiling problem

Post 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 :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
toffuuu
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Tue Jun 04, 2019 10:43 am

Re: Ubuntu 18.04 Compiling problem

Post 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.
p8Q4jgRoJ7n6qKXN
Insys Pilot
Insys Pilot
Posts: 2
Joined: Sat Jun 08, 2019 11:26 pm

Re: Ubuntu 18.04 Compiling problem

Post 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
toffuuu
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Tue Jun 04, 2019 10:43 am

Re: Ubuntu 18.04 Compiling problem

Post by toffuuu »

Will give this a try when I have the time, Thanks.
the_mtn_who_glides
Merchant
Merchant
Posts: 51
Joined: Thu Aug 29, 2019 2:07 pm

Re: Ubuntu 18.04 Compiling problem

Post 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
the_mtn_who_glides
Merchant
Merchant
Posts: 51
Joined: Thu Aug 29, 2019 2:07 pm

Re: Ubuntu 18.04 Compiling problem

Post 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
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Ubuntu 18.04 Compiling problem

Post 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 :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
the_mtn_who_glides
Merchant
Merchant
Posts: 51
Joined: Thu Aug 29, 2019 2:07 pm

Re: Ubuntu 18.04 Compiling problem

Post 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
the_mtn_who_glides
Merchant
Merchant
Posts: 51
Joined: Thu Aug 29, 2019 2:07 pm

Re: Ubuntu 18.04 Compiling problem

Post 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
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Ubuntu 18.04 Compiling problem

Post 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 :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
the_mtn_who_glides
Merchant
Merchant
Posts: 51
Joined: Thu Aug 29, 2019 2:07 pm

Re: Ubuntu 18.04 Compiling problem

Post 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!
Roy
Star Pilot
Star Pilot
Posts: 7
Joined: Thu Sep 12, 2019 9:54 pm

Re: Ubuntu 18.04 Compiling problem

Post 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.
the_mtn_who_glides
Merchant
Merchant
Posts: 51
Joined: Thu Aug 29, 2019 2:07 pm

Re: Ubuntu 18.04 Compiling problem

Post 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.
You do not have the required permissions to view the files attached to this post.
the_mtn_who_glides
Merchant
Merchant
Posts: 51
Joined: Thu Aug 29, 2019 2:07 pm

Re: Ubuntu 18.04 Compiling problem

Post 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.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Ubuntu 18.04 Compiling problem

Post by loki1950 »

Good lets get it moving along then.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
crome
Explorer
Explorer
Posts: 14
Joined: Wed Mar 18, 2009 6:31 pm

Re: Ubuntu 18.04 Compiling problem

Post 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?
the_mtn_who_glides
Merchant
Merchant
Posts: 51
Joined: Thu Aug 29, 2019 2:07 pm

Re: Ubuntu 18.04 Compiling problem

Post 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.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Ubuntu 18.04 Compiling problem

Post 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 :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
crome
Explorer
Explorer
Posts: 14
Joined: Wed Mar 18, 2009 6:31 pm

Re: Ubuntu 18.04 Compiling problem

Post 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.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Ubuntu 18.04 Compiling problem

Post 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 :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Post Reply