[gst-devel] Patch: building gst-plugins-good against libcdio 0.78.1
Chris Clayton
chris2553 at googlemail.com
Tue Nov 21 09:05:20 CET 2006
Hi,
I've just tried to build gst-plugins-good against libcdio 0.78.1 and got a few
errors like this one:
i386-pc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I../../gst-libs -I../../gst-libs -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -g -DGST_DISABLE_DEPRECATED -O3 -march=i386 -fno-strength-reduce -MT libgstcdio_la-gstcdio.lo -MD -MP -MF .deps/libgstcdio_la-gstcdio.Tpo -c gstcdio.c -fPIC -DPIC -o .libs/libgstcdio_la-gstcdio.o
In file included from gstcdiocddasrc.c:78:
gstcdio.h:30:5: error: floating constant in preprocessor expression
In file included from gstcdio.c:25:
gstcdio.h:30:5: error: floating constant in preprocessor expression
gstcdio.c:32:6: error: floating constant in preprocessor expression
make[3]: *** [libgstcdio_la-gstcdio.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
gstcdiocddasrc.c:212:6: error: floating constant in preprocessor expression
gstcdiocddasrc.c:285:6: error: floating constant in preprocessor expression
make[3]: *** [libgstcdio_la-gstcdiocddasrc.lo] Error 1
make[3]: Leaving directory `/home/users/chris/rpm/BUILD/gst-plugins-good-0.10.3/ext/cdio'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/users/chris/rpm/BUILD/gst-plugins-good-0.10.3/ext'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/users/chris/rpm/BUILD/gst-plugins-good-0.10.3'
make: *** [all] Error 2
The error happens because in libcdio-0.78.1, LIBCDIO_VERSION_NUM is defined as
78.1. I made this patch to get the build to complete. I'm a real novice with
autotools, so it's a bit of a hack, but the patch should at least set you on
the road to a proper fix.
--- gst-plugins-good-0.10.3/ext/cdio/gstcdio.h~ 2006-11-20 17:01:42.000000000 +0000
+++ gst-plugins-good-0.10.3/ext/cdio/gstcdio.h 2006-11-20 17:31:07.000000000 +0000
@@ -27,7 +27,7 @@
GST_DEBUG_CATEGORY_EXTERN (gst_cdio_debug);
#define GST_CAT_DEFAULT gst_cdio_debug
-#if (LIBCDIO_VERSION_NUM >= 76)
+#ifdef HAVE_LIBCDIO_GE_76
#include <cdio/cdtext.h>
--- gst-plugins-good-0.10.3/ext/cdio/gstcdio.c~ 2006-11-20 17:41:32.000000000 +0000
+++ gst-plugins-good-0.10.3/ext/cdio/gstcdio.c 2006-11-20 17:41:50.000000000 +0000
@@ -29,7 +29,7 @@
GST_DEBUG_CATEGORY (gst_cdio_debug);
-#if (LIBCDIO_VERSION_NUM >= 76)
+#ifdef HAVE_LIBCDIO_GE_76
void
gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext,
--- gst-plugins-good-0.10.3/ext/cdio/gstcdiocddasrc.c~ 2006-11-20 18:52:47.000000000 +0000
+++ gst-plugins-good-0.10.3/ext/cdio/gstcdiocddasrc.c 2006-11-20 19:13:15.000000000 +0000
@@ -209,7 +209,7 @@
return (cdio_get_track_format (p_cdio, i_track) == TRACK_FORMAT_AUDIO);
}
-#if (LIBCDIO_VERSION_NUM >= 76)
+#ifdef HAVE_LIBCDIO_GE_76
static GstTagList *
gst_cdio_cdda_src_get_cdtext (GstCdioCddaSrc * src, track_t i_track)
@@ -236,8 +236,8 @@
static GstTagList *
gst_cdio_cdda_src_get_cdtext (GstCdioCddaSrc * src, track_t i_track)
{
- GST_DEBUG_OBJECT (src, "This libcdio version (%u) does not support "
- "CDTEXT (want >= 76)", LIBCDIO_VERSION_NUM);
+ GST_DEBUG_OBJECT (src, "This libcdio version does not support "
+ "CDTEXT (want >= 76)");
return NULL;
}
@@ -282,11 +282,11 @@
return TRUE; /* base class will generate 'has no tracks' error */
if (src->read_speed != -1) {
-#if (LIBCDIO_VERSION_NUM >= 76)
+#ifdef HAVE_LIBCDIO_GE_76
cdio_set_speed (src->cdio, src->read_speed);
#else
- GST_WARNING_OBJECT (src, "This libcdio version (%u) does not support "
- "setting the drive reading speed (want >= 76)", LIBCDIO_VERSION_NUM);
+ GST_WARNING_OBJECT (src, "This libcdio version does not support "
+ "setting the drive reading speed (want >= 76)");
#endif
}
--- gst-plugins-good-0.10.4/configure.ac~ 2006-11-20 20:55:51.000000000 +0000
+++ gst-plugins-good-0.10.4/configure.ac 2006-11-20 21:05:12.000000000 +0000
@@ -237,6 +237,12 @@
AC_ERROR([liboil-0.3 is required])
fi
+dnl check if libcdio version is >= 0.76
+PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.76, HAVE_LIBCDIO_GE_76=yes, HAVE_LIBCDIO_GE_76=no)
+if test "x${HAVE_LIBCDIO_GE_76}" = xyes ; then
+ CFLAGS="$CFLAGS -DHAVE_LIBCDIO_GE_76"
+fi
+
dnl checks for gstreamer
dnl uninstalled is selected preferentially -- see pkg-config(1)
GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
Hope this helps,
Chris
More information about the gstreamer-devel
mailing list