Author Topic: Noob of Linux need an Retard Guide for Compiling.  (Read 653 times)

Offline Etherdreamer

  • NPC
  • **
  • Posts: 148
    • View Profile
Noob of Linux need an Retard Guide for Compiling.
« on: March 26, 2017, 10:23:08 AM »
Title. Even tried to read the guides for that, maybe because my language issues / no knowledge about Linux, I can´t understand at all how to compile a graphical version of the game.

Maybe a step by step guide somewhere, please? There is a error with some libraries that don´t let me run the tiles version and I installed and tried several guides for installing the libraries and never worked at all.

distro- Linux Mint
« Last Edit: March 26, 2017, 10:57:54 AM by Etherdreamer »

Offline Weyrling

  • Survivor
  • ***
  • Posts: 521
    • View Profile
Re: Noob of Linux need an Retard Guide for Compiling.
« Reply #1 on: March 30, 2017, 08:52:16 PM »
Well first you want git, to get it you just open up a console and do:
Code: [Select]
sudo apt-get install gitThis is also how basically everything on Linux is installed including the libraries you'll need.


Then you want to clone from the git onto your computer.
To do this you'll want to first use the command line to navigate to where you want the working project to be, then do:
Code: [Select]
git clone https://github.com/CleverRaven/Cataclysm-DDA.git

Next you'll want to install all of the libraries, I suggest you look at this:
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/COMPILING.md

Keep in mind you'll also want the dev versions of these libraries, for example instead of just sdl2_mixer or libsdl2, you might also need sdl2_mixer-dev or libsdl2-dev.
I don't remember exactly which ones you need, but they should be listed on the github.


Once you've done that, you'll want to try to compile it, so navigate to the Cataclysm-DDA folder with the Makefile in it and try something like:
Code: [Select]
MAKE TILES=1 RELEASE=1
At this point you'll probably get an error about some library you missed, so just run an apt-get at whatever the error was about.
Remember to try appending "-dev" on the end of it if it doesn't fix itself with a simple attempt.

You can compile with a bunch of different options, for reference I think my normal compile command is something like:
Code: [Select]
MAKE TILES=1 SOUND=1 LUA=1 RELEASE=1

Offline jcd

  • Survivor
  • ***
  • Posts: 543
  • the lazy one
    • View Profile
Re: Noob of Linux need an Retard Guide for Compiling.
« Reply #2 on: March 30, 2017, 10:16:05 PM »
Code: [Select]
MAKE TILES=1 SOUND=1 LUA=1 RELEASE=1

i'd add that it should be
Code: [Select]
make TILES=1 SOUND=1 LUA=1 RELEASE=1.. at least in my distro..

Offline Etherdreamer

  • NPC
  • **
  • Posts: 148
    • View Profile
Re: Noob of Linux need an Retard Guide for Compiling.
« Reply #3 on: April 03, 2017, 07:13:55 AM »
Package SDL2_image was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_image.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_image' found
Package SDL2_ttf was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_ttf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_ttf' found
/bin/sh: 1: astyle: not found
Cannot run an astyle check, your system either does not have astyle, or it is too old.
g++  -DRELEASE -DGIT_VERSION -DTILES -DLOCALIZE -ffast-math -Os -Wall -Wextra -fsigned-char -Werror -std=c++11 -MMD -D_REENTRANT -I/usr/include/SDL2 -DSDL_SOUND -I/usr/include/lua5.3 -DLUA -I/usr/include/SDL2 -D_REENTRANT -c src/game.cpp -o obj/tiles/game.o
In file included from src/game.cpp:110:0:
src/cata_tiles.h:6:21: fatal error: SDL_ttf.h: No such file or directory
compilation terminated.
Makefile:687: recipe for target 'obj/tiles/game.o' failed
make: *** [obj/tiles/game.o] Error 1

Anything of this makes no sense to me, I installed the dependencies that says the compile file. Or dunno, nothing it´s really clear to me.
« Last Edit: April 03, 2017, 07:17:18 AM by Etherdreamer »

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3760
    • View Profile
Re: Noob of Linux need an Retard Guide for Compiling.
« Reply #4 on: April 03, 2017, 09:42:45 AM »
Did you install dependencies with "-dev" suffix?
You most likely only got the user libs and not the dev ones. Dev ones are necessary to compile anything.
Also astyle

What do you need the compiled version for? If just for testing PRs, console version would be enough. If for playing, you could just get the binaries from http://dev.narc.ro/cataclysm/jenkins-latest/
Unless you need to test PRs that change tiles or sound related code, that is.

Offline Clwebb

  • Zombie Food
  • *
  • Posts: 3
    • View Profile
Re: Noob of Linux need an Retard Guide for Compiling.
« Reply #5 on: April 18, 2017, 10:26:19 AM »
Will this work on Raspberry Pi 2 too?