• Phlox


    September 23, 2012 by Phlox
    sudo apt-get -y install subversion libx11-dev build-essential make zlib1g-dev libgtk2.0-dev libgtk-3-dev autoconf libtool

    Download curl (link)

    cd to curl dir ./configure make sudo su make install


    svn co svn:// freeciv


    ./ --enable-client=gtk-2.0 --with-libiconv-prefix=/usr

    Eclipse- Ubuntu software center

    • subversion: Subclipse at
    • python-dev
    • autotools (incubation)
    • CDT latest (for Indigo, this is currently at

    • if "permission denied" error on a configure or bash script run, try "chmod 744 [filename]"
    Read more >
  • Phlox

    Eclipse Debug setup

    September 17, 2012 by Phlox
    • Eclipse version downloaded was “Classic”, and was selected from this list (here). I downloaded latest, version 4.2.
    • Opened Zip file and moved to c:\programs\Eclipse
    • Clicked on Eclipse.exe in that folder to initialise. It asks for a workplace folder. I set it to a different volume- in my case K:\EcProj
    • Eclipse menu item Help > Install new software, url chose was the first default- I think it said Juno something. The entries are not there anymore so TBD- verify name on next install.
      • Clicked Programming tools. All the C / C++ checkboxes.
    • This might be wrong, but what I did after it reloaded was a File.Import.Import. C/C++. Import code as a makefile project. Then I pointed to the root directory of my FC source directory.
    • Menu Run.Debug Config…
    Read more >
  • Phlox

    GUI-SDL debug- first impressions

    September 17, 2012 by Phlox

    Ok, so I made tje sdl client with -DDEBUG -g Followed the same Studio setup as in User blog:Phlox/Visual Studio- WinGDB setup, only change was the exe name Set a breakpoint in dummy's SDL main and stepped down into it. It got pretty far but barfed on the theme. Client.log says

    in gui_clear_theme() [themes.c::57]: No gui-sdl theme was found.

    Ok, no problem. This was in data\themes directory. Copied that to my test directory and I got the splash screen. Load game had the list of files... There were redraw errors after the selection, and the file did not seem to load because nothing happenned on start. I can checkpoint debug that later. But I could back out and go to Local network game and access a server I had runinng with a loaded game f…

    Read more >
  • Phlox

    Ifdef survey

    September 16, 2012 by Phlox

    Root directory CONFIGURE file has lots of interesting flags that are largely unused.


    Aside from DEBUG and one time/ low frequency tags, these are the flags of note:

    • WIN32_NATIVE
    • GGZ_GTK
    • UNDER_CE

    Lots of fiddly ones about Lang, Net, sys

    • DONE_BY_create_city_virtual

    utility\timing.c has a number of code fragments protected with #ifdef HAVE_FTIME. timing.c gets them from included file config.h config.h is generated by automake utilities. The control file is Configure. in the root directory.

    Configure. has a line:

    #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1

    This is part of a loop that evaluates a dozen properties and assigns a HAVE_[propertyName] fl…

    Read more >
  • Phlox

    SDL build

    September 15, 2012 by Phlox

    Using the previous MinGW/MSYS environment that I have been using for GTK2.0 client builds, I took the following steps

    • attempt to config using ./ --enable-client=sdl --with-libiconv-prefix=/usr
    • dies with checking for SDL-version = 1.1.4... no
    • Download SDL 1.2.15 libraries
      • SDL-devel-1.2.15-mingw32.tar.gz (Mingw32) from this page - see development libraries section.
    • copied to home/sdl1_2, typed make native. This copied stuff to local\include and lib.
    • re-autogen, dies with IMG_Load in
    • download VC notation is alarming, but there is no mingw ver.
    • zip has just inc and lib. copied stuff to local\include and lib.
    • autogen dies same place
    • This forum post d…
    Read more >
  • Phlox

    Tracing a call

    September 14, 2012 by Phlox

    In the server code, in response to a load, you can watch it in stdinhand.c load_command() in the save file which is a compressed version of what looks like a .ini structure file. Just a guess but from the dates this project was started, the developers who put this in probably had no xml option at the time. They apparently wanted a lightweight database that was high enough performance, and text based so that naive users could manipulate it.

    Set a breakpoint at do_move_unit in control.c, then do a move. Resulting stack most recent order looks like this:

    • do_move_unit
      • handle_unit_packet_common
        • handle_unit_info
          • client_handle_packet
            • client_packet_input
              • input_from_server
                • get_net_input

    Crikies. They are doing a net IO for every tiny bit of a move trans…

    Read more >
  • Phlox

    First debug sessions

    September 13, 2012 by Phlox

    Using WinDBG has been going along ok. Step in step out, moving around the stack, setting the breakpoints works well enough.

    Some things seem way way wrong.

    • error messages on watching some variables, suggesting they are either out of scope, or have illegal/ unitialized values. In many of these cases, the program worked just fine.
    • non watchable variables that display "optimized out" when I try to click and inspect them.

    I haven't built with robust debug and gdb compile time helper flags- if any such exist. That's next up.

    • Setting environment variable CLIENT_CFLAGS=-DDEBUG at the msys command line may enable a bunch of the debug diagnostic messages.
    Read more >
  • Phlox

    AutoHell IV- MSYS revisted

    September 11, 2012 by Phlox

    Huh. I reloaded a clean directory of Freeciv2_3. Tried autogen.h, blows up at aclocal step with

    aclocal: macro `_LT_DECL_SED' required but not defined aclocal: macro `_LT_FUNC_STRIPNAME_CNF' required but not defined aclocal failed - check that all needed development files are present on system

    Swell. My old directory with 2.3 tree builds just fine.

    Just Swell.

    Can I get a ticket home now? Why does this have to be so fricking arcane and non repeatable?


    Oh, looking at the M4 directory, I see I have some entries there that aren't there in the clean tree:

    • libtool.m4
    • ltoptions.m4
    • ltsugar.m4

    Ok copied those over... negative result. But the prefixes of the error suggest it is some sort of libtool initialization that was not performed. But why…

    Read more >
  • Phlox

    Visual Studio- WinGDB setup

    September 11, 2012 by Phlox

    It is possible to use Visual Studio with the Freeciv codebase to build and test revisions to the GTK client.

    • Install a build setup conforming to the instructions for installing MinGw and MySys on the Install-Windows page. This does not require Cygwin.
    • Install Visual studio 2010 trial. I used professional from this location. According to some notes I have seen on developer sites, MS never expires the trial. Don't know if that is true.
    • Install WinGDB. Some notes to orient you to a MinGw setup may be found here. Ignore the details regarding Cygwin. If you are not familiar with the Cygwin environment, this information concerns a separate setup that we aren't using.
    • Config using automake- and build using Mysys command line.
    ./ --ena…
    Read more >
  • Phlox

    Locked In code

    September 10, 2012 by Phlox

    Producing code that works cross platform is a significant feat. Producing code that builds using different compilers and build environments is the next level of horror.

    Of course, the easy out is to say your platform is the best, and your favorite compiler/ build tool environment is the best and everyone should just convert to your right way of thinking. At any one time, one of the persons is probably close to the truth regarding either point. The trouble is, that there are many others in the room and it is more inclusive if our collaboration did not have a "my way of the highway" level of chauvinism concerning the neglect for accommodating other popular tools and platforms.

    I don't think any of this is particularly intentional. If your …

    Read more >
  • Phlox

    A New Phase

    September 9, 2012 by Phlox

    Update on the Build saga.

    1. I got Freeciv 2.3 to build using MinGW/MSys.
    2. I got CMake to create makefiles for Visual studio which would enter into the compile step
    3. I discovered the code makes use of non C99 ideas like empty structs which have undefined behavior, and technically are illegal under rules for C. GCC allows it.
    4. The 2.3 code uses Assembler to inititialize structures. It is not clear the rational for this, since it can easily be done in C.
    5. Someone fixed the assembler code in shared.c and shared.h, and so 2.4 looks cleaner. Examining the code, there has been a raft of changes, so writing code for the stable 2.3 release may not have as much transfer ability to the current tree.
    6. Attempting the CMakes for 2.4, It appears the current checki…
    Read more >
  • Phlox

    AutoHell III- MSYS approach

    September 2, 2012 by Phlox

    OK, so in previous episodes of this sadistic game before the game, I had followed instructions for Cygwin builds using MinGW.

    Half way through that, I tried running MSYS which is auto installed as part of MinGW, and got through the config step. That configuration got blown away while attempting to load python which was needed for the make in the utility directory.

    Here is were we rejoin our intrepid FreeCiv builder. It has been 9 days and we haven't yet been able to build this puppy. But we are patient.

    We will attempt to build a stable release (freeciv 2.3) from the current svn tree. We will install the most recent MinGW with tools, and otherwise follow instructions on the Install-Windows page, making notes so that we can reproduce instr…

    Read more >
  • Phlox

    back to square one

    September 1, 2012 by Phlox

    Ok, the validate Windows build page was hopelessly out of date and broken after several tries clean reinstalls with different versions of tools on two machines. Oddly, the glorious config software produced a bewildering set of new errors if minor variations in tool versions or locations was attempted. I suspect people hack the config to make it work the first time and afterwards just do makes and ignore the horror of installation in favor of getting to messing with the real code.

    It's no way to run a railroad. Cross platform development is tough especially with a codebase that is destabilized by constantly updated tools. Too early to form an opinion about why this makefile setup is so impossibly difficult for novices to attempt. It see…

    Read more >
  • Phlox

    This morning I figured out my install of automake was just fine, only someone had put in a hack in the autogen script to force a the 1.8 version of automake which means it will barf on other systems..

    Ok, so now I figured maybe the 2.4 tree is not so clean so I went to the 2.3 tree.


    Autogen was saved with \r's, against project guidelines. Ok cleaned that.

    • Oops, fc_version too.

    Those were the only two, but shoot.

    Didn't help because the build belches on "Iconv missing" though it is right there in the bin directory next to automake and all the other tools. Must be wrong ver. Crikees!

    Surely they do validate builds. Yes! Compile-Windows-Authentication documents the setup

    Ok, start from scratch reinstall everything according to these inst…

    Read more >
  • Izaroc13

    Quick industrialized

    June 13, 2010 by Izaroc13

    Can somebody please explain to me how to get industrialized and have great war vehicles quickly. I always get them right at the end of the game, while the other players have them as early as the 1500s. I could really use some help here.

    Read more >

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.