From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qlzsq-0007zy-Ms for qemu-devel@nongnu.org; Wed, 27 Jul 2011 04:54:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qlzsp-0001zz-S8 for qemu-devel@nongnu.org; Wed, 27 Jul 2011 04:54:28 -0400 Received: from gate.crashing.org ([63.228.1.57]:40431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qlzsp-0001zu-Kp for qemu-devel@nongnu.org; Wed, 27 Jul 2011 04:54:27 -0400 From: Benjamin Herrenschmidt In-Reply-To: <4E2F3B33.6080100@us.ibm.com> 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> Content-Type: text/plain; charset="UTF-8" Date: Wed, 27 Jul 2011 18:54:09 +1000 Message-ID: <1311756849.25044.668.camel@pasglop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: Anthony Liguori Cc: Yoder Stuart-B08248 , "qemu-devel@nongnu.org" , David Gibson > 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. 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). 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.