Gentoo Archives: gentoo-embedded

From: Joakim Tjernlund <joakim.tjernlund@×××××××××.se>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] installing binary pkgs created with crossdev
Date: Sat, 04 May 2013 13:17:12
Message-Id: OF21F44B23.1A485B9F-ONC1257B61.0047B22E-C1257B61.0048F8F2@transmode.se
In Reply to: Re: [gentoo-embedded] installing binary pkgs created with crossdev by Mike Frysinger
1 Mike Frysinger <vapier@g.o> wrote on 2013/05/03 21:04:50:
2 >
3 > On Thursday 02 May 2013 16:27:04 Joakim Tjernlund wrote:
4 > > Note the KEYWORDS, installing pkgs using crossdev directly doesn't
5 care
6 > > about KEYWORDS
7 > > but installing the same as binary pkgs respects KEYWORDS, a bit
8 asymmetric
9 > > but not a big deal
10 >
11 > that's not really accurate. crossdev sets up keywords in
12 > /etc/portage/package.keywords/ so that it uses versions that correspond
13 to the
14 > target arch. so if you're generating a cross-compiler for powerpc, you
15 don't
16 > want to install a glibc version that has KEYWORDS=-ppc just because it
17 also
18 > has KEYWORDS=amd64 (and your host system is amd64).
19 >
20 > when installing the binpkgs, the /etc/portage/package.keywords/ setting
21 isn't
22 > in place, so now you have to lie by using a hack like your
23 ACCEPT_KEYWORDS.
24
25 Right, just a bit surprising.
26
27 >
28 > > However this is somewhat confusing, I had to run
29 > > binutils-config powerpc-softfloat_4.5.3-linux-gnu-2.21.1
30 > > manually after installing the binary pkgs, is that expected?
31 >
32 > no, you shouldn't have to do that. you can see the pkg_postinst for
33 binutils:
34 > toolchain-binutils_pkg_postinst() {
35 > # Make sure this ${CTARGET} has a binutils version selected
36 > [[ -e ${ROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
37 > binutils-config ${CTARGET}-${BVER}
38 > }
39 >
40 > your CTARGET should have been set to
41 'powerpc-softfloat_4.5.3-linux-gnu', and
42 > if you didn't have that target already installed on that system, things
43 should
44 > have "just worked".
45 >
46 > if you did already have a binutils installed for that target, then
47 binutils-
48 > config would have (rightfully) not been run.
49
50 Ah, it might have been something like that. I did another install but this
51 time I really cleared out the old install properly, even ran
52 binutils-config -u
53 to remove all traces.
54 That did the trick and everything just worked.
55
56 >
57 > > On a side note I can mention, installing a binary x86 binutils on a
58 amd64
59 > > host requires CHOST:
60 > > CHOST=i686-pc-linux-gnu binutils-config
61 > > powerpc-softfloat_4.5.3-linux-gnu-2.21.1
62 >
63 > trying to mix x86 & amd64 packages are known not to work. no one is
64 > interested in supporting that today (ever?).
65
66 Well, I first installed our old 32 binary cross ppc toolchain and that
67 required the above "trick", gcc-config just worked so I figured I should
68 mention it.
69
70 >
71 > although, if this is the same setup as when you installed the binpkgs
72 above,
73 > then that's probably why.
74
75 Yes, I figured that too :)
76
77 >
78 > > Finally, running gdb yields:
79 > > # powerpc-softfloat_4.5.3-linux-gnu-gdb
80 > > Python Exception <type 'exceptions.NameError'> name 'os' is not
81 defined:
82 >
83 > if this is the same binpkg as you described above (built for x86 but
84 deployed
85 > to amd64), then this makes sense. gdb has been configured against a
86 32bit
87 > python, but your host has only a 64bit python.
88
89 No, this was my new amd64 built gdb. Seems to be a gdb issue though as I
90 backed gdb to
91 latest stable 7.5.1 and that worked.
92
93 Jocke