1 |
I'm trying to install a cross compiler on my AMD64 for arm (SheevaPlug) |
2 |
and have been following your Gentoo Embedded Handbook at |
3 |
http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml |
4 |
|
5 |
I do not fully understand Chapter 5 "Cross-Compiling with Portage", |
6 |
specifically the section 5.e on "Helper: pkg-config". |
7 |
|
8 |
The instructions state: |
9 |
|
10 |
vvvvvvvvvvvv |
11 |
|
12 |
Many packages are moving to installing pkg-config files (*.pc) and using |
13 |
those to discover needed libraries and includes. To ease the build |
14 |
process, you should install a pkg-config wrapper for your target which |
15 |
will tell pkg-config to only search your cross-compiler paths rather |
16 |
than your host paths. |
17 |
|
18 |
You should install this into your PATH so that configure scripts will |
19 |
detect it properly. Name it with a CTARGET prefix and the script will do |
20 |
the rest. In other words, if your CTARGET is set to arm-linux-uclibc, |
21 |
the canonical name is arm-linux-uclibc-pkg-config. Older configure |
22 |
scripts would only search for pkg-config, so in those cases you will |
23 |
need to export the PKG_CONFIG variable to the wrapper script. |
24 |
^^^^^^^^^^^^^^ |
25 |
|
26 |
So, I created a file arm-softfloat-linux-gnueabi-pkg-config and placed |
27 |
same under my directory "/usr/arm-softfloat-linux-gnueabi/etc". The |
28 |
contents of the file were copied form the web page, to wit: |
29 |
|
30 |
vvvvvvvvvvvvvvv |
31 |
|
32 |
#!/bin/sh |
33 |
CTARGET=${0%-pkg-config} |
34 |
SYSROOT="/usr/${CTARGET}" |
35 |
export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig" |
36 |
unset PKG_CONFIG_PATH PKG_CONFIG_ALLOW_SYSTEM_CFLAGS |
37 |
PKG_CONFIG_ALLOW_SYSTEM_LIBS |
38 |
exec pkg-config "$@" |
39 |
|
40 |
|
41 |
^^^^^^^^^^^^^^^ |
42 |
What I am not understanding is the instruction "install this into your |
43 |
PATH". My current PATH is: |
44 |
|
45 |
hermes etc # echo $PATH |
46 |
/sbin:/bin:/usr/sbin:/usr/bin |
47 |
hermes etc # |
48 |
|
49 |
|
50 |
For the time that I would be cross-compiling and/or setting up this tool |
51 |
chain, should I add the directory where this file is to my path as in: |
52 |
|
53 |
hermes etc # export PATH=$PATH:/usr/arm-softfloat-linux-gnueabi/etc |
54 |
|
55 |
or include the file directory in my path (as in a Java Jar) |
56 |
|
57 |
hermes etc # export |
58 |
PATH=$PATH:/usr/arm-softfloat-linux-gnueabi/etc/arm-softfloat-linux-gnueabi-pkg-config |
59 |
|
60 |
|
61 |
What brings me to you is that the emerge of sys-apps/coreutils-7.1 |
62 |
failed, and it looks like a directory/location issue; here is the error |
63 |
message: |
64 |
|
65 |
vvvvvvvvvvvvv |
66 |
* The specific snippet of code: |
67 |
* mv ${fhs} ../../bin/ || die "could not move fhs bins"; |
68 |
* The die message: |
69 |
* could not move fhs bins |
70 |
^^^^^^^^^^^ |
71 |
The ebuild section the die statement comes from is: |
72 |
|
73 |
vvvvvvvvvvvvvvvvvv |
74 |
src_install() { |
75 |
emake install DESTDIR="${D}" || die |
76 |
dodoc AUTHORS ChangeLog* NEWS README* THANKS TODO |
77 |
|
78 |
insinto /etc |
79 |
newins src/dircolors.hin DIR_COLORS || die |
80 |
|
81 |
if [[ ${USERLAND} == "GNU" ]] ; then |
82 |
cd "${D}"/usr/bin |
83 |
dodir /bin |
84 |
# move critical binaries into /bin (required by FHS) |
85 |
local fhs="cat chgrp chmod chown cp date dd df echo false |
86 |
ln ls |
87 |
mkdir mknod mv pwd rm rmdir stty sync true uname" |
88 |
mv ${fhs} ../../bin/ || die "could not move fhs bins" |
89 |
# move critical binaries into /bin (common scripts) |
90 |
local com="basename chroot cut dir dirname du env expr |
91 |
head mkfifo |
92 |
mktemp readlink seq sleep sort tail touch tr |
93 |
tty vdir wc yes" |
94 |
mv ${com} ../../bin/ || die "could not move common bins" |
95 |
# create a symlink for uname in /usr/bin/ since autotools |
96 |
require it |
97 |
local x |
98 |
for x in ${com} uname ; do |
99 |
dosym /bin/${x} /usr/bin/${x} || die |
100 |
done |
101 |
else |
102 |
# For now, drop the man pages, collides with the ones of |
103 |
the system. |
104 |
rm -rf "${D}"/usr/share/man |
105 |
fi |
106 |
} |
107 |
|
108 |
^^^^^^^^^^^^^^^^^^ |
109 |
|
110 |
I'm guessing I do not have my environment set correctly and I have not |
111 |
harnessed the functionality of the helping pkg-config script. |
112 |
|
113 |
Note, the word "PATH", as capitalized, appears for the first time in |
114 |
section 5.e, so I'm guessing it has a special meaning or is referencing |
115 |
the environmental variable "PATH"? |
116 |
|
117 |
I also made a copy of arm-softfloat-linux-gnueabi-pkg-config under the |
118 |
SYSROOT directory of "/usr/arm-softfloat-linux-gnueabi", that didn't |
119 |
change the die outcome of a sysapps/coreutils-7.1 emerge. |
120 |
|
121 |
Where do I place the file arm-softfloat-linux-gnueabi-pkg-config and how |
122 |
should an addition to my PATH variable read? |
123 |
|
124 |
Thank you for your time. |
125 |
|
126 |
John Poole |