GNOME Bugzilla – Bug 663600
[subparse] - not get cross compiled
Last modified: 2014-05-22 15:05:03 UTC
The current command line to configure the gst-plugins-base-0.10.32 has the parameter --prefix=/usr. It is correct if from the target point of view. But when configure gst-plugins-base-0.10.32, in gst-plugins-base-0.10.32/configure ========================================================================== GST_CONFIGPATH=`$PKG_CONFIG --variable=includedir gstreamer-0.10`"/gst/gstconfig.h" It will try to find the includedir with pk-config [root@fedora14 gst-plugins-base-0.10.32]# cat /opt/STM/STLinux-2.4/devkit/sh4/target/usr/lib/pkgconfig/gstreamer-0.10.pc prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include/gstreamer-0.10 toolsdir=${exec_prefix}/bin pluginsdir=${libdir}/gstreamer-0.10 datarootdir=${prefix}/share datadir=${datarootdir} girdir=${datadir}/gir-1.0 typelibdir=${libdir}/girepository-1.0 Name: GStreamer Description: Streaming media framework Requires: glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0, libxml-2.0 Version: 0.10.34 Libs: -L${libdir} -lgstreamer-0.10 Cflags: -I${includedir} ============================================================================== But unfortunately, it will try to find the header file at /usr/include/gstreamer-0.10/gst/gstconfig.h. And it should find this header file at: =============================================================================== [root@fedora14 gst-plugins-base-0.10.32]# ls /opt/STM/STLinux-2.4/devkit/sh4/target/usr/include/gstreamer-0.10/gst/gstconfig.h /opt/STM/STLinux-2.4/devkit/sh4/target/usr/include/gstreamer-0.10/gst/gstconfig.h =============================================================================== So I think this one should be gstreamer cross compile issue. And gstreamer should consider the environment variable which indicates the target file system location: (in my example) export PKG_CONFIG_SYSROOT_DIR=/opt/STM/STLinux-2.4/devkit/sh4/target/ And the configure.ac should be changed as below: (patch attaced also) ================================================================== GST_CONFIGPATH=`$PKG_CONFIG --variable=includedir gstreamer-0.10`"/gst/gstconfig.h" +GST_CONFIGPATH=$PKG_CONFIG_SYSROOT_DIR$GST_CONFIGPATH
Created attachment 200955 [details] [review] patch to fix the subparse cross compilation
If we need to know the features that are compiled in to libgstreamer, then a) we have already failed, and b) this information should go into the gstreamer-0.10.pc file. We shouldn't go digging into the gstconfig.h file.
Er, a) is supposed to be "the empire has already won".
(In reply to comment #3) > Er, a) is supposed to be "the empire has already won". sorry, don't understand. I am not native english speaker. I just add $PKG_CONFIG_SYSROOT_DIR in cofigure.ac.
Created attachment 211346 [details] [review] simplified patch Tested in an OpenEmbedded environment.
Is this still a problem with 1.0? GStreamer is successfully cross-compiled for many platforms nowadays.
Andreas, is this still an issue with 1.0 ?
Closing. Please re-open if you still can't cross-compile anything with 1.x