FreeOrion

Forums for the FreeOrion project
It is currently Thu Nov 23, 2017 5:19 am

All times are UTC




Post new topic Reply to topic  [ 60 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Compile Problem
PostPosted: Sat Feb 27, 2016 4:14 pm 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
Cpeosphoros wrote:
Dilvish wrote:
Code:
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


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sat Feb 27, 2016 4:34 pm 
Offline
Space Kraken
User avatar

Joined: Sat Jan 30, 2016 11:29 am
Posts: 123
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.


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sat Feb 27, 2016 10:17 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3264
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.


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 7:49 am 
Offline
Space Krill

Joined: Sun Feb 28, 2016 7:36 am
Posts: 5
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:
cd git


make a directory called 'freeorion.build' inside the git directory.
Code:
mkdir freeorion.build


Again, change directory to the new created directory 'freeorion.build'
Code:
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:
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:
[ 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?


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 9:35 am 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4243
Location: Sol III
@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:
[ 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).


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 9:36 am 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
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


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 9:59 am 
Offline
Juggernaut

Joined: Mon Feb 04, 2013 10:15 pm
Posts: 757
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.


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 12:12 pm 
Offline
Space Krill

Joined: Sun Feb 28, 2016 7:36 am
Posts: 5
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:
[ 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 ;)


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 12:44 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4243
Location: Sol III
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:
Quote:
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.
Quote:
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.


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 1:03 pm 
Offline
Space Krill

Joined: Sun Feb 28, 2016 7:36 am
Posts: 5
I think, that cmake is without error:
Code:
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:
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 ;)


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 1:15 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4243
Location: Sol III
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.


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 1:31 pm 
Offline
Space Krill

Joined: Sun Feb 28, 2016 7:36 am
Posts: 5
We did it ;)

Thank you very much ;)


Attachments:
WeDidIt.png
WeDidIt.png [ 216.2 KiB | Viewed 648 times ]
Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 1:31 pm 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
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:
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


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 1:38 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4243
Location: Sol III
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...


Top
 Profile  
 
 Post subject: Re: Compile Problem
PostPosted: Sun Feb 28, 2016 1:41 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4243
Location: Sol III
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 60 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group