Building on FreeBSD

From Gnash Project Wiki

Jump to: navigation, search

As of mid Feb, 2008, Gnash builds out of the box on FreeBSD 6.3, using g++ 3.3.5. Here's the data on my system's configuration. This is a completely up to date OpenBSD installation, so if you have any problems, some of your packages may be out of date, or missing.

$ uname -a
FreeBSD x86-freebsd-63.welcomehome.org 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 04:45:45 UTC 2008     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  i386
$ head -1 /etc/motd
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008

While Gnash does build with the older GCC used by default on FreeBSD, the newer 4.2.x version also builds Gnash just fine. The older GCC has problems with optimizing however, and several files can't be compiled at -O2. Several builds of GCC 4.2.x are available, and work better at the higher optimization levels.

$ g++ -v 
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.6 [FreeBSD] 20060305

Gnash has several dependencies on system libraries to compile. These are primarily

$ pkg_info | & egrep "curl|agg|boost|gtk|kde|qt|atk|pango|cairo|sdl|jpeg|png|gstreamer"
agg-2.5_2           A High Quality Rendering Engine for C++
atk-1.20.0          A GNOME accessibility toolkit (ATK)
boost-1.34.1        Free peer-reviewed portable C++ source libraries
cairo-1.4.10_1      Vector graphics library with cross-device output support
curl-7.16.3         Non-interactive tool to get files from FTP, GOPHER, HTTP(S)
gstreamer-0.10.14_1 Development framework for creating media applications
gtk-2.12.1_1        Gimp Toolkit for X11 GUI (current stable version)
gtkglext-1.2.0_1    An OpenGL extension to GTK
jpeg-6b_4           IJG's jpeg compression utilities
pango-1.18.3        An open-source framework for the layout and rendering of i1
png-1.2.22          Library for manipulating PNG images
qt-3.3.8_6          Multiplatform C++ application framework
qt4-corelib-4.3.1_1 Qt core library
qt4-gui-4.3.1       Qt graphical user interface library
qt4-network-4.3.1   Qt network library
qt4-qt3support-4.3.1 Qt3 compatibility library
qt4-sql-4.3.1       Qt SQL library
qt4-xml-4.3.1       Qt XML library
sdl-1.2.11_1,2      Cross-platform multi-media development API



Note: This last part is old content, left here in case it's useful

Q: With FreeBSD 6.1-RELEASE I run ./autogen.sh and get:

processing ./libltdl
Running libtoolize --force --copy ...
You should update your `aclocal.m4' by running aclocal.
You should update your `aclocal.m4' by running aclocal.
Running aclocal ...
aclocal: cannot open > aclocal.m4: Permission denied
Running autoheader...
Running automake --add-missing --copy ...
Running autoconf ...
autom4te: cannot open configure: Permission denied

Though "configure" is created

A: The error messages appear to originate in libltdl/ (which has its own configure.ac and aclocal.m4).

The libtool installation on FreeBSD has the libltdl files (which are copied by libtool --ltdl when called by autogen.sh) readonly (u-w) in $installpath/share/libtool/ltdl. When the permissions are set to u+rw, the error messages go away.

Suggested workaround from Germain Le Chapelain (user germ on sourceforge):

--- autogen.sh 29 Dec 2006 01:12:20 -0000 1.22
+++ autogen.sh 23 Mar 2007 04:21:24 -0000
@@ -168,6 +168,7 @@
${AUTOMAKE:-automake} --add-missing --copy $am_opt
fi
echo "Running autoconf ..."
+ chmod -vr u+w *
${AUTOCONF:-autoconf}
)
fi