Compile Problem

Questions, problems and discussion about compiling FreeOrion.
Message
Author
User avatar
adrian_broher
Programmer
Posts: 1072
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Compile Problem

#31 Post by adrian_broher » Sat Feb 27, 2016 4:14 pm

Cpeosphoros wrote:
Dilvish wrote:

Code: Select all

sudo apt-get install libglew-dev
should do it; I didn't do anything fancy for my install of it.
Necroing this. That line of code should be in the Wiki page, together with the other "apt-get install" statements. I was trying to compile on a Linux Mint box and had a hard time with a "Couldn't find GLEW" message.
Yeah, the package is missing in the Wiki command line. Fixed that.
Cpeosphoros wrote:I had to "mine" that sequence of commands from various places in the wiki and this forum. I think it should be all together in an easily accessible place in the wiki.
How is 'Home > Compile > Linux' not accessible?
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Cpeosphoros
Space Kraken
Posts: 123
Joined: Sat Jan 30, 2016 11:29 am

Re: Compile Problem

#32 Post by Cpeosphoros » Sat Feb 27, 2016 4:34 pm

adrian_broher wrote: How is 'Home > Compile > Linux' not accessible?
It missed the glew package, which is now solved, thank you, and still misses "git clone", which has to be found somewhere else.

My suggestion was that it should be accessible and all in one place. Maybe having a link to "Get the source" on 'Home > Compile > Linux' would supply that, but I still think it would cost nothing to have the "git clone" command easily accessible there.
All contributions are released under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidelines.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Compile Problem

#33 Post by MatGB » Sat Feb 27, 2016 10:17 pm

No, I agree completely, I meant to do it after I switched to Linux and was sure I'd gotten my head around what was going on as I also found it confusing, if there's a simple list of commands that will make it just work on most distros, then we should have that listed in full ont eh compile page.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

tom.i
Space Krill
Posts: 5
Joined: Sun Feb 28, 2016 7:36 am

Re: Compile Problem

#34 Post by tom.i » Sun Feb 28, 2016 7:49 am

Hi I have similar issue with compiling FreeOrion from GIT.

I compiled that upon wiki, then it crashed in 63%. Then I find this thread from web, with compiling to it to the different directory. I tried
adrian_broher wrote:
MatGB wrote:Specifically, there were no executables for freeorion, freeoriond or freeorionca. But, this was the first time I'd *ever* tried to compile something on Linux and I had no idea what Linux executables even looked like or where they were meant to be.
Well, okay. I will give you a little breakdown of the steps then.

Starting from the commands you used:

change directory to the directory called 'git'

Code: Select all

cd git
make a directory called 'freeorion.build' inside the git directory.

Code: Select all

mkdir freeorion.build
Again, change directory to the new created directory 'freeorion.build'

Code: Select all

cd freeorion.build
...

but it didn't help and crashed on 100%.
Then I tried:
Dilvish wrote:Ah, yeah, I think I see the issue, your build directory is all the way out of your local git repo. When we had been using the phrase "out-of-source" build, it really meant something more like "compartmentalized from the source files" not "totally out of the source tree". Try

Code: Select all

git clone https://github.com/freeorion/freeorion
cd freeorion
mkdir build 
cd build
cmake ..
make
but it din't help too.

In both cases, it crashed on this:

Code: Select all

[ 99%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TechTreeLayout.cpp.o
[ 99%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TechTreeWnd.cpp.o
[100%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TextBrowseWnd.cpp.o
/home/tomik/programs/freeorion/freeorion/UI/SitRepPanel.cpp: At global scope:
/home/tomik/programs/freeorion/freeorion/UI/SitRepPanel.cpp:35:11: warning: 'GG::X {anonymous}::GetFontSize()' defined but not used [-Wunused-function]
     GG::X GetFontSize()
           ^
/home/tomik/programs/freeorion/freeorion/UI/SystemIcon.cpp:34:57: warning: 'const std::vector<boost::shared_ptr<GG::Texture> >& {anonymous}::GetSelectionIndicatorTextures()' defined but not used [-Wunused-function]
     const std::vector<boost::shared_ptr<GG::Texture> >& GetSelectionIndicatorTextures() {
                                                         ^
/home/tomik/programs/freeorion/freeorion/UI/SystemIcon.cpp:39:57: warning: 'const std::vector<boost::shared_ptr<GG::Texture> >& {anonymous}::GetSelectionIndicatorTinyTextures()' defined but not used [-Wunused-function]
     const std::vector<boost::shared_ptr<GG::Texture> >& GetSelectionIndicatorTinyTextures() {
                                                         ^
Linking CXX executable ../../freeorion
[100%] Built target freeorion
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2
Can anyone help, how to compile it without error?

User avatar
Vezzra
Release Manager, Design
Posts: 4610
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Compile Problem

#35 Post by Vezzra » Sun Feb 28, 2016 9:35 am

@tom.i: First of all, what distro are you on? Second, which commit exactly did you try to build?

And third, the part of the build log you quoted does not contain the errors that caused the build to fail. Those last three "error" messages:
tom.i wrote:In both cases, it crashed on this:

Code: Select all

[ 99%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TechTreeLayout.cpp.o
[ 99%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TechTreeWnd.cpp.o
[100%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TextBrowseWnd.cpp.o
/home/tomik/programs/freeorion/freeorion/UI/SitRepPanel.cpp: At global scope:
/home/tomik/programs/freeorion/freeorion/UI/SitRepPanel.cpp:35:11: warning: 'GG::X {anonymous}::GetFontSize()' defined but not used [-Wunused-function]
     GG::X GetFontSize()
           ^
/home/tomik/programs/freeorion/freeorion/UI/SystemIcon.cpp:34:57: warning: 'const std::vector<boost::shared_ptr<GG::Texture> >& {anonymous}::GetSelectionIndicatorTextures()' defined but not used [-Wunused-function]
     const std::vector<boost::shared_ptr<GG::Texture> >& GetSelectionIndicatorTextures() {
                                                         ^
/home/tomik/programs/freeorion/freeorion/UI/SystemIcon.cpp:39:57: warning: 'const std::vector<boost::shared_ptr<GG::Texture> >& {anonymous}::GetSelectionIndicatorTinyTextures()' defined but not used [-Wunused-function]
     const std::vector<boost::shared_ptr<GG::Texture> >& GetSelectionIndicatorTinyTextures() {
                                                         ^
Linking CXX executable ../../freeorion
[100%] Built target freeorion
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2
...are actually just warnings, you get a ton of them during compile, and usually can be safely ignored. To get an idea what goes wrong in your case we need the entire build log (you can copy it into a text file and attach it to a post here in this thread).

User avatar
adrian_broher
Programmer
Posts: 1072
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Compile Problem

#36 Post by adrian_broher » Sun Feb 28, 2016 9:36 am

tom.i wrote:Can anyone help, how to compile it without error?
Neither the way you compile (they are equivalent, except by the build directory name, anyway) nor the log indicates the reason why the program does not compile (there is no 'crash'). The log part you posted only contains warnings (as you can see by the 'warning:' after the file name) which do not hinder the compile process. Search for an 'error:' statement to find the cause. Also please state where you fetched the source from and on what system you're compiling on.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

AndrewW
Juggernaut
Posts: 767
Joined: Mon Feb 04, 2013 10:15 pm

Re: Compile Problem

#37 Post by AndrewW » Sun Feb 28, 2016 9:59 am

MatGB wrote:No, I agree completely, I meant to do it after I switched to Linux and was sure I'd gotten my head around what was going on as I also found it confusing, if there's a simple list of commands that will make it just work on most distros, then we should have that listed in full ont eh compile page.
Well, per package manager should be doable.

tom.i
Space Krill
Posts: 5
Joined: Sun Feb 28, 2016 7:36 am

Re: Compile Problem

#38 Post by tom.i » Sun Feb 28, 2016 12:12 pm

Vezzra wrote:@tom.i: First of all, what distro are you on? Second, which commit exactly did you try to build?

And third, the part of the build log you quoted does not contain the errors that caused the build to fail. Those last three "error" messages:
tom.i wrote:In both cases, it crashed on this:

Code: Select all

[ 99%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TechTreeLayout.cpp.o
[ 99%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TechTreeWnd.cpp.o
[100%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TextBrowseWnd.cpp.o
/home/tomik/programs/freeorion/freeorion/UI/SitRepPanel.cpp: At global scope:
/home/tomik/programs/freeorion/freeorion/UI/SitRepPanel.cpp:35:11: warning: 'GG::X {anonymous}::GetFontSize()' defined but not used [-Wunused-function]
     GG::X GetFontSize()
           ^
/home/tomik/programs/freeorion/freeorion/UI/SystemIcon.cpp:34:57: warning: 'const std::vector<boost::shared_ptr<GG::Texture> >& {anonymous}::GetSelectionIndicatorTextures()' defined but not used [-Wunused-function]
     const std::vector<boost::shared_ptr<GG::Texture> >& GetSelectionIndicatorTextures() {
                                                         ^
/home/tomik/programs/freeorion/freeorion/UI/SystemIcon.cpp:39:57: warning: 'const std::vector<boost::shared_ptr<GG::Texture> >& {anonymous}::GetSelectionIndicatorTinyTextures()' defined but not used [-Wunused-function]
     const std::vector<boost::shared_ptr<GG::Texture> >& GetSelectionIndicatorTinyTextures() {
                                                         ^
Linking CXX executable ../../freeorion
[100%] Built target freeorion
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2
...are actually just warnings, you get a ton of them during compile, and usually can be safely ignored. To get an idea what goes wrong in your case we need the entire build log (you can copy it into a text file and attach it to a post here in this thread).
Hi,
1. I'm using VoidLinux.
2. actual GIT version, I'm not sure how should I check the commit version, but git told me that version is up-to-date.
3. Whole output is here: http://hastebin.com/icemulodop.scala

Thank you very much ;)

User avatar
Vezzra
Release Manager, Design
Posts: 4610
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Compile Problem

#39 Post by Vezzra » Sun Feb 28, 2016 12:44 pm

tom.i wrote:1. I'm using VoidLinux.
Huh, yet another distro. Seems to be not even a derivate from one of the major ones, but something built completely from scratch, with its own package manager. Nice.

This might make things a bit difficult. It's already quite difficult for us to provide support for the major distros (although, where possible, we try), but covering all those smaller ones is just beyond our manpower. So, all I can offer you is some general help, as soon as we hit issues that are specific of VoidLinux, I'm afraid I won't be able to offer much help.

However, maybe adrian_broher can help you a bit more.

Ok, lets have a look at what we've got here:
2. actual GIT version, I'm not sure how should I check the commit version, but git told me that version is up-to-date.
Hm, so we're talking about recent master. As expected, just wanted to be sure.
3. Whole output is here: http://hastebin.com/icemulodop.scala
According to what I found there, the issue is the missing libboost_python.so library. That's a bit strange, because FO uses several of the boost libraries, and none of the others are reported missing. And running cmake should've already failed if it couldn't find the required dependencies, libboost_python being one of them. Did cmake run successfully, without any errors? Can you try to check if and where the boost libraries are installed on your system?

If any of our Linux folks could provide a little assistance here... I'm on OSX, not really the most knowledgeable person around with regard to Linux issues like that.

tom.i
Space Krill
Posts: 5
Joined: Sun Feb 28, 2016 7:36 am

Re: Compile Problem

#40 Post by tom.i » Sun Feb 28, 2016 1:03 pm

I think, that cmake is without error:

Code: Select all

freeorion/build [ cmake ../../freeorion                     master * ] 1:17 PM
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   chrono
--   date_time
--   filesystem
--   regex
--   signals
--   system
--   thread
--   log
-- Configuring GiGi
-- Configuring GiGiSDL
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   chrono
--   date_time
--   filesystem
--   locale
--   iostreams
--   regex
--   serialization
--   signals
--   system
--   thread
--   log
-- Configuring freeoriond
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   iostreams
--   python
--   log
-- Configuring freeorionca
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   python
--   log
-- Configuring freeorion
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tomik/programs/freeorion/freeorion/build
That boost library, I installed boost-devel package, but now, I see that I don't have boost-python.

Code: Select all

freeorion/build [ xbps-query -Rs boost                      master * ] 1:57 PM
[*] boost-1.58.0_6              Free peer-reviewed portable C++ source libr...
[-] boost-build-1.58.0_6        Free peer-reviewed portable C++ source libr...
[*] boost-devel-1.58.0_6        Free peer-reviewed portable C++ source libr...
[-] boost-jam-1.58.0_6          Free peer-reviewed portable C++ source libr...
[-] boost-python-1.58.0_6       Free peer-reviewed portable C++ source libr...
[-] websocketpp-0.5.1_2         C++/Boost Asio based websocket client/serve...
[-] boost-32bit-1.58.0_6        Free peer-reviewed portable C++ source libr...
[-] boost-devel-32bit-1.58.0_6  Free peer-reviewed portable C++ source libr...
[-] boost-python-32bit-1.58.0_6 Free peer-reviewed portable C++ source libr...
So I'll try to install that missing package and we'll see ;)

User avatar
Vezzra
Release Manager, Design
Posts: 4610
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Compile Problem

#41 Post by Vezzra » Sun Feb 28, 2016 1:15 pm

tom.i wrote:I think, that cmake is without error ... That boost library, I installed boost-devel package, but now, I see that I don't have boost-python.
Ok, that's strange. First of all, boost_python is part of boost, and you seem to have installed the main boost package, so boost_python should be included. However, maybe on VoidLinux boost is packaged differently, this list might indicate that boost_python is maintained separately from the rest of the other boost libraries.

If that's the case, installing boost_python should help, but still leaves the question why cmake reports it has found boost_python... well, lets see what happens once you've installed the apparently missing boost_python package.

tom.i
Space Krill
Posts: 5
Joined: Sun Feb 28, 2016 7:36 am

Re: Compile Problem

#42 Post by tom.i » Sun Feb 28, 2016 1:31 pm

We did it ;)

Thank you very much ;)
Attachments
WeDidIt.png
WeDidIt.png (216.2 KiB) Viewed 866 times

User avatar
adrian_broher
Programmer
Posts: 1072
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Compile Problem

#43 Post by adrian_broher » Sun Feb 28, 2016 1:31 pm

Vezzra wrote:According to what I found there, the issue is the missing libboost_python.so library. That's a bit strange, because FO uses several of the boost libraries, and none of the others are reported missing. And running cmake should've already failed if it couldn't find the required dependencies, libboost_python being one of them. Did cmake run successfully, without any errors? Can you try to check if and where the boost libraries are installed on your system?
The analysis is correct so far. Also no idea why the stock FindBoost module didn't complain about the missing boost_python library. Maybe a bug in upstream CMake. I need to investigate this before I can give any advise.

Code: Select all

make[2]: *** No rule to make target '/usr/lib64/libboost_python.so', needed by 'freeorionca'.  Stop.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Vezzra
Release Manager, Design
Posts: 4610
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Compile Problem

#44 Post by Vezzra » Sun Feb 28, 2016 1:38 pm

tom.i wrote:We did it ;)
Nice :D

One question however: that screenshot above, is that from a default quickstart game, or did you run a single player game and change any of the default game settings? Because what I see is not what you get when you just launch a default quickstart game right after a fresh install...

User avatar
Vezzra
Release Manager, Design
Posts: 4610
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Compile Problem

#45 Post by Vezzra » Sun Feb 28, 2016 1:41 pm

adrian_broher wrote:I need to investigate this before I can give any advise.
Not immediately urgent, as tom.i apparently got things running by installing the missing boost_python lib, but still needs investigation at some point. It's not exactly ideal if cmake reports a library found that's not actually there.

Post Reply