This page contains supplementary notes on installing Fawkes under Gentoo. It is itself not necessarily a complete guide, it simply seeks to address some issues which may not be a concern on other versions of linux.

Packages to emerge

   emerge lua lua-mode toluapp gnunet opencv dev-libs/libxml libdaemon media-libs/libdc1394 

   emerge emerge dev-cpp/libglademm avahi ipp flite dev-cpp/gconfmm
    (ipp is masked and needs a use flag, but nothing beyond the usual portage stuff)

Compiling tolua++

Tried to make in fawkes-nao/src/libs/utils gives the error cannot find -ltolua++-5.1 So I installed tolua++ from source:

    - downloaded tolua++ 1.0.93 **Note, read all this section before installing, 1.0.93 has problems**
    - created new options file called custom-gentoo looking like:
		    CCFLAGS = ['-I/usr/include/lua5.1', '-O2', '-ansi']
		    LIBS = ['lua', 'dl', 'm']
		    prefix = '/usr'
		    tolua_bin = 'tolua++'
		    tolua_lib = 'tolua++-5.1'
		    TOLUAPP = 'tolua++'
    - edit SConstruct line 19: 
           opts = Options(["config_"+options_file+".py", "custom-gentoo.py", "custom_"+options_file+".py"], ARGUMENTS)           
    - edit SConstruct line 37:
           opts.Add('shared', 'Build a shared object', True)
    - scons
    - scons install

Unfortunately, tolua++ 1.0.93 is incompatible with our code,

either it's a bug or we're doing something wrong. It doesn't handle files being piped in, which is exactly what we want to do. So repeat the above steps but with 1.0.92 instead. There is one additional change required because the option to build a shared object doesn't exist in 1.0.92, so edit src/lib/SCsub at the end like this:

      if env['shared']:
	env.lib_target = env.SharedLibrary('#lib/'+env['tolua_lib'], sources)
      else:
	env.lib_target = env.Library('#/lib/'+env['tolua_lib'], sources)

termcap

termcap is not where gcc expects it so do:

    ln /lib/libtermcap.so.2.0.8 /usr/lib/libtermcap.so 

libmicrohttpd

This package doesn't have an ebuild in gentoo, so create one:

cd /usr/portage/
mkdir net-libs
cd net-libs
mkdir libmicrohttpd
wget http://gentoo.zugaina.org/portage/net-libs/libmicrohttpd/libmicrohttpd-0.4.1.ebuild
ebuild libmicrohttpd-0.4.1.ebuild manifest

Typical output is:

>>> Downloading 'ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.4.1.tar.gz'
--2009-10-15 08:54:01--  ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.4.1.tar.gz
           => `/usr/portage/distfiles/libmicrohttpd-0.4.1.tar.gz'
Resolving ftp.gnu.org... 140.186.70.20
Connecting to ftp.gnu.org|140.186.70.20|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /gnu/libmicrohttpd ... done.
==> SIZE libmicrohttpd-0.4.1.tar.gz ... 834454
==> PASV ... done.    ==> RETR libmicrohttpd-0.4.1.tar.gz ... done.
Length: 834454 (815K)

27% [=====================================> ]

Then emerge. (The package is masked by default, add it to /etc/portage/packages.keywords as per normal)

emerge libmicrohttpd

avahi

I had problems installing this because it couldn't find qt-mt. This could be because my packages were in a conflicted state. I found a gentoo wiki entry which suggested

source /etc/profile
emerge avahi

and this worked. Unexplained.