Circle Device


Quick Reference

Compiling FMS from Source

A while ago I got interested in the Freenet project, I still read and post from time to time on the forums but to use the active Freenet Messaging System (FMS) you must complie FMS which is written in C++ and uses the poco library.

So, download Poco, extract it and compile it. Download and compile FreeImage (if you want the new captchas). FreeImage is available at Once you have compiled all the libraries execute cmake like this (change the paths to the libraries and header files as required):

The commands below below assumes that you have a directory (call it fms) and in that directory you have the POCODIR directory, the FreeImage directory and one with FMS itself:


If not, or you are reading this and versions have changed (very likely) please change them accordingly. POCODIR is the directory that POCO is in, and POCOVER is the version in the shared object filenames:

~ $ ls poco-1.6.0/lib/Linux/x86_64/      

As you can see here, I have used 30 as my version number...

export POCODIR=../poco-1.6.0
export POCOVER=30
  -D FREEIMAGE_LIBRARY=../FreeImage/ \
  -D FREEIMAGE_INCLUDE_PATH=../FreeImage/Dist/ .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ben/fms

Then type make and you should be ready to go... I did however find that my C compiler complained about std::cerr:

In file included from /home/ben/fms/src/../include/fmsapp.h:8:0,
                 from /home/ben/fms/src/main.cpp:1:
/home/ben/fms/src/main.cpp: In function 'int main(int, char**)':
error: 'cerr' is not a member of 'std'
    std::cerr << exc.displayText() << std::endl; \
/home/ben/fms/src/main.cpp:4:1: note: in expansion of macro 'POCO_SERVER_MAIN'
CMakeFiles/fms.dir/build.make:353: recipe for target 'CMakeFiles/fms.dir/src/main.o' failed
make[2]: *** [CMakeFiles/fms.dir/src/main.o] Error 1
CMakeFiles/Makefile2:62: recipe for target 'CMakeFiles/fms.dir/all' failed
make[1]: *** [CMakeFiles/fms.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

This was easily fixed by including iostream in src/main.cpp:

#include <iostream> // I added this line...
#include "../include/fmsapp.h"
#include <Poco/Util/ServerApplication.h>


If you don't want to install the libraries (I did not) you will have to make a minor adjustment so that ./fms will word properly. For those who dont know LD_LIBRARY_PATH allows for you to include a set of directories that will be searched for shared libraries, we will make use of this useful environment variable now:

cp FreeImage/
LD_LIBRARY_PATH=../poco-1.6.0/lib/Linux/x86_64/:. ./fms

Yay, you are running your own compiled version of FMS ;-) please chat with me on the forums.

Quick Links: Techie Stuff | General | Personal | Quick Reference