You are not logged in.

#1 2011-06-23 03:31:13

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

[REQUEST] Cities3D

Cities3D is now open source and found  at: https://github.com/saladyears/Cities3D

For all the Settlers of Catan fans out there, this is a pretty decent version.  Nice graphics, there is sound, and it has the Cities & Knights expansion.

The biggest down side (compared to something like pioneers) is that there's no AI.  You can either play multi-player via network, or hotseat.

I've only used the pre-built Windows binaries and would love to have a Linux build.

I downloaded the source and tried to build it, but ran into some issues.  First thing is that several shell/perl scripts need to be set executable.  I was a bit conservative and didn't want to just make everything 755, so I ran:

find . -type f -exec file {} \; | grep -i executable | cut -f1 -d: | xargs chmod 755

Running ./build.sh gives brief usage that led me to try the following:

./build.sh release boost

lots of output, appears to have worked.

./build.sh release fmod

almost no output, appears to have worked.

./build.sh release glew

which failed with:

/usr/bin/ld: cannot open output file lib/libGLEW.so.1.3.5: No such file or directory
collect2: ld returned 1 exit status
make: *** [lib/libGLEW.so.1.3.5] Error 1

fixed with mkdir glew-build/lib

next error:

/usr/bin/ld: cannot open output file bin/glewinfo: No such file or directory
collect2: ld returned 1 exit status
make: *** [bin/glewinfo] Error 1

fixed with mkdir glew-build/bin

On to

./build.sh release wxWidgets

which errors out with:

configure: error: OpenGL libraries not available
make: *** No targets specified and no makefile found.  Stop.

Is there some other package I'm missing?  Is there a better way to fix the build for glew? 

If I try to continue, I get an error with cryptopp:

cryptlib.cpp:32:26: error: uninitialized const 'CryptoPP::g_nullNameValuePairs' [-fpermissive]
cryptlib.h:319:20: note: 'const class CryptoPP::NullNameValuePairs' has no user-provided default constructor
make: *** [cryptlib.o] Error 1

And that's where I'm stuck... and maybe I'm going about this wrong... do I even need to build those parts?  Can I use boost, wxWidgets, etc from existing Arch packages?

Suggestions welcome!

Offline

#2 2011-06-23 04:30:30

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: [REQUEST] Cities3D

Can you opt to use system libraries instead of building as part of the package?
Instead of using the build.sh script, make sure that boost, glew etc are build deps and see if you can just build the main package via configure script directly.
I don't have much experience with PKGBUILDS but that's what I would try.

Last edited by sand_man (2011-06-23 04:33:09)


neutral

Offline

#3 2011-06-23 10:13:22

SidK
Member
Registered: 2011-03-03
Posts: 116

Re: [REQUEST] Cities3D

By modifying build.sh should can send the parameters to configure which make it use the system's boost, fmod etc.
I did boost and fmod by first installing boost and fmodex via pacman as follows:

pacman -S boost fmodex

And in the trunk folder of the git pull:

sed -i 's#BOOST_PREFIX_RELEASE="\$INSTALL_ROOT/boost-install-release"#BOOST_PREFIX_RELEASE="/usr/include/boost/fusion"#' build.sh
sed -i 's#FMOD_PREFIX_RELEASE="\$INSTALL_ROOT/fmod-install"#FMOD_PREFIX_RELEASE="/usr/include/fmodex"#' build.sh

Boost works just fine, however fmod doesn't, because cities3d is pretty picky about which versions it uses. In fact it's picky about boost too, so using the system's boost library may break if the library is updated and the game doesn't catch up. You could create AUR versions of fmodex which are the versions cities3d uses (3.74.1, 3.7.5 or 4.24.05). I didn't get to glew/wxWidgets, but I presume similar modifications to build.sh's call to the configure script would allow it to use system libraries.

Last edited by SidK (2011-06-23 12:21:00)

Offline

#4 2011-06-29 02:27:28

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Re: [REQUEST] Cities3D

I'm going with the premise that it'd be easier for me to build the included boost, fmod, etc than to make Cities3D build with the newer versions from Arch.

So I built the included boost, fmod and glew (crypto++ looks like it only builds an exe).  WxWidgets is where I ran into trouble... it has its own GSocket class that conflicts with my installed glibc.

I tried using Arch's wxWidgets, but I get a ton of errors, e.g.:

In file included from /space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/RulesCore/RulesCore.bulkbuild.cpp:20:0:
/space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/RulesCore/KeyMapEngine.cpp: In member function 'void KeyMapEngine::ProcessRuleSet(const RuleSetPtr&)':
/space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/RulesCore/KeyMapEngine.cpp:307:16: error: cannot pass objects of non-trivially-copyable type 'const class wxString' through '...'
/space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/RulesCore/KeyMapEngine.cpp: In member function 'void KeyMapEngine::SaveOverrides()':
/space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/RulesCore/KeyMapEngine.cpp:340:45: error: no matching function for call to 'json_spirit::Pair_impl<std::basic_string<wchar_t> >::Pair_impl(const wxString&, json_spirit::wValue)'
/space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/RulesCore/KeyMapEngine.cpp:340:45: note: candidates are:
/space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/json_spirit/json_spirit_value.h:329:5: note: json_spirit::Pair_impl<String>::Pair_impl(const String&, const json_spirit::Value_impl<String>&) [with String = std::basic_string<wchar_t>]
/space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/json_spirit/json_spirit_value.h:329:5: note:   no known conversion for argument 1 from 'const wxString' to 'const std::basic_string<wchar_t>&'
/space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/json_spirit/json_spirit_value.h:92:12: note: json_spirit::Pair_impl<std::basic_string<wchar_t> >::Pair_impl(const json_spirit::Pair_impl<std::basic_string<wchar_t> >&)
/space/source/cities3d-2/Cities3D/trunk-3/Cities3D/src/json_spirit/json_spirit_value.h:92:12: note:   candidate expects 1 argument, 2 provided

This is where I'm stuck.

Other ideas I have:
- downgrade my wxgtk pkg to match the 2.8.10 that is bundled with the Cities3D source (although I only have back to 2.8.11-1, dated 2010.06.17).
- try to find a binary from another distro and see if I can just run that.

Not sure if either of these will get me anywhere.

Offline

#5 2013-02-23 22:28:18

technic
Member
Registered: 2012-09-02
Posts: 7

Re: [REQUEST] Cities3D

Hi,
Any news?
I am trying to build it now.

Offline

#6 2013-02-24 00:05:22

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [REQUEST] Cities3D

Technic:  Welcome to Arch.  I am going to leave this thread open, but be aware -- it is almost two years old...


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB