From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MDNnB-0008RP-NX for garchives@archives.gentoo.org; Sun, 07 Jun 2009 19:12:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75E1BE04A1; Sun, 7 Jun 2009 19:12:28 +0000 (UTC) Received: from mail-bw0-f223.google.com (mail-bw0-f223.google.com [209.85.218.223]) by pigeon.gentoo.org (Postfix) with ESMTP id 10FC3E04A1 for ; Sun, 7 Jun 2009 19:12:27 +0000 (UTC) Received: by bwz23 with SMTP id 23so2210351bwz.34 for ; Sun, 07 Jun 2009 12:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=a/r7nX0JOOie7seJlFv3w0KuqVp+zhDaOd3BB+/lkdA=; b=qEPer5BAsVouJHxm4S/b7o9X7GxW7xLKpTfourGqN58zcRzYrIPFjMfihb7U7sBRaq iT7mvStZT6aNd8TcWwQMYch9/u0HPQIYt1pUAch4xEDtEdDMIntgvDv+dSQrWDVhkxve wgkugJ11kuPpmKhi+za+kxAFRHNkxnVCWGzjc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jNV8Z4BoeRWOwsFNq+1vaJEncLk+cMbuaZrHZc9L4/6gvMH6A5cHqe4YPqaL4UzJxT tda1LRZ1OSkMzRwAGmt5ly0BNNW5wvAEN7lPKy+WX+nR+f1k/AdwXyuUNp1CGnMx2y7j skQutuuQt3KytoGIMC9zRt57E19w+IFypeR+g= 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 Received: by 10.223.104.140 with SMTP id p12mr3296061fao.7.1244401945840; Sun, 07 Jun 2009 12:12:25 -0700 (PDT) In-Reply-To: <4A2C0871.60005@pon.net> References: <4A2C0871.60005@pon.net> Date: Sun, 7 Jun 2009 23:12:25 +0400 Message-ID: Subject: Re: [gentoo-embedded] Clarification of 5.e Embedded Handbook From: =?KOI8-R?B?88XSx8XKIO3J0s/Oz9c=?= To: gentoo-embedded@lists.gentoo.org Cc: jlpoole@pon.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 62921a2e-f2d4-49e7-986e-ea58764938b2 X-Archives-Hash: c911c71016b49190bf805a1bfff758fc 2009/6/7 John Poole : > I'm trying to install a cross compiler on my AMD64 for arm (SheevaPlug) a= nd > have been following your Gentoo Embedded Handbook at > http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml > > I do not fully understand Chapter 5 "Cross-Compiling with Portage", > specifically the section 5.e on "Helper: pkg-config". > > The instructions state: > > vvvvvvvvvvvv > > Many packages are moving to installing pkg-config files (*.pc) and using > those to discover needed libraries and includes. To ease the build proces= s, > you should install a pkg-config wrapper for your target which will tell > pkg-config to only search your cross-compiler paths rather than your host > paths. > > You should install this into your PATH so that configure scripts will det= ect > it properly. Name it with a CTARGET prefix and the script will do the res= t. > In other words, if your CTARGET is set to arm-linux-uclibc, the canonical > name is arm-linux-uclibc-pkg-config. Older configure scripts would only > search for pkg-config, so in those cases you will need to export the > PKG_CONFIG variable to the wrapper script. > ^^^^^^^^^^^^^^ > > So, I created a file arm-softfloat-linux-gnueabi-pkg-config and placed sa= me > under my directory "/usr/arm-softfloat-linux-gnueabi/etc". =A0The content= s of > the file were copied form the web page, to wit: > > vvvvvvvvvvvvvvv > > #!/bin/sh > CTARGET=3D${0%-pkg-config} > SYSROOT=3D"/usr/${CTARGET}" > export PKG_CONFIG_LIBDIR=3D"${SYSROOT}/usr/lib/pkgconfig" > unset PKG_CONFIG_PATH PKG_CONFIG_ALLOW_SYSTEM_CFLAGS > PKG_CONFIG_ALLOW_SYSTEM_LIBS > exec pkg-config "$@" > > > ^^^^^^^^^^^^^^^ > What I am not understanding is the instruction "install this into your > PATH". =A0My current PATH is: > > hermes etc # echo $PATH > /sbin:/bin:/usr/sbin:/usr/bin > hermes etc # > > =A0For the time that I would be cross-compiling and/or setting up this to= ol > chain, should I add the directory where this file is to my path as in: > > =A0hermes etc # export PATH=3D$PATH:/usr/arm-softfloat-linux-gnueabi/etc > > or include the file directory in my path (as in a Java Jar) > > =A0hermes etc # export > PATH=3D$PATH:/usr/arm-softfloat-linux-gnueabi/etc/arm-softfloat-linux-gnu= eabi-pkg-config > > What brings me to you is that the emerge of sys-apps/coreutils-7.1 failed= , > and it looks like a directory/location issue; here is the error message: > > vvvvvvvvvvvvv > * The specific snippet of code: > * =A0 =A0 =A0 =A0 =A0 mv ${fhs} ../../bin/ || die "could not move fhs bin= s"; > * =A0The die message: > * =A0 could not move fhs bins > ^^^^^^^^^^^ > The ebuild section the die statement comes from is: > > vvvvvvvvvvvvvvvvvv > src_install() { > =A0 =A0 =A0emake install DESTDIR=3D"${D}" || die > =A0 =A0 =A0dodoc AUTHORS ChangeLog* NEWS README* THANKS TODO > > =A0 =A0 =A0insinto /etc > =A0 =A0 =A0newins src/dircolors.hin DIR_COLORS || die > > =A0 =A0 =A0if [[ ${USERLAND} =3D=3D "GNU" ]] ; then > =A0 =A0 =A0 =A0 =A0 =A0 =A0cd "${D}"/usr/bin > =A0 =A0 =A0 =A0 =A0 =A0 =A0dodir /bin > =A0 =A0 =A0 =A0 =A0 =A0 =A0# move critical binaries into /bin (required b= y FHS) > =A0 =A0 =A0 =A0 =A0 =A0 =A0local fhs=3D"cat chgrp chmod chown cp date dd = df echo false ln ls > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mkdir mknod mv pwd rm rmd= ir stty sync true uname" > =A0 =A0 =A0 =A0 =A0 =A0 =A0mv ${fhs} ../../bin/ || die "could not move fh= s bins" > =A0 =A0 =A0 =A0 =A0 =A0 =A0# move critical binaries into /bin (common scr= ipts) > =A0 =A0 =A0 =A0 =A0 =A0 =A0local com=3D"basename chroot cut dir dirname d= u env expr head > mkfifo > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mktemp readlink seq sleep= sort tail touch tr tty > vdir wc yes" > =A0 =A0 =A0 =A0 =A0 =A0 =A0mv ${com} ../../bin/ || die "could not move co= mmon bins" > =A0 =A0 =A0 =A0 =A0 =A0 =A0# create a symlink for uname in /usr/bin/ sinc= e autotools > require it > =A0 =A0 =A0 =A0 =A0 =A0 =A0local x > =A0 =A0 =A0 =A0 =A0 =A0 =A0for x in ${com} uname ; do > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dosym /bin/${x} /usr/bin/${x} = || die > =A0 =A0 =A0 =A0 =A0 =A0 =A0done > =A0 =A0 =A0else > =A0 =A0 =A0 =A0 =A0 =A0 =A0# For now, drop the man pages, collides with t= he ones of the > system. > =A0 =A0 =A0 =A0 =A0 =A0 =A0rm -rf "${D}"/usr/share/man > =A0 =A0 =A0fi > } > > ^^^^^^^^^^^^^^^^^^ > > I'm guessing I do not have my environment set correctly and I have not > harnessed the functionality of the helping pkg-config script. > > Note, the word "PATH", as capitalized, appears for the first time in sect= ion > 5.e, so I'm guessing it has a special meaning or is referencing the > environmental variable "PATH"? > > I also made a copy of arm-softfloat-linux-gnueabi-pkg-config under the > SYSROOT directory of "/usr/arm-softfloat-linux-gnueabi", that didn't chan= ge > the die outcome of a sysapps/coreutils-7.1 emerge. > > Where do I place the file arm-softfloat-linux-gnueabi-pkg-config and how > should an addition to my PATH variable read? > > Thank you for your time. > > John Poole > > Hmm, i used to save this script into my host system's /usr/local/bin/arm-softfloat-linux-gnueabi, BUT It seems, that Gentoo Embedded habdbook is quite old, and now there is now need to write xmerge and friends by hand. There is nasty libtool bug during crosscompiling and handbook says nothing about it. Use emerge crossdev-wrappers. All steps are described here quite well: http://gentoo.mindzoo.de/index.cgi/wiki/cross-compiling --=20 Thanks Sergey.