From: Chris C. <chr...@go...> - 2006-11-21 08:05:30
|
Hi, I've just tried to build gst-plugins-good against libcdio 0.78.1 and got a = few errors like this one: =A0i386-pc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -pthread -I/usr/includ= e/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= =2D2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I../../gst-libs = =2DI../../gst-libs -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/gl= ib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -g -DGST_DI= SABLE_DEPRECATED -O3 -march=3Di386 -fno-strength-reduce -MT libgstcdio_la-g= stcdio.lo -MD -MP -MF .deps/libgstcdio_la-gstcdio.Tpo -c gstcdio.c =A0-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. =2D-- gst-plugins-good-0.10.3/ext/cdio/gstcdio.h~=A02006-11-20 17:01:42.000= 000000 +0000 +++ gst-plugins-good-0.10.3/ext/cdio/gstcdio.h=A0=A02006-11-20 17:31:07.000= 000000 +0000 @@ -27,7 +27,7 @@ =A0GST_DEBUG_CATEGORY_EXTERN (gst_cdio_debug); =A0#define GST_CAT_DEFAULT gst_cdio_debug =A0 =2D#if (LIBCDIO_VERSION_NUM >=3D 76) +#ifdef HAVE_LIBCDIO_GE_76 =A0 =A0#include <cdio/cdtext.h> =A0 =2D-- gst-plugins-good-0.10.3/ext/cdio/gstcdio.c~=A02006-11-20 17:41:32.000= 000000 +0000 +++ gst-plugins-good-0.10.3/ext/cdio/gstcdio.c=A0=A02006-11-20 17:41:50.000= 000000 +0000 @@ -29,7 +29,7 @@ =A0 =A0GST_DEBUG_CATEGORY (gst_cdio_debug); =A0 =2D#if (LIBCDIO_VERSION_NUM >=3D 76) +#ifdef HAVE_LIBCDIO_GE_76 =A0 =A0void =A0gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, =2D-- gst-plugins-good-0.10.3/ext/cdio/gstcdiocddasrc.c~=A0=A02006-11-20 18= :52:47.000000000 +0000 +++ gst-plugins-good-0.10.3/ext/cdio/gstcdiocddasrc.c=A0=A0=A02006-11-20 19= :13:15.000000000 +0000 @@ -209,7 +209,7 @@ =A0 =A0return (cdio_get_track_format (p_cdio, i_track) =3D=3D TRACK_FORMAT_= AUDIO); =A0} =A0 =2D#if (LIBCDIO_VERSION_NUM >=3D 76) +#ifdef HAVE_LIBCDIO_GE_76 =A0 =A0static GstTagList * =A0gst_cdio_cdda_src_get_cdtext (GstCdioCddaSrc * src, track_t i_track) @@ -236,8 +236,8 @@ =A0static GstTagList * =A0gst_cdio_cdda_src_get_cdtext (GstCdioCddaSrc * src, track_t i_track) =A0{ =2D =A0GST_DEBUG_OBJECT (src, "This libcdio version (%u) does not support " =2D =A0 =A0 =A0"CDTEXT (want >=3D 76)", LIBCDIO_VERSION_NUM); + =A0GST_DEBUG_OBJECT (src, "This libcdio version does not support " + =A0 =A0 =A0"CDTEXT (want >=3D 76)"); =A0 =A0return NULL; =A0} =A0 @@ -282,11 +282,11 @@ =A0 =A0 =A0return TRUE; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* base class will g= enerate 'has no tracks' error */ =A0 =A0 =A0if (src->read_speed !=3D -1) { =2D#if (LIBCDIO_VERSION_NUM >=3D 76) +#ifdef HAVE_LIBCDIO_GE_76 =A0 =A0 =A0cdio_set_speed (src->cdio, src->read_speed); =A0#else =2D =A0 =A0GST_WARNING_OBJECT (src, "This libcdio version (%u) does not sup= port " =2D =A0 =A0 =A0 =A0"setting the drive reading speed (want >=3D 76)", LIBCDI= O_VERSION_NUM); + =A0 =A0GST_WARNING_OBJECT (src, "This libcdio version does not support " + =A0 =A0 =A0 =A0"setting the drive reading speed (want >=3D 76)"); =A0#endif =A0 =A0} =A0 =2D-- gst-plugins-good-0.10.4/configure.ac~=A0=A0=A0=A0=A0=A0=A02006-11-20 = 20:55:51.000000000 +0000 +++ gst-plugins-good-0.10.4/configure.ac=A0=A0=A0=A0=A0=A0=A0=A02006-11-20 = 21:05:12.000000000 +0000 @@ -237,6 +237,12 @@ =A0 =A0AC_ERROR([liboil-0.3 is required]) =A0fi =A0 +dnl check if libcdio version is >=3D 0.76 +PKG_CHECK_MODULES(LIBCDIO, libcdio >=3D 0.76, HAVE_LIBCDIO_GE_76=3Dyes, HA= VE_LIBCDIO_GE_76=3Dno) +if test "x${HAVE_LIBCDIO_GE_76}" =3D xyes ; then + =A0 =A0CFLAGS=3D"$CFLAGS -DHAVE_LIBCDIO_GE_76" +fi + =A0dnl checks for gstreamer =A0dnl uninstalled is selected preferentially -- see pkg-config(1) =A0GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ]) Hope this helps, Chris |