What am I doing wrong?

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

What am I doing wrong?

#1 Post by godel »

I have downloaded 4.7. I am using linux Mint 18.3.(well I thought so, turned out to be 17.1 creating many problems)(edit 2: 17.1 was based on Ubuntu 14, 18.3 on ubuntu 16 something. )

I have managed to find and use this:
sudo apt-get install build-essential git pkg-config cmake libboost-all-dev libglew-dev
sudo apt-get install python2.7-dev libfreetype6-dev libsdl2-dev libvorbis-dev libopenal-dev


I go through this:
apt install build-essential
apt-get source freeorion
apt-get build-dep freeorion
cd freeorion-*
debuild -us -uc

(all the above included for any who want to follow me to here)

And part way through I find I am dealing with 4.3 when I have downloaded 4.7. Ok that is no doubt that get source freeorion line.
But, pardon my ignorance, how do I compile or otherwise create the game?

I have tried to follow through, but need to get the version issue out of the way.
mkdir freeorion_build
cd freeorion_build
cmake ../freeorion
make

maybe later I can post the odd errors that were noted on some of my tries.
Last edited by godel on Mon May 14, 2018 6:32 pm, edited 2 times in total.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: What am I doing wrong?

#2 Post by Dilvish »

It looks like you were following the "build the Debian way" instructions. Keep in mind that those are explicitly only for the most recent stable release, which at this point is plain 0.4.7.1. I'm not sure why you apparently wound up with something for 0.4.3, but perhaps you already had the code for 0.4.3 in your freeorion directory and it's not getting overwritten/updated. Sounds like you might want to delete that source folder and get the source again.

In general recommend that you get the source via git and do a regular compile process so that you can stay more up-to-date with the current test versions rather than just the latest stable release-- there has been a lot of progress since 0.4.7.1.

Bear in mind, though, that this week we are currently in a (thankfully rare) situation where the most current version on master had got some very significant errors with the sitreps, so rather than building from current master you'd probably want to checkout the same particular commit that was used for the weekly builds this week.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: What am I doing wrong?

#3 Post by godel »

Thank you for your patience and reply.
Before working this I hunted down every 4.3 instance and deleted them.
I kept getting 4.3 (which is the last stable release the internet get-apt knows about.

So, I have updates for you.
The first is a need to describe the way to deal with the files after they have been un-archived and are sitting in a folder/directory. Basically it is to go to that directory and do everything the Debian way minus that get-apt freeorion line.

The next is to emphasize the Cmake model. In Synaptic Package Manager (comes with every instance of Mint that I have owned) the Cmake is 2.8 and the Cmake3 is currently 3.51. So for Mint users change cmake to cmake3 both at synaptic and in that command.

All this for my laptop.
There were compile/setup errors, I hope to be able to ignore them.

The desktop linux box worked right up to the need to do something (sorry, I forgot) to get it to activate.
The desktop Win 10 machine still chokes on freeorion, and I can not find the app that noted a memory error. But have been getting rare other errors that might be memory related, so might replace sometime.

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: What am I doing wrong?

#4 Post by godel »

I will find my way to a game.
In the meantime, here is the cmake results, and oops cmake works need not cmake3 at the command line:
$ cmake ..
-- Setting build type to 'Release' as none was specified.
-- Build type CMAKE_BUILD_TYPE set to Release
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:25 (include):
include could not find load file:

UseCodeCoverage


CMake Error at CMakeLists.txt:26 (include):
include could not find load file:

TargetDependencies


-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.6", minimum required is "2.7")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.6", minimum required is "2.7")
CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message):
Unable to find the requested Boost libraries.

Boost version: 1.54.0

Boost include path: /usr/include

Detected version of Boost is too old. Requested version was 1.56 (or
newer).
Call Stack (most recent call first):
CMakeLists.txt:153 (find_package)


-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.5.2")
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found SDL: /usr/lib/x86_64-linux-gnu/libSDLmain.a;/usr/lib/x86_64-linux-gnu/libSDL.so;-lpthread (found version "1.2.15")
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so
CMake Error at CMakeLists.txt:177 (find_package):
By not providing "FindOgg.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Ogg", but
CMake did not find one.

Could not find a package configuration file provided by "Ogg" with any of
the following names:

OggConfig.cmake
ogg-config.cmake

Add the installation prefix of "Ogg" to CMAKE_PREFIX_PATH or set "Ogg_DIR"
to a directory containing one of the above files. If "Ogg" provides a
separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/sean/FreeOrion tarball/src-tarball/freeorion_build/CMakeFiles/CMakeOutput.log".
.

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: What am I doing wrong?

#5 Post by godel »

This list
http://freeorion.org/index.php/Compile_In_Linux
Needs to modify the cmake minimums

sean@Slaptop ~/FreeOrion tarball/src-tarball/freeorion_build $ cmake ..
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.1 or higher is required. You are running version 2.8.12.2


-- Configuring incomplete, errors occurred!

Edit: Mint 18.3 has the needed high numbered Cmake. Mint 17.1 did not.
Last edited by godel on Mon May 14, 2018 5:39 pm, edited 1 time in total.

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: What am I doing wrong?

#6 Post by godel »

I can not find files on my computer with ogg*.make.
I did find a forum section noting that ogg is being considered for being faded out.

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: What am I doing wrong?

#7 Post by godel »

seems I need to boost my boost too.

sean@Slaptop ~ $ sudo add-apt-repository ppa:boost-latest/ppa
[sudo] password for sean:
'This PPA does not support trusty'
Cannot add PPA: ''This PPA does not support trusty''.

Dang!
Ok checking the next level.
As the laptop is older than the linux desktop, it might be behind in os level.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: What am I doing wrong?

#8 Post by Dilvish »

godel wrote:This list
http://freeorion.org/index.php/Compile_In_Linux
Needs to modify the cmake minimums!
I've now noted that there, and also added a recommendation at the top of the page to first review the build instructions from the repo, which should be more reliably up to date.


I was about to suggest you try using o0leg's ubuntu PPA for FreeOrion, but then I noticed that it currently just supports back to 16.04, not back to 14.04 (Trusty, which you are apparently running). I am also not 100% sure whether or not Mint has deviated from Ubuntu enough that there could be some compatibility problems. You could try pm'ing o0leg, he might know about the compatibility question and might be willing to put up a 14.04 build.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

o01eg
Programmer
Posts: 1998
Joined: Sat Dec 10, 2011 5:46 am

Re: What am I doing wrong?

#9 Post by o01eg »

Dilvish wrote:
godel wrote:This list
http://freeorion.org/index.php/Compile_In_Linux
Needs to modify the cmake minimums!
I've now noted that there, and also added a recommendation at the top of the page to first review the build instructions from the repo, which should be more reliably up to date.


I was about to suggest you try using o0leg's ubuntu PPA for FreeOrion, but then I noticed that it currently just supports back to 16.04, not back to 14.04 (Trusty, which you are apparently running). I am also not 100% sure whether or not Mint has deviated from Ubuntu enough that there could be some compatibility problems. You could try pm'ing o0leg, he might know about the compatibility question and might be willing to put up a 14.04 build.
There will be boost compatibility issues because current source code requires 1.58 and doesn't support older version.

Not sure why not update to newer Ubuntu but I could suggest to try Devuan Ascii or Debian Stretch which have same boost version as Ubuntu Awtful 1.62.0.1 so deb package from my PPA may be binary compatible.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-01-30.0dd6806.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: What am I doing wrong?

#10 Post by godel »

Mint 17.1 had limits on boost would not go higher then 1.55. 1.565+ needed.
I am working on Mint 18.3 which would work. Allows boost 1.58
Posting a warning to the effect, mainly that mint 17.1 or earlier will not work.

and
Edit: Mint 18.3 has the needed high numbered Cmake. Mint 17.1 did not.
Last edited by godel on Mon May 14, 2018 5:39 pm, edited 1 time in total.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: What am I doing wrong?

#11 Post by Dilvish »

o01eg wrote:There will be boost compatibility issues because current source code requires 1.58 and doesn't support older version.
Ah, right, I hadn't checked if 14.04 had that.

Now, Godel, you don't have to give up heart just because 14.04 does not come with Boost.158+. Of course, as o0leg suggests, it really might be a good time for you to upgrade your OS )and I would pretty strongly recommend that).

But even if for some reason you really don't want to do that you could still build FO. You'd have to start by building boost-- you might want to try seeing if you can build 1.62+, but at least build 1.58+.
then instead of using a plain cmake command to set up your FO build, you use

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INCLUDE_PATH=/home/godel/programs/boost_1_58_0/install/include -DCMAKE_LIBRARY_PATH=/home/godel/programs/boost_1_58_0/install/lib
(adjusting those paths for wherever you put boost.

But I have to admit, my recollection of building boost is that it can be a bit messy, I think the default build for them does not necessarily produce the multithreaded libraries that FO needs, you might need to look into using a -mt option or something like that when building the boost libraries
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: What am I doing wrong?

#12 Post by godel »

now for a hopeful simplicity, I took all the tarball stuff and dropped it down a directory, same directory as tarball.
This should make things easier and does change the instructions from cmake .. to cmake .

I now get this error message:
sean@seanlap ~/FreeOrion tarball $ cmake .
-- Setting build type to 'Release' as none was specified.
-- Build type CMAKE_BUILD_TYPE set to Release
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:25 (include):
include could not find load file:

UseCodeCoverage


CMake Error at CMakeLists.txt:26 (include):
include could not find load file:

TargetDependencies

So give me a clue? A directive?

User avatar
Oberlus
Cosmic Dragon
Posts: 5704
Joined: Mon Apr 10, 2017 4:25 pm

Re: What am I doing wrong?

#13 Post by Oberlus »

Hmmm...
While someone better informed gets to this, I can tell you what I did to compile and run freeorion on my Ubuntu 16.04.
I used git (command line) to clone/download the repo from github. Then I followed the instructions that Dilvish already linked to you.

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: What am I doing wrong?

#14 Post by godel »

well I straighten out the mess I made of the relationships of the folders,
but want to go off line for a while
Thanks for all the help.

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: What am I doing wrong?

#15 Post by godel »

update, tried again.And will try yet again.
This is what I got.
What I could do is to install one of the missing executables(cppcheck), but not the other two.

sean@seanlap ~/Downloads/freeorion/src-tarball/freeorion_build $ cmake ..
-- Setting build type to 'Release' as none was specified.
-- Build type CMAKE_BUILD_TYPE set to Release
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0cppcheck
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.12", minimum required is "2.7")
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- iostreams
-- locale
-- log
-- regex
-- serialization
-- python
-- signals
-- system
-- thread
-- log_setup
-- chrono
-- atomic
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found SDL: /usr/lib/x86_64-linux-gnu/libSDL2.so (found version "2.0.4")
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so
-- Found Ogg: /usr/lib/x86_64-linux-gnu/libogg.so
-- Found Vorbis: /usr/lib/x86_64-linux-gnu/libvorbis.so
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- regex
-- signals
-- system
-- thread
-- log
-- chrono
-- atomic
-- log_setup
-- Found GLEW: /usr/include
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.2.54")
-- Could NOT find cppcheck (missing: CPPCHECK_EXECUTABLE)
-- Could NOT find pycodestyle (missing: PYCODESTYLE_EXECUTABLE)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sean/Downloads/freeorion/src-tarball/freeorion_build
sean@seanlap ~/Downloads/freeorion/src-tarball/freeorion_build $

Post Reply