From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm4E8-0004Hm-0t for qemu-devel@nongnu.org; Wed, 27 Jul 2011 09:32:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm4E5-0004vx-11 for qemu-devel@nongnu.org; Wed, 27 Jul 2011 09:32:43 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:54220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm4E4-0004uL-Eh for qemu-devel@nongnu.org; Wed, 27 Jul 2011 09:32:40 -0400 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id p6RDVnYY021566 for ; Wed, 27 Jul 2011 23:31:49 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p6RDUZ6U1093852 for ; Wed, 27 Jul 2011 23:30:42 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p6RDVEQq031378 for ; Wed, 27 Jul 2011 23:31:14 +1000 Date: Wed, 27 Jul 2011 23:31:02 +1000 From: David Gibson Message-ID: <20110727133102.GH2582@yookeroo.fritz.box> References: <1311670746-20498-1-git-send-email-wuzhy@linux.vnet.ibm.com> <1311670746-20498-2-git-send-email-wuzhy@linux.vnet.ibm.com> <20110726192618.GA8126@amt.cnet> <9F6FE96B71CF29479FF1CDC8046E15031876FA@039-SN1MPN1-002.039d.mgd.msft.net> <4E2F3B33.6080100@us.ibm.com> <1311756849.25044.668.camel@pasglop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1311756849.25044.668.camel@pasglop> Subject: Re: [Qemu-devel] [PATCH 04/25] Add hard build dependency on glib List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: Yoder Stuart-B08248 , Anthony Liguori , "qemu-devel@nongnu.org" On Wed, Jul 27, 2011 at 06:54:09PM +1000, Benjamin Herrenschmidt wrote: > > > You're probably setting up your cross environment incorrectly which, > > unfortunately, is very common. > > > > The proper thing to do is to have GCC use a different system include > > directory and a different prefix. That will result in a directory where > > there are gcc binaries with normal names installed in ${cross_prefix}/bin > > > > You need to build and install pkg-config to this prefix too, and then > > when it comes time to actually doing the QEMU configure, you should do > > something like: > > > > export PATH=${cross_prefix}/bin:$PATH > > export PKG_CONFIG_PATH=${cross_prefix}/lib/pkg-config:$PKG_CONFIG_PATH > > > > Many automated cross compiler environment scripts will install specially > > named versions of gcc and binutils in your normal $PATH. The trouble > > is, this is a bit of a hack and unless you know to make this hack work > > with other build tools, it all comes tumbling down. We're not, as a rule, cross building. We're doing compiles of ppc64 binaries on a ppc32. Although that can be approached as a cross-build, it's a common enough special case that it should be able to handle this without setting a full cross-build environment. At the moment this does seem to work for building x86_64 binaries on a 32-bit x86 system, but I suspect this is only accident. > Well, that hard requirement is causing us problem on our 32/64-bit cross > builds as well. > > It looks like glib (at least recent versions in -sid) can't be built > 64-bit on a 32-bit system :-( At least not without fixing some horrid > bugs in there related to some generated include path from what David > says (I'll let him comment further). Actually, I think it can (provided a 64-bit glib is installed, including a 64-bit version of glibconfig.h), and it's not *as* painful to set up as I previously thought, although it's still not nice. > In general, every time you add a library requirement without some config > option to disable it for cases such as ours, you add pain :-) > > Now, in the specific case of glib, I understand why you would want to > get rid of re-invented wheels and use it, so I'm not specifically > criticizing that specific change, we'll eventually have to fix it > anyways. Just a heads up to be careful with hard requirements in > general. > > Cheers, > Ben. > > -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson