I'm trying to install a cross compiler on my AMD64 for arm (SheevaPlug)
and 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
process, 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
detect it properly. Name it with a CTARGET prefix and the script will do
the rest. 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
same under my directory "/usr/arm-softfloat-linux-gnueabi/etc". The
contents of the file were copied form the web page, to wit:
vvvvvvvvvvvvvvv
#!/bin/sh
CTARGET=${0%-pkg-config}
SYSROOT="/usr/${CTARGET}"
export PKG_CONFIG_LIBDIR="${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". My current PATH is:
hermes etc # echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin
hermes etc #
For the time that I would be cross-compiling and/or setting up this tool
chain, should I add the directory where this file is to my path as in:
hermes etc # export PATH=$PATH:/usr/arm-softfloat-linux-gnueabi/etc
or include the file directory in my path (as in a Java Jar)
hermes etc # export
PATH=$PATH:/usr/arm-softfloat-linux-gnueabi/etc/arm-softfloat-linux-gnueabi-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:
* mv ${fhs} ../../bin/ || die "could not move fhs bins";
* The die message:
* could not move fhs bins
^^^^^^^^^^^
The ebuild section the die statement comes from is:
vvvvvvvvvvvvvvvvvv
src_install() {
emake install DESTDIR="${D}" || die
dodoc AUTHORS ChangeLog* NEWS README* THANKS TODO
insinto /etc
newins src/dircolors.hin DIR_COLORS || die
if [[ ${USERLAND} == "GNU" ]] ; then
cd "${D}"/usr/bin
dodir /bin
# move critical binaries into /bin (required by FHS)
local fhs="cat chgrp chmod chown cp date dd df echo false
ln ls
mkdir mknod mv pwd rm rmdir stty sync true uname"
mv ${fhs} ../../bin/ || die "could not move fhs bins"
# move critical binaries into /bin (common scripts)
local com="basename chroot cut dir dirname du env expr
head mkfifo
mktemp readlink seq sleep sort tail touch tr
tty vdir wc yes"
mv ${com} ../../bin/ || die "could not move common bins"
# create a symlink for uname in /usr/bin/ since autotools
require it
local x
for x in ${com} uname ; do
dosym /bin/${x} /usr/bin/${x} || die
done
else
# For now, drop the man pages, collides with the ones of
the system.
rm -rf "${D}"/usr/share/man
fi
}
^^^^^^^^^^^^^^^^^^
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
section 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
change 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
begin:vcard
fn:John Poole
n:Poole;John
adr:;;P.O. Box 6566;Napa;CA;94581-6566;USA
email;internet:[email protected]
tel;work:650-607-0853
tel;home:707-265-7572
tel;cell:707-815-8198
note:For street address, email me.
x-mozilla-html:TRUE
version:2.1
end:vcard