gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] [patch] Fix linker problem with current CVS, and enable more


From: Petter Reinholdtsen
Subject: [Gnash-dev] [patch] Fix linker problem with current CVS, and enable more warnings
Date: Tue, 28 Mar 2006 23:26:59 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (usg-unix-v)

I just had a look at gnash, trying to make a working Debian package
based on the CVS source and the build rules available from
<URL:http://bugs.debian.org/347352>.  I ran into a linker problem in
libgeometry/, because a method from libbase/tu_random.cpp was used but
not linked in.  This patch solve the issue:

Index: libgeometry/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/libgeometry/Makefile.am,v
retrieving revision 1.11
diff -u -3 -p -u -r1.11 Makefile.am
--- libgeometry/Makefile.am     9 Mar 2006 19:29:06 -0000       1.11
+++ libgeometry/Makefile.am     28 Mar 2006 21:04:49 -0000
@@ -82,6 +82,7 @@ noinst_HEADERS = \

 #libgeometry_la_LDFLAGS = -module -avoid-version -no-undefined
 #libgeometry_la_LIBDADD =  address@hidden@  # $(LIBLTDL)
+libgnashgeo_la_LIBADD = -L../libbase -lgnashbase

 # Rebuild with GCC 4.x Mudflap support
 mudflap:


While testing, I notice that the source build with very few compiler
warnings enabled by default.  I suggest adding more warning flags to
the build, for example like this:

Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.52
diff -u -3 -p -r1.52 configure.ac
--- configure.ac        26 Mar 2006 01:00:00 -0000      1.52
+++ configure.ac        28 Mar 2006 21:22:53 -0000
@@ -253,6 +253,29 @@ if test x"$EXEEXT" == "exe"; then
   AC_DEFINE(HAVE_WINSOCK,1,[This is defined is we are on Win32])
 fi

+if test "$GCC" = "yes"; then
+  # Source do not build with -ansi -pedantic yet
+  CXXFLAGS="$CXXFLAGS \
+      -W \
+      -Wall \
+      -Wcast-align \
+      -Wcast-qual \
+      -Wpointer-arith \
+      -Wreturn-type \
+      "
+  CFLAGS="$CFLAGS \
+      -W \
+      -Wall \
+      -Wcast-align \
+      -Wcast-qual \
+      -Wpointer-arith \
+      -Wreturn-type \
+      -Wmissing-declarations \
+      -Wmissing-prototypes \
+      -Wstrict-prototypes \
+      "
+fi
+
 dnl AC_CONFIG_LINKS(doc/C/images)
 plugmk=""
 if test x"$plugin" = x"yes"; then

I recommend setting the warning flags in configure.in instead of in
each individual Makefile.am, as -Wall isn't supported by a lot of UNIX
compiler, for example on Irix, Tru64 Unix and HP-UX.

Do you plan to release a tarball soon?  It would make it easier to
make a debian package if such tarball existed.

I did not get as far as I wanted with my testing.  I hope to get my
test flash page available from <URL:http://www.boinydalen.no/> working
at least with a stand alone flash player. :)

BTW: Please add info on where to report bugs and patches in the
  README.  I was inclined to send this email to the maintainer address
  listed in AUTHORS, but found this list address on the project web
  pages and decided to use it instead. :)

Friendly,
-- 
Petter Reinholdtsen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]