Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux build instructions #3

Open
keturn opened this issue Jul 12, 2019 · 27 comments

Comments

@keturn
Copy link

commented Jul 12, 2019

It's been a while, but there was, at one point, a Linux build.
Are build instructions for that still around?

@Smilex

This comment has been minimized.

Copy link

commented Jul 14, 2019

I've made a build script that does successfully compile and run the game. It has rough edges though, for the time being

https://github.com/Smilex/CCOSS/tree/linux

@neuromancer

This comment has been minimized.

Copy link

commented Jul 14, 2019

Neat!, which game data you used? The one from steam should work right?

@Smilex

This comment has been minimized.

Copy link

commented Jul 14, 2019

On Linux, you need to enable proton for the game, because the linux version has no files, then opt in for the beta branch, and then copy the run executable that you get from my branch, into the game folder under Steam, and run it!

Then you get to see the intro, but notice that it crashes if you try to start a scenario

@neuromancer

This comment has been minimized.

Copy link

commented Jul 14, 2019

Can we use the old game data?

@Smilex

This comment has been minimized.

Copy link

commented Jul 14, 2019

I don't know, but I'd guess not
I'll first focus on making my linux build less rough

@Smilex

This comment has been minimized.

Copy link

commented Jul 14, 2019

Oh no! I very much managed to confuse myself. There is no beta branch for Linux, and I think that's the reason why it crashes.

@Newk77

This comment has been minimized.

Copy link

commented Jul 15, 2019

can't we use the data files from the windows version in the linux build?

@Smilex

This comment has been minimized.

Copy link

commented Jul 15, 2019

By the sound of #2 it looks like the windows users don't have access to the beta branch either

@Newk77

This comment has been minimized.

Copy link

commented Jul 15, 2019

i remember i had to use a password in Steam to access the beta
googled it and found: rocket100000

(edit: this way i could use the linux build that was also in the OSX build 30 branch.. old version and only got it to work on a 32bit machine)

@Rathlord

This comment has been minimized.

Copy link

commented Jul 28, 2019

I'd love to help getting latest running on OS X and Linux as well. Not sure where we're at progress-wise, though, so if someone wants to get me up to speed and pointed at a starting point I'd be happy to jump in and see what I can do.

@Smilex

This comment has been minimized.

Copy link

commented Jul 29, 2019

I'd love to help getting latest running on OS X and Linux as well. Not sure where we're at progress-wise, though, so if someone wants to get me up to speed and pointed at a starting point I'd be happy to jump in and see what I can do.

The intention is to provide precompiled dependencies for different platforms, but that isn't the case yet, so first you'll need this - https://github.com/liberated-cortex/CCOSS_dependencies - and to run the "prepare.sh" script. Hopefully it just works, if not, it's a bug.

Then you'll need to compile this - https://github.com/liberated-cortex/CCOSS - by opening the build_linux.sh file, finding the PREPARED_DIR variable and pointing it to the CCOSS_dependencies/prepared directory on your system, then run that file.

Now you should have a linux executable called "cortext", it needs to be copied into the Cortex Command root directory, but you'll need the newest branch, which you can get from steam, by going into the games options on steam and selecting the ccoss branch.

Yes I know this is too much, it'll be simplified in future.
Expect audio issues

@basxto

This comment has been minimized.

Copy link

commented Jul 29, 2019

Fast copy and paste version:

git clone https://github.com/liberated-cortex/CCOSS_dependencies.git
git clone https://github.com/liberated-cortex/CCOSS.git
cd CCOSS_dependencies
./prepare.sh
cd ../CCOSS
sed -i -e 's|PREPARED_DIR=""|PREPARED_DIR="../CCOSS_dependencies/prepared/"|g' ./build_linux.sh
./build_linux.sh

But it does not work for me.
objs/LuaMan.cpp.o, objs/libluabind.a and ../CCOSS_dependencies/prepared//libogg.a are missing.

@Smilex

This comment has been minimized.

Copy link

commented Jul 30, 2019

@basxto Thanks for testing it! I had made a mistake from the start, where I committed some generated files for CCOSS_dependencies. I have no gone through and removed those, could you try it again? Hopefully that fixes the libogg.a issue

as for libluabind.a, I'd need to learn what the compile issue is

@basxto

This comment has been minimized.

Copy link

commented Jul 30, 2019

The errors from build_linux.sh are those: https://gist.github.com/basxto/25f7436f288e0d903803bbebde0086f7

EDIT: I fixed libluabind.a, the headers weren't included. LuaMan.cpp still has build errors, though.

I get this erro for a couple of different lines:

external/sources/luabind-0.9.1/luabind/object.hpp:546:37: error: no matching function for call to ‘operator==(const luabind::detail::basic_iterator<luabind::detail::basic_access>&, const luabind::detail::basic_iterator<luabind::detail::basic_access>&)’                     
  546 |       return boost::operator op(x, y); \                                                                                                                                                                                                                                 
      |  

EDIT2: I have boost 1.69.0-2 and boost-libs 1.69.0-2 installed.
EDIT3: The AUR package has patches for luabind https://aur.archlinux.org/packages/luabind, but I get reference errors after applying it.

@basxto

This comment has been minimized.

Copy link

commented Jul 31, 2019

Well … I managed to build it \o/

git clone https://github.com/liberated-cortex/CCOSS_dependencies.git
git clone https://github.com/liberated-cortex/CCOSS.git
cd CCOSS_dependencies
./prepare.sh
cd ../CCOSS
make all PREPARED_DIR=../CCOSS_dependencies/prepared/ -j4

But I noticed that the window uses the Allegro icon instead of the one from Cortex Command.

EDIT: I tested it with the Windows version Steam and the 2/14/17 Windows version from Humble.

EDIT2: I updated this for people comming from Holarse. This only works with ccoss Windows beta on Steam (Steam Play). B32 from Humble crashes as soon as you start a scenario. Linux beta on Steam is an empty repository.

@basxto

This comment has been minimized.

Copy link

commented Aug 2, 2019

I've built a little asset pack for testing the linux build without the original game data.

(only main menu with quit button)

git clone https://github.com/liberated-cortex/CCOSS_dependencies.git
git clone https://github.com/liberated-cortex/CCOSS.git
git clone --recursive https://github.com/liberated-cortex/blackCortex.git
cd CCOSS_dependencies
./prepare.sh
cd ../CCOSS
make all PREPARED_DIR=../CCOSS_dependencies/prepared/ -j4
cp ./cortex ../blackCortex/
cd ../blackCortex/
make
./cortex
@Smilex

This comment has been minimized.

Copy link

commented Aug 2, 2019

VERY cool!

@basxto

This comment has been minimized.

Copy link

commented Aug 3, 2019

Okay I do not really get my built working with any content I find (B32, ccoss linux beta new/). I get to the menu with B32, but it crashes when I want to load a scenario.

Cortex Command silently crashes and does not even make a screenshot of the splash screen console.

In response to that I made a branch with command line parameters. ./cortex -c logs to cout.
2019-08-03_03:51_752x733

@basxto

This comment has been minimized.

Copy link

commented Aug 3, 2019

Okay, make sure to get the Windows repository on Steam since the Linux repo is empty.
I tried to run some old leftover files and validating game files obviously did not change a thing, even though I thought it was reset from then on.

@ManuGithubSteam

This comment has been minimized.

Copy link

commented Aug 11, 2019

I love this game. Glad to see in in the open. My prblem with wine and the windows verson was that it did crash soemtimes and just not work smoothly. Hope this will be fixed in the future. Happy to help with beta testing :-)

@ManuGithubSteam

This comment has been minimized.

Copy link

commented Aug 11, 2019

@basxto

My build does fail of your cortex black branch:

In file included from external/sources/luabind-0.9.1/luabind/luabind.hpp:27,
from Managers/LuaMan.cpp:54:
external/sources/luabind-0.9.1/luabind/config.hpp:27:10: fatal error: boost/config.hpp: No such file or directory
27 | #include <boost/config.hpp>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:81: objs/Managers/LuaMan.o] Error 1
make: *** Waiting for unfinished jobs....

bonary cortex is not build.

@basxto

This comment has been minimized.

Copy link

commented Aug 11, 2019

You mean my cli branch of CCOSS?
blackCortex just contains ini files, images, sound and such.
I gave up that branch for now since it looked to tedious to make sure that it also can run with windows and mac.
It looks like a general error with building CCOSS on Linux.
Do you have boost development headers installed?
Does it work with those installed? Which distribution do you use?

It looks like neither my Makefile nor the original build script links to boost in any way.
$BOOST_LIBS and $BOOST_INC are not defined.

@ManuGithubSteam

This comment has been minimized.

Copy link

commented Aug 12, 2019

Hi @basxto i just tried this:

git clone https://github.com/liberated-cortex/CCOSS_dependencies.git
git clone https://github.com/liberated-cortex/CCOSS.git
git clone --recursive https://github.com/liberated-cortex/blackCortex.git
cd CCOSS_dependencies
./prepare.sh
cd ../CCOSS
make all PREPARED_DIR=../CCOSS_dependencies/prepared/ -j4
cp ./cortex ../blackCortex/
cd ../blackCortex/
make
./cortex

I installed the boost lib but now i get anther error:

baes.a ../CCOSS_dependencies/prepared//libz.a ../CCOSS_dependencies/prepared//libbsd.a ../CCOSS_dependencies/prepared//libgorilla.a -lopenal -lpthread -ldl
c++: error: ../CCOSS_dependencies/prepared//libbsd.a: No such file or directory
make: *** [Makefile:62: cortex] Error 1

extra/libbsd 0.9.1-1 [installed]
Provides useful functions commonly found on BSD systems like strlcpy()

The lib is installed.

@basxto

This comment has been minimized.

Copy link

commented Aug 12, 2019

@ManuGithubSteam I opened an issue on CCOSS_dependcencies, because that gets a bit out of scope for this issue here.
Your installed libbsd does not get used, instead there is one built in CCOSS_dependencies.
And if that file does not exist it means that something went wrong during the built of libbsd.
Are there any further error messages? Please post those on the issue linked above.
CCOSS_dependencies/libbsd-0.9.1/install/lib/libbsd.a should exist after running libbsd.sh (called by prepare.sh)

@Smilex

This comment has been minimized.

Copy link

commented Aug 14, 2019

@ManuGithubSteam Could you try updating the cleaning the CCOSS_dependencies repo by calling ./clean.sh, updating it with git using, "git pull" and then running ./prepare.sh again. After this, is there a libbsd.a in the prepared/ directory?

@ManuGithubSteam

This comment has been minimized.

Copy link

commented Aug 14, 2019

@Smilex
No its not:
manuel@R920:~/cortex/CCOSS_dependencies/prepared$ls
include libaes.a liballeg.a liballeggl.a libgorilla.a liblua.a libminizip.a libogg.a libpng16.a libsndio.a libvorbis.a libvorbisenc.a libvorbisfile.a libz.a

@basxto

This comment has been minimized.

Copy link

commented Aug 15, 2019

Does ./clean.sh;./libbsd.sh throw any errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.