From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 97E591381F3 for ; Thu, 13 Dec 2012 00:06:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2467E21C020 for ; Thu, 13 Dec 2012 00:06:57 +0000 (UTC) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6A57821C02B for ; Wed, 12 Dec 2012 23:43:55 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id gb30so1480517vcb.40 for ; Wed, 12 Dec 2012 15:43:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=ZejdrNxTwodi6SV2DCGoFfZwJdgxdEWmpvg1BNamqG4=; b=JyMDeuR8XHd3VGjf5onXUi+6xy32r5k/+MaPn6ql2cj+QsgVLtKpdIrvgF1wXsRTOs NGK3/PLER95W/jr+F79wEpcsXnheGXfnctE45WIIIsR0KxQkb6vtVfFp+owwfub1rOq/ NRGPa0PQJ1PBsf7fJxzn/B3XaO4ekaDLbcBaqjQCIIJUoPj7rDjBfk0hJYNC+8eSOhVl LhisV9NlrEl3LoMHOhePZiDWjrE6MeOGKzc+SGhuW/FtlH4t8G2PrvxVPf8Mp98Kttz+ w3lu42z1YVbsb13FzBdAGVpHUru0WbPO+U1DO/XbTC9iQyhHFJ5qKozk8Zr6+Tans7FP OHIA== Received: by 10.220.107.146 with SMTP id b18mr1973657vcp.48.1355355834608; Wed, 12 Dec 2012 15:43:54 -0800 (PST) Received: from [172.31.0.2] (cpe-75-87-85-32.kc.res.rr.com. [75.87.85.32]) by mx.google.com with ESMTPS id ey7sm8728851ved.0.2012.12.12.15.43.52 (version=SSLv3 cipher=OTHER); Wed, 12 Dec 2012 15:43:53 -0800 (PST) Message-ID: <50C916B7.1040003@gmail.com> Date: Wed, 12 Dec 2012 17:43:51 -0600 From: "Dustin C. Hatch" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Thunderbird/20.0a1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@lists.gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org MIME-Version: 1.0 To: gentoo-embedded@lists.gentoo.org Subject: [gentoo-embedded] crossdev, alternate root, and build dependencies Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Archives-Salt: 1cd094be-bf71-41a4-bb59-8d07269c7be4 X-Archives-Hash: 1c17050803787ac7dca8a4093957d1cf (Originally posted on gentoo-user, but may be more appropriate here) I am trying to understand and use crossdev to build Gentoo for my Raspberry Pi, and I have a couple of questions. I was able to successfully build a toolchain:: crossdev -S -t armv6j-hardfloat-linux-gnueabi This correctly installed binutils, gcc, glibc, and linux-headers:: equery list cross-armv6j-hardfloat-linux-gnueabi/* * Searching for * in cross-armv6j-hardfloat-linux-gnueabi ... [I-O] [ ] cross-armv6j-hardfloat-linux-gnueabi/binutils-2.22-r1:0 [I-O] [ ] cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4:4.5 [I-O] [ ] cross-armv6j-hardfloat-linux-gnueabi/glibc-2.15-r3:2.2 [I-O] [ ] cross-armv6j-hardfloat-linux-gnueabi/linux-headers-3.6:0 I then copied the configuration from /usr/armv6j-hardfloat-linux-gnueabi/etc/portage to an alternate location, so I could modify it without impacting the crossdev toolchain. Next, I started to emerge some ebuilds into a staging directory using the following commands:: export CBUILD=$(portageq envvar CHOST) export PORTAGE_CONFIGROOT=/home/dustin/rpi-build/configroot export ROOT=/home/dustin/rpi-build/buildroot/ export PORTAGE_TMPDIR=/home/dusitn/rpi-build/tmp emerge --nodeps baselayout emerge --onlydeps baselayout The first pass completed successfully, but the second failed to build psmisc:: checking for tgetent in -ltinfo... no checking for tgetent in -lncurses... no checking for tgetent in -ltermcap... no configure: error: Cannot find tinfo, ncurses or termcap libraries config.log shows this:: configure:3970: checking for tgetent in -lncurses configure:3995: armv6j-hardfloat-linux-gnueabi-gcc -o conftest -O4 -pipe -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -fomit-frame-pointer conftest.c -lncurses >&5 /usr/libexec/gcc/armv6j-hardfloat-linux-gnueabi/ld: cannot find -lncurses collect2: ld returned 1 exit status configure:3995: $? = 1 ncurses did get installed in the alternate root:: ls -1 ${ROOT}lib/libncurses* /home/dustin/rpi-build/buildroot/lib/libncurses.so.5 /home/dustin/rpi-build/buildroot/lib/libncurses.so.5.9 /home/dustin/rpi-build/buildroot/lib/libncursesw.so.5 /home/dustin/rpi-build/buildroot/lib/libncursesw.so.5.9 Now, I've found that if I install ncurses in /usr/${CHOST} instead of ${ROOT}, psmisc will build successfully. I am thus confused on where things are supposed to be built. The Cross Development Guide says not to install pieces of the toolchain in /usr/${CHOST}, but some ebuilds, like openrc, have explicit RDEPENDs on them, so emerge pulls them in. I'm not sure how to resolve this seeming catch-22 where I can't install runtime dependencies in /usr/${CHOST}, but I also can't install build dependencies in in ${ROOT}. I am hoping to have this process scriptable, so my current method of just installing missing build dependencies in /usr/${CHOST} after something fails won't work. Any pointers would be appreciated. Thanks, -- ♫Dustin