[gentoo linux]Compilation fails at HumanClientApp.cpp

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
Dart
Space Krill
Posts: 9
Joined: Sun Sep 02, 2012 12:05 am

[gentoo linux]Compilation fails at HumanClientApp.cpp

#1 Post by Dart »

revision 5195
http://pastebin.com/t06J9VNi

dual core 2.66GHz
8GB ram

http://pastebin.com/t06J9VNi
snippet of interest
[ 71%] Building CXX object client/human/CMakeFiles/freeorion.dir/HumanClientApp.cpp.o
/home/dart/Program_Files/FreeOrion/FreeOrion/client/human/HumanClientApp.cpp: In constructor 'HumanClientApp::HumanClientApp(Ogre::Root*, Ogre::RenderWindow*, Ogre::SceneManager*, Ogre::Camera*, Ogre::Viewport*, const boost::filesystem3::path&)':
/home/dart/Program_Files/FreeOrion/FreeOrion/client/human/HumanClientApp.cpp:185:24: error: no matching function for call to 'GG::OgreGUI::OgreGUI(Ogre::RenderWindow*&, const boost::filesystem3::path&)'
/home/dart/Program_Files/FreeOrion/FreeOrion/client/human/HumanClientApp.cpp:185:24: note: candidates are:
/usr/include/GG/Ogre/OgreGUI.h:132:14: note: GG::OgreGUI::OgreGUI(Ogre::RenderWindow*, const string&)
/usr/include/GG/Ogre/OgreGUI.h:132:14: note: no known conversion for argument 2 from 'const boost::filesystem3::path' to 'const string& {aka const std::basic_string<char>&}'
/usr/include/GG/Ogre/OgreGUI.h:123:19: note: GG::OgreGUI::OgreGUI(const GG::OgreGUI&)
/usr/include/GG/Ogre/OgreGUI.h:123:19: note: candidate expects 1 argument, 2 provided
/home/dart/Program_Files/FreeOrion/FreeOrion/client/human/HumanClientApp.cpp:256:11: error: 'class HumanClientApp' has no member named 'SetMouseLRSwapped'
/home/dart/Program_Files/FreeOrion/FreeOrion/client/human/HumanClientApp.cpp: At global scope:
/home/dart/Program_Files/FreeOrion/FreeOrion/client/human/HumanClientApp.cpp:98:10: warning: '{anonymous}::temp_bool' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/system/error_code.hpp:214:36: warning: 'boost::system::posix_category' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/system/error_code.hpp:215:36: warning: 'boost::system::errno_ecat' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/system/error_code.hpp:216:36: warning: 'boost::system::native_ecat' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/asio/error.hpp:244:45: warning: 'boost::asio::error::system_category' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/asio/error.hpp:246:45: warning: 'boost::asio::error::netdb_category' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/asio/error.hpp:248:45: warning: 'boost::asio::error::addrinfo_category' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/asio/error.hpp:250:45: warning: 'boost::asio::error::misc_category' defined but not used [-Wunused-variable]
make[2]: *** [client/human/CMakeFiles/freeorion.dir/HumanClientApp.cpp.o] Error 1
make[1]: *** [client/human/CMakeFiles/freeorion.dir/all] Error 2
make: *** [all] Error 2

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#2 Post by Geoff the Medio »

You appear to be building against the latest GG SVN, but FreeOrion recently copied a fork of GG into its own repository, which as since been modified. You need to build against the version of GG that comes with FreeOrion SVN.

Dart
Space Krill
Posts: 9
Joined: Sun Sep 02, 2012 12:05 am

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#3 Post by Dart »

ah, the good old rtfm bug.

looks like i need to learn how to write ebuilds q.q

thanks!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#4 Post by Geoff the Medio »

Dart wrote:ah, the good old rtfm bug.
Actually, the compile instructions were probably not yet (or still aren't fully) updated for the change.

Dart
Space Krill
Posts: 9
Joined: Sun Sep 02, 2012 12:05 am

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#5 Post by Dart »

I suppose this is a silly question, but is there an alternative to doing 'make install' on GG? It's considered a sin to do make install without portage's express permission ;) (and im having a hard time doing this ebuild)

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#6 Post by Geoff the Medio »

I would imagine it's possible to build and manually move the resulting library files around without an "install" command, or to point the FreeOrion build to where they are located. It's not likely that anything else someone is building will have a Gigi dependency, so you could treat the GiGi libs as parts of the FreeOrion build, as long as the compiler and binaries can find everything they need to run. I don't really know anything about "ebuild" or Gentoo or such things, though.

hasufell
Space Krill
Posts: 6
Joined: Mon Jul 23, 2012 6:56 pm

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#7 Post by hasufell »

Geoff the Medio wrote:but FreeOrion recently copied a fork of GG into its own repository, which as since been modified.
why are those modifications not upstream?

This is not called a fork, it's called "bundle and hack".

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#8 Post by Geoff the Medio »

hasufell wrote:why are those modifications not upstream?
Because the GG maintainer has been not maintaining it for 8 months; I "bundle and hacked" after I wasn't able to contact him after several attempts. Also, some of the changes that have been made probably wouldn't be acceptable to him, but were things I wanted / needed for FO.

hasufell
Space Krill
Posts: 6
Joined: Mon Jul 23, 2012 6:56 pm

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#9 Post by hasufell »

Geoff the Medio wrote:
hasufell wrote:why are those modifications not upstream?
Because the GG maintainer has been not maintaining it for 8 months; I "bundle and hacked" after I wasn't able to contact him after several attempts. Also, some of the changes that have been made probably wouldn't be acceptable to him, but were things I wanted / needed for FO.
Why not really fork it then? In a way it's actually forked... seperately, like people can contribute to it, accepting bug reports in a proper way and such.

Otherwise this just benefits freeorion and not the community. But that requires more time, I can see that... but could eventually pull in more devs, no?

Cause Gigi is in a very bad shape and gentoo will not include it in the near future, cause it has weird compilation issues including compiler segfaults (!) depending on a) compiler/debug flags, b) gcc version c) system memory. It also bundles some libtool stuff, needs a patch for devil options, needs a patch for boost-1.49 and I probably forgot a few things

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#10 Post by Geoff the Medio »

hasufell wrote:Why not really fork it then? In a way it's actually forked... seperately, like people can contribute to it, accepting bug reports in a proper way and such.
People can contribute fixes and submit bug reports as it is now... It's just hosted in a different place.
Otherwise this just benefits freeorion and not the community.
FreeOrion's repository is open source. If someone wants to use the FO version of GiGi elsewhere, they can do so, though I doubt many would anyway.
...could eventually pull in more devs, no?
If there hasn't been any extra dev interest in the last 5 years, I don't think having a separately hosted fork is going to start helping now...
Cause Gigi is in a very bad shape and gentoo will not include it in the near future, cause it has weird compilation issues including compiler segfaults (!) depending on a) compiler/debug flags, b) gcc version c) system memory. It also bundles some libtool stuff, needs a patch for devil options, needs a patch for boost-1.49 and I probably forgot a few things
If there was any significant interest in GiGi outside of FreeOrion, this might be worthwhile, but I don't have the time to set up and maintain a separate project, and don't have the system-level / GCC / Linux compile experience to be able to meaningfully deal with any of those issues. Feel free to do so yourself, though I'd rather get more help with FreeOrion.

Dart
Space Krill
Posts: 9
Joined: Sun Sep 02, 2012 12:05 am

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#11 Post by Dart »

I managed to compule FreeOrion/GG and installed it, and ended up getting the same error message when compiling FreeOrion

does GG only need these two options?



cmake -DBUILD_TUTORIALS=off -DBUILD_OGRE_DRIVER=ON -DBUILD_OGRE_OIS_PLUGIN=ON .

Does it not require Devil, and SDL support?

edit: elaborated

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#12 Post by Geoff the Medio »

Dart wrote:I managed to compule FreeOriong/GG and installed it, and ended up getting the same error message
Then your FreeOrion build is still not finding the right GiGi headers. OgreGUI takes a path, not a string, and GUI does have a SetMouseLRSwapped function declared.
does GG only need these two options?
I don't know... Hopefully zhur or someone else who builds on Linux can comment soon?
Does it not require Devil, and SDL support?
FreeOrion does not require Devil or SDL, and GG build for FO does not require these.

Dart
Space Krill
Posts: 9
Joined: Sun Sep 02, 2012 12:05 am

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#13 Post by Dart »

I was too rash Apparently The Error message was slightly different (failed on a different file)


http://pastebin.com/2kqLLy3s

Code: Select all

[ 87%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/OptionsWnd.cpp.o
/usr/include/boost-1_49/boost/asio/error.hpp: At global scope:
/usr/include/boost-1_49/boost/asio/error.hpp:244:45: warning: 'boost::asio::error::system_category' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/asio/error.hpp:246:45: warning: 'boost::asio::error::netdb_category' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/asio/error.hpp:248:45: warning: 'boost::asio::error::addrinfo_category' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/asio/error.hpp:250:45: warning: 'boost::asio::error::misc_category' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/system/error_code.hpp:214:36: warning: 'boost::system::posix_category' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/system/error_code.hpp:215:36: warning: 'boost::system::errno_ecat' defined but not used [-Wunused-variable]
/usr/include/boost-1_49/boost/system/error_code.hpp:216:36: warning: 'boost::system::native_ecat' defined but not used [-Wunused-variable]
make[2]: *** [client/human/CMakeFiles/freeorion.dir/__/__/UI/ObjectListWnd.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/dart/Program_Files/FreeOrion/FreeOrion/UI/OptionsWnd.cpp: In member function 'void OptionsWnd::ResolutionOption()':
/home/dart/Program_Files/FreeOrion/FreeOrion/UI/OptionsWnd.cpp:674:11: warning: variable 'button_width' set but not used [-Wunused-but-set-variable]
make[1]: *** [client/human/CMakeFiles/freeorion.dir/all] Error 2
make: *** [all] Error 2
sorry for the confusion

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#14 Post by Geoff the Medio »

Dart wrote:I was too rash Apparently The Error message was slightly different (failed on a different file)
The quoted part doesn't actually contain any errors, but the pastebin does, which should be an easy fix... Try the attached patch. If it still has some similar errors about not being able to erase using a const_iterator, see if you can find the relevant declaration and change the const_iterator to just iterator when iterating over the sets or maps in ObjectListBox::Refresh.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]


Dart
Space Krill
Posts: 9
Joined: Sun Sep 02, 2012 12:05 am

Re: [gentoo linux]Compilation fails at HumanClientApp.cpp

#15 Post by Dart »

got a seg fualt


I did the patch you sent, but there were two std::map<int, std::set<int> >::const_iterator left in the file, and the file wouldnt compile. I replaced them to std::map<int, std::set<int> >::iterator
the whole shebang compiled after that...but segfualted when i tried running ./freeorion q.q



http://pastebin.com/1tfAtG3X

Post Reply