You are not logged in.
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
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)
Offline
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
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
Hi,
Any news?
I am trying to build it now.
Offline
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