User:Solrac776/Gentoo

From FreeOrionWiki
< User:Solrac776
Revision as of 17:18, 7 May 2005 by Solrac776 (Talk | contribs) (Compiling FreeOrion under Gentoo Linux [7-May-2005])

Jump to: navigation, search

Compiling FreeOrion under Gentoo Linux [7-May-2005]

I posted my experiences so that they could (hopefully) be of help to anyone else using Gentoo, I will directly help anyone I can, but keep in mind that no matter how knowledge-able I might sound on this page, I'm no guru. I found these things out through trial-and-error and by hitting up the 'Net.

Quickies: log4cpp sdl fmod

These guys were easy. Just do:

  • emerge log4cpp sdl fmod

And Gentoo portage takes care of the rest.

Boost and it's Many Masks

Boost is a bit more interesting.

FreeOrion needs at least v1.32, but my system would only install v1.31 because v1.32 is masked. To get it you need to edit /etc/portage/package.keywords

  • echo "dev-libs/boost ~x86" >> /etc/portage/package.keywords

I then had a look at Gentoo Portage Boost and guessed that v1.32-r1 would be the least problematic

  • cd /usr/portage/dev-libs/boost && emerge boost-1.32.0-r1.ebuild

GraphViz

As with Boost, Gentoo will install an older version than what FreeOrion requires. I thought that the solution would be to do echo "media-gfx/graphviz ~x86" >> /etc/portage/package.keywords (just like with boost) and then I'd get v2.2 instead of v1.13. But when compiling FO, it complained about not finding "-ldotneato".

So instead, I got GraphViz v2.2 directly from Graphviz CVS.

Now compile & install

  • ./autogen.sh && ./configure && ./make
  • (as root): make install

Issues

Manually installing GraphViz instead of emerging it, won't necessarily update your lib-path. If this happens, when you run FO, it will complain about not finding "libdotneato.so.0". Other distributions just need to do (in bash)export LDPATH=$LDPATH:/usr/local/lib/graphviz. In Gentoo, you need to update /etc/env.d/ and your env variables like this:

  • echo LDPATH=\"/usr/local/lib/graphviz\" >> /etc/env.d/99graphviz
  • env-update

...and do this in each open shell:

  • source /etc/profile

This is assuming that the GraphViz libraries are at /usr/local/lib/graphviz. To check where they are on your system, run:

  • find / -name libdotneato.so.0

...and use that path instead.

Compiling GiGi from CVS

Follow the easy instructions on getting GiGi from CVS.

Then:

  • ./autogen.sh && ./configure && ./make
  • (as root): make install

Issues

After ./configure, the script complained about my having DevIL linked with Allegro. Apparently Allegro and GiGi don't play nice. The script suggests "If you want to be able to use GiGi in Allegro-programs, run configure with the '--disable-allegro-hack' option."

Since I don't, and I don't remember what Allegro was for, I did:

  • emerge unmerge allegro && emerge devil
  • ./autogen.sh && ./configure && ./make
  • (as root): make install

Gentoo 'emerge info'

Here're my Gentoo settings (i.e. emerge info), in case this is of use to anyone. You can easily see that I'm use-flag zany.

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.10-gentoo-r6 i686)


System uname: 2.6.10-gentoo-r6 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHzGentoo Base System version 1.4.16

Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 27 2005, 22:45:39)]

ccache version 2.3 [enabled]

dev-lang/python: 2.3.5

sys-apps/sandbox: [Not Present]

sys-devel/autoconf: 2.59-r6, 2.13

sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4

sys-devel/binutils: 2.15.92.0.2-r7

sys-devel/libtool: 1.5.16

virtual/os-headers: 2.6.8.1-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"

DISTDIR="/home/gentoo/distfiles"

FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox"

MAKEOPTS="-j2"

PKGDIR="/home/gentoo/packages"

PORTAGE_TMPDIR="/portage/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="x86 3dnow X acpi aim alsa apache2 arts avi berkdb bitmap-fonts bonobo bzlib cdparanoia crypt curl dga div4linux encode esd fam fbcon flac gcj gd gdbm gif gnome gpm gstreamer gtk gtk2 hardened hardenedphp imap imlib ipv6 java jikes jpeg junit kde ldap libg++ libwww mad maildir mikmod mime mono motif mozilla mp3 mpeg msn mysql mysqli ncurses nls offensive ogg oggvorbis opengl oscar oss pam pcmcia pdflib perl php pic png pnp python qt quicktime readline samba sdl slang sndfile spell spl ssl svg svga tcpd tetex tiff truetype truetype-fonts type1-fonts unicode usb v4l vhosts videos vorbis win32codecs xine xml xml2 xmms xv xvid zlib video_cards_radeon userland_GNU kernel_linux elibc_glibc"

Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS