An Oracle blog about Openomics

  • sun
    March 14, 2010

Welcome Freeciv 2.2 to Solaris

Guest Author

Freeciv 2.2.0, a new major release of the open-source civilization-building strategy game, was out last month. I have built it for (Open)Solaris x86 --with the SDL client-- on a Solaris 10 Update 8 system --that's the latest Solaris 10 update to date, released 10/2009-- using the same steps that worked for Freeciv 2.1.9. I did have though to comment out the typedef on line 96 in common/featured_text.h after I ran into the following error :

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../utility -I./aicore -DLOCALEDIR=\\"/usr/local/share/locale\\" "-DDEFAULT_DATA_PATH=\\".:data:~/.freeciv:/usr/local/share/freeciv\\"" -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -g -O2 -MT featured_text.lo -MD -MP -MF .deps/featured_text.Tpo -c featured_text.c -o featured_text.o
In file included from featured_text.c:34:
featured_text.h:96: error: conflicting types for 'offset_t'
/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/include/sys/types.h:233: error: previous declaration of 'offset_t' was here

I need to let the Freeciv developers know of the above but, in the meantime, this workaround seems to work.

Under Solaris, you will need to install libSDL, libSDL_mixer and libSDL_image under /usr/local on your system, for Freeciv to work. For your convenience, they all are available pre-built at opensolaris.free.fr, along with the new Freeciv 2.2.0 package. Note that Freeciv 2.2 is now run by typing freeciv-sdl and no longer civclient. This is how it looks on my Solaris 10 desktop:

As a side note, I am not providing a GTK-based client/package because it does not compile on Solaris 10 to date. Freeciv 2.2.0 uses the GTK_STOCK_EDIT Gnome 2.6 feature that is apparently not available in the version of Gnome that comes with Solaris 10 and Java Desktop System 3. As a result, I am getting the following error at compilation time:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I./../include -I../../utility -I../../common -I../../common/aicore -I./../agents -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DLOCALEDIR=\\"/usr/local/share/locale\\" "-DDEFAULT_DATA_PATH=\\".:data:~/.freeciv:/usr/local/share/freeciv\\"" -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -g -O2 -MT chatline.lo -MD -MP -MF .deps/chatline.Tpo -c chatline.c -o chatline.o
chatline.c: In function `chatline_init':
chatline.c:1263: error: `GTK_STOCK_EDIT' undeclared (first use in this function)
chatline.c:1263: error: (Each undeclared identifier is reported only once
chatline.c:1263: error: for each function it appears in.)

It should compile on OpenSolaris though and I will try compiling it on the OpenSolaris 2010.03 release due later this month.

While I was at it, I also built the latest Freeciv 2.1.11 update from the 2.1 release branch, so the current 2.1 players can be up-to-date with respect to bug fixes. You can download both GTK and SDL clients from opensolaris.free.fr as well.

Join the discussion

Comments ( 3 )
  • Frederic Pariente Monday, March 15, 2010

    FYI I did inform today the Freeciv developers about the offset_t issue by raising BugID 15627 at https://gna.org/projects/freeciv/.

    See https://gna.org/bugs/index.php?15627

    HTH, Frederic.

  • ulrik Thursday, April 1, 2010

    Both bugs are fixed in SVN, will be in 2.2.1 when it comes. Report all compile errors, Solaris-related or dependency-related or whatever to the bug tracker. Thanks!

  • Tatjana Heuser Wednesday, June 2, 2010

    In 2.2.1, client/cityrepdata.c uses isfinite(), which doesn't exist on Solaris 10. Fastest fix was to patch the call to use finite() instead. Another approach is described at http://www.nexenta.org/os/Porting_Codefixes


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.