svn commit: trunk/buildroot
Author: jacmet
Date: 2008-11-03 12:11:03 -0800 (Mon, 03 Nov 2008) New Revision: 23920
Log:Makefile: ignore glib-genmarshal in staging_dir
HOST_GLIB is set to the path that contains the host glib tool set and is used when building packages using glib. The buildroot top level Makefile sets HOST_GLIB using which to find the path where glib-genmarshal is located.
The problem is that a cross compiled version of glib-genmarshal is also put in the build_ARCH/staging_dir/usr/bin directory when the package libglib2 is built. This cross compiled version will typically not run on the host system.
Fix it by ignoring staging_dir in the which output.
Closes #5934
jacmet: fixed to work correctly if it's only found in staging_dir.
Modified:
trunk/buildroot/Makefile
Changeset:
Modified: trunk/buildroot/Makefile
===================================================================
buildroot/Makefile +2 -1
@@ -122,7 +122,8 @@ HOSTLD:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLD)" || type -p $(HOSTLD) || echo ld) HOSTLN:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLN)" || type -p $(HOSTLN) || echo ln) HOSTNM:=$(shell $(CONFIG_SHELL) -c "which $(HOSTNM)" || type -p $(HOSTNM) || echo nm) -HOST_GLIB_BIN:=`dirname $(shell $(CONFIG_SHELL) -c "which glib-genmarshal" || echo /usr/bin/glib-genmarshal)` +# ignore version in staging_dir +HOST_GLIB_BIN:=`dirname $(shell $(CONFIG_SHELL) -c "(which -a glib-genmarshal; echo /usr/bin/glib-genmarshal)|grep -v staging_dir|head -n 1")` HOST_GLIB:=$(shell $(CONFIG_SHELL) -c "dirname $(HOST_GLIB_BIN)" || echo /usr)
Le Mon, 3 Nov 2008 12:11:04 -0800 (PST),
jacmet at uclibc.org a ?crit :
Quoted 2 lines
Log:
Makefile: ignore glib-genmarshal instaging_dir
I haven't looked at the details, but do this also solve #5724
(http://busybox.net/bugs/view.php?id=5724) ?
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> Le Mon, 3 Nov 2008 12:11:04 -0800 (PST), Thomas> jacmet at uclibc.org a ?crit :
Quoted 2 lines
Quoted 2 lines
Log:
Makefile: ignore glib-genmarshal instaging_dir
Thomas> I haven't looked at the details, but do this also solve #5724 Thomas> (http://busybox.net/bugs/view.php?id=5724) ?
That looks more like a problem about glib-genmarshal not being installed on the host (E.G. something like a libglib2.0-dev package)
Signature · 1 line
Bye, Peter Korsgaard
Le Tue, 04 Nov 2008 10:41:45 +0100,
Peter Korsgaard <[email protected]> a ?crit :
Quoted 2 lines
That looks more like a problem about glib-genmarshal not being installed on the host (E.G. something like a libglib2.0-dev package)
Yep, there are two solutions:
* Require glib-genmarshal to be installed on the host, in which case it should be checked prior to the compilation process ;
* Since the source code of glib-genmarshal is already available in the package we're compiling, compile it for the host and use this version instead of looking in /usr/bin.
The current glib source code seems to indicate that the first solution is preferred when doing cross-compilation:
if test $cross_compiling = yes; then
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal, no) if test x$GLIB_GENMARSHAL = xno; then
AC_MSG_ERROR(Could not find a glib-genmarshal in your PATH)
fi
fi
Sincerly,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> Le Tue, 04 Nov 2008 10:41:45 +0100, Thomas> Peter Korsgaard <[email protected]> a ?crit :
Quoted 2 lines
Quoted 2 lines
That looks more like a problem about glib-genmarshal not being installed on the host (E.G. something like a libglib2.0-dev package)
Thomas> Yep, there are two solutions:
Thomas> * Require glib-genmarshal to be installed on the host, in Thomas> which case it should be checked prior to the compilation Thomas> process ;
That's how it's currently done (see HOST_GLIB). The check is currently missing - It should probably be added to libglib2.mk
Signature · 1 line
Bye, Peter Korsgaard