User:Jaymes Kjeller/Fixing FreeType error in Fedora 15+

From Second Life Wiki
Jump to navigation Jump to search

Under some platforms (Namely Fedora 15+ and current versions of OpenSuSe and Gentoo, I think), the compilation may fail with the error:

build-linux-i686/packages/lib/release/libpangoft2-1.0.so: undefined reference to `FT_Stream_GetLong'

Or similar errors.

This is due to a problem in the UI.cmake file, and possibly with the LL-provided FreeType package. In order to get compilation to work again, try these steps:

Get the FreeType source from Mercurial.

This is easier than it sounds. Honest! :) Do this:

hg clone https://bitbucket.org/lindenlab/3p-freetype

Make sure you also copy the folder over to a working directory.

Build the package

Again, this is easier than it sounds. Go into your FT directory and type:

autobuild configure
autobuild build

This next step will be a pain, as if you were to do:

autobuild package

It won't work correctly due to how autobuild handles packaging. As a result, most of the files will be missing. In order to fix this, you will need to do this:

cd stage
tar -cvjf freetype-2.3.9-linux-<YYYYMMDD>.tar.bz2 *
md5sum freetype-2.3.9-linux-<YYYYMMDD>.tar.bz2

You can move the file anywhere, just make sure you remember it! :)

Editing the CMake file

Now, you will need to open indra/cmake/UI.cmake and add the line as shown:

34	use_prebuilt_binary(gtk-atk-pango-glib)
35	if (LINUX)
36	set(UI_LIBRARIES
	freetype
37	atk-1.0
38	gdk-x11-2.0
39	gdk_pixbuf-2.0

Save the file.

Now, with any luck, this will fix the error, and allow you to continue compiling. :)