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.
]]>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.
]]>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!
]]>