[Fwd: [Gstreamer-gstmm] Fix for compile error]
- From: José Alburquerque <jaalburquerque cox net>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: [Fwd: [Gstreamer-gstmm] Fix for compile error]
- Date: Tue, 13 Nov 2007 12:46:07 -0500
Milosz:
I sent the e-mail below to the gstreamer-gstmm list but didn't get an
answer so I'm sending it to the gtkmm-list in case the diff I sent might
be useful. Also, I'm attaching another diff (made to the autogen.sh
file) that fixes dealing with automake in such a way as to use other
versions like 1.10. Are these diff's useful?
-Jose
-------- Original Message --------
Subject: [Gstreamer-gstmm] Fix for compile error
Date: Wed, 07 Nov 2007 20:15:59 -0500
From: José Alburquerque <jaalburquerque cox net>
To: Milosz Derezynski <internalerror gmail com>,
gstreamer-gstmm lists sourceforge net
Hi Milosz. It took me a while, but I finally began seeing somewhat what
I can wrap and I thought I'd start by building what's in svn first. I
did, and I got the following compile error which I think I fixed with
the diff I'm sending you:
make[5]: Entering directory
`/home/jose/Projects/Programming/gstreamermm-devel/gst/gstmm'
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H
-DG_LOG_DOMAIN=\"gstmm\" -I../../gst -I../../gst -pthread
-I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include
-I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/gstreamer-0.10 -I/usr/include/libxml2 -g -O2 -MT
caps.lo -MD -MP -MF .deps/caps.Tpo -c -o caps.lo caps.cc
g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gstmm\" -I../../gst -I../../gst
-pthread -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include
-I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/gstreamer-0.10 -I/usr/include/libxml2 -g -O2 -MT caps.lo
-MD -MP -MF .deps/caps.Tpo -c caps.cc -fPIC -DPIC -o .libs/caps.o
caps.cc: In member function 'void Gst::Caps::simple_valist(char*, const
__va_list_tag (&)[1])':
caps.cc:151: error: invalid conversion from 'const __va_list_tag*' to
'__va_list_tag*'
caps.cc:151: error: initializing argument 3 of 'void
gst_caps_set_simple_valist(GstCaps*, char*, __va_list_tag*)'
make[5]: *** [caps.lo] Error 1
Do you think this is a good fix? Thanks.
-Jose
Index: tools/m4/convert_gst.m4
===================================================================
--- tools/m4/convert_gst.m4 (revision 78)
+++ tools/m4/convert_gst.m4 (working copy)
@@ -49,7 +49,7 @@
_CONVERSION(`GstStructure*',`Structure*',`((Structure*) ($3))')
_CONVERSION(`const Glib::RefPtr<Caps>&',`const GstCaps*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const xmlNodePtr&',`xmlNodePtr',`$3')
-_CONVERSION(`const va_list&',`va_list',`$3')
+_CONVERSION(`const va_list&',`va_list',`const_cast<va_list&>($3)')
_CONVERSION(`GstBus*',`Glib::RefPtr<Bus>',`wrap($3)')
_CONVERSION(`Format&',`GstFormat*',`(($2) &($3))')
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Gstreamer-gstmm mailing list
Gstreamer-gstmm lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gstreamer-gstmm
Index: tools/m4/convert_gst.m4
===================================================================
--- tools/m4/convert_gst.m4 (revision 78)
+++ tools/m4/convert_gst.m4 (working copy)
@@ -49,7 +49,7 @@
_CONVERSION(`GstStructure*',`Structure*',`((Structure*) ($3))')
_CONVERSION(`const Glib::RefPtr<Caps>&',`const GstCaps*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const xmlNodePtr&',`xmlNodePtr',`$3')
-_CONVERSION(`const va_list&',`va_list',`$3')
+_CONVERSION(`const va_list&',`va_list',`const_cast<va_list&>($3)')
_CONVERSION(`GstBus*',`Glib::RefPtr<Bus>',`wrap($3)')
_CONVERSION(`Format&',`GstFormat*',`(($2) &($3))')
Index: autogen.sh
===================================================================
--- autogen.sh (revision 78)
+++ autogen.sh (working copy)
@@ -1,6 +1,7 @@
#! /bin/sh
PKG_NAME=gstmm
+MIN_AUTOMAKE_VERSION=1.9
srcdir=`dirname $0`
test "x$srcdir" = x && srcdir=.
@@ -16,14 +17,31 @@
exit 1
fi
-(automake-1.9 --version) < /dev/null > /dev/null 2>&1 || {
- echo
- DIE=1
- echo "You must have automake installed to compile gstmm."
- echo "Download the appropriate package for your distribution,"
- echo "or see http://www.gnu.org/software/automake"
-}
+# awk program to transform the output of automake --version
+# into an integer value suitable for numeric comparison (taken from gtkmm).
+extract_version='{ printf "%.0f", 1000000 * v[split($1, v, " ")] + 1000 * $2 + $3; exit }'
+min_automake_version=`echo "$MIN_AUTOMAKE_VERSION" | awk -F. "$extract_version"`
+
+for version in 1.9 ""
+do
+ automake_version=`automake${version:+-$version} --version < /dev/null 2>/dev/null | awk -F. "$extract_version"`
+ if test "$automake_version" -ge "$min_automake_version" 2>/dev/null
+ then
+ automake=automake${version:+-$version}
+ break;
+ fi
+done
+
+if [ "x$automake" == "x" ]
+then
+ echo
+ echo "You must have at least version 1.9 of automake installed"
+ echo "to compile gstmm. Download the appropriate package for your"
+ echo "distribution, or see http://www.gnu.org/software/automake"
+ exit 1
+fi
+
MAKE=`which gnumake`
test -x "$MAKE" || MAKE=`which gmake`
test -x "$MAKE" || MAKE=`which make`
@@ -49,7 +67,7 @@
#autoheader
echo "Building makefiles."
-automake --add-missing || exit 1
+$automake --add-missing || exit 1
echo "Building configure."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]