* [gentoo-embedded] installing binary pkgs created with crossdev
@ 2013-05-02 20:27 Joakim Tjernlund
2013-05-03 13:12 ` Joakim Tjernlund
2013-05-03 19:04 ` Mike Frysinger
0 siblings, 2 replies; 4+ messages in thread
From: Joakim Tjernlund @ 2013-05-02 20:27 UTC (permalink / raw
To: gentoo-embedded
I built a cross toolchain using crossdev, noting special I think. Then I
created
binary pkgs like so:
CTARGET=powerpc-softfloat_4.5.3-linux-gnu
export ROOT=/ PKGDIR=${PORTDIR}/pkgs/${CTARGET}/cross-tools
quickpkg --include-config=y `qlist -IC cross-${CTARGET}`
Installed these pkgs on another host using
ACCEPT_KEYWORDS=~* emerge -aG \
cross-powerpc-softfloat_4.5.3-linux-gnu/linux-headers \
cross-powerpc-softfloat_4.5.3-linux-gnu/binutils \
cross-powerpc-softfloat_4.5.3-linux-gnu/glibc \
cross-powerpc-softfloat_4.5.3-linux-gnu/gcc \
cross-powerpc-softfloat_4.5.3-linux-gnu/gdb
Note the KEYWORDS, installing pkgs using crossdev directly doesn't care
about KEYWORDS
but installing the same as binary pkgs respects KEYWORDS, a bit asymmetric
but not a big deal
However this is somewhat confusing, I had to run
binutils-config powerpc-softfloat_4.5.3-linux-gnu-2.21.1
manually after installing the binary pkgs, is that expected?
I figured I should not have to do that.
On a side note I can mention, installing a binary x86 binutils on a amd64
host requires CHOST:
CHOST=i686-pc-linux-gnu binutils-config
powerpc-softfloat_4.5.3-linux-gnu-2.21.1
Finally, running gdb yields:
# powerpc-softfloat_4.5.3-linux-gnu-gdb
Python Exception <type 'exceptions.NameError'> name 'os' is not defined:
warning:
Could not load the Python gdb module from `/usr/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
GNU gdb (Gentoo 7.6 p1) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu
--target=powerpc-softfloat_4.5.3-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
(gdb)
This one I haven't figured out yet, what is up with the python connection
here?
Oh, is there a difference using quickpkg vs. emerge --buildpkg ?
Jocke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-embedded] installing binary pkgs created with crossdev
2013-05-02 20:27 [gentoo-embedded] installing binary pkgs created with crossdev Joakim Tjernlund
@ 2013-05-03 13:12 ` Joakim Tjernlund
2013-05-03 19:04 ` Mike Frysinger
1 sibling, 0 replies; 4+ messages in thread
From: Joakim Tjernlund @ 2013-05-03 13:12 UTC (permalink / raw
To: gentoo-embedded
Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote on 2013/05/02
22:27:04:
>
> I built a cross toolchain using crossdev, noting special I think. Then I
> created
> binary pkgs like so:
> CTARGET=powerpc-softfloat_4.5.3-linux-gnu
> export ROOT=/ PKGDIR=${PORTDIR}/pkgs/${CTARGET}/cross-tools
> quickpkg --include-config=y `qlist -IC cross-${CTARGET}`
>
> Installed these pkgs on another host using
> ACCEPT_KEYWORDS=~* emerge -aG \
> cross-powerpc-softfloat_4.5.3-linux-gnu/linux-headers \
> cross-powerpc-softfloat_4.5.3-linux-gnu/binutils \
> cross-powerpc-softfloat_4.5.3-linux-gnu/glibc \
> cross-powerpc-softfloat_4.5.3-linux-gnu/gcc \
> cross-powerpc-softfloat_4.5.3-linux-gnu/gdb
> Note the KEYWORDS, installing pkgs using crossdev directly doesn't care
> about KEYWORDS
> but installing the same as binary pkgs respects KEYWORDS, a bit
asymmetric
> but not a big deal
>
> However this is somewhat confusing, I had to run
> binutils-config powerpc-softfloat_4.5.3-linux-gnu-2.21.1
> manually after installing the binary pkgs, is that expected?
> I figured I should not have to do that.
> On a side note I can mention, installing a binary x86 binutils on a
amd64
> host requires CHOST:
> CHOST=i686-pc-linux-gnu binutils-config
> powerpc-softfloat_4.5.3-linux-gnu-2.21.1
>
> Finally, running gdb yields:
> # powerpc-softfloat_4.5.3-linux-gnu-gdb
> Python Exception <type 'exceptions.NameError'> name 'os' is not defined:
hmm, this appears to be a gdb issue, not crossdev. If I use gdb 7.5.1 it
works just fine.
> Oh, is there a difference using quickpkg vs. emerge --buildpkg ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-embedded] installing binary pkgs created with crossdev
2013-05-02 20:27 [gentoo-embedded] installing binary pkgs created with crossdev Joakim Tjernlund
2013-05-03 13:12 ` Joakim Tjernlund
@ 2013-05-03 19:04 ` Mike Frysinger
2013-05-04 13:17 ` Joakim Tjernlund
1 sibling, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2013-05-03 19:04 UTC (permalink / raw
To: gentoo-embedded
[-- Attachment #1: Type: Text/Plain, Size: 2338 bytes --]
On Thursday 02 May 2013 16:27:04 Joakim Tjernlund wrote:
> Note the KEYWORDS, installing pkgs using crossdev directly doesn't care
> about KEYWORDS
> but installing the same as binary pkgs respects KEYWORDS, a bit asymmetric
> but not a big deal
that's not really accurate. crossdev sets up keywords in
/etc/portage/package.keywords/ so that it uses versions that correspond to the
target arch. so if you're generating a cross-compiler for powerpc, you don't
want to install a glibc version that has KEYWORDS=-ppc just because it also
has KEYWORDS=amd64 (and your host system is amd64).
when installing the binpkgs, the /etc/portage/package.keywords/ setting isn't
in place, so now you have to lie by using a hack like your ACCEPT_KEYWORDS.
> However this is somewhat confusing, I had to run
> binutils-config powerpc-softfloat_4.5.3-linux-gnu-2.21.1
> manually after installing the binary pkgs, is that expected?
no, you shouldn't have to do that. you can see the pkg_postinst for binutils:
toolchain-binutils_pkg_postinst() {
# Make sure this ${CTARGET} has a binutils version selected
[[ -e ${ROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
binutils-config ${CTARGET}-${BVER}
}
your CTARGET should have been set to 'powerpc-softfloat_4.5.3-linux-gnu', and
if you didn't have that target already installed on that system, things should
have "just worked".
if you did already have a binutils installed for that target, then binutils-
config would have (rightfully) not been run.
> On a side note I can mention, installing a binary x86 binutils on a amd64
> host requires CHOST:
> CHOST=i686-pc-linux-gnu binutils-config
> powerpc-softfloat_4.5.3-linux-gnu-2.21.1
trying to mix x86 & amd64 packages are known not to work. no one is
interested in supporting that today (ever?).
although, if this is the same setup as when you installed the binpkgs above,
then that's probably why.
> Finally, running gdb yields:
> # powerpc-softfloat_4.5.3-linux-gnu-gdb
> Python Exception <type 'exceptions.NameError'> name 'os' is not defined:
if this is the same binpkg as you described above (built for x86 but deployed
to amd64), then this makes sense. gdb has been configured against a 32bit
python, but your host has only a 64bit python.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-embedded] installing binary pkgs created with crossdev
2013-05-03 19:04 ` Mike Frysinger
@ 2013-05-04 13:17 ` Joakim Tjernlund
0 siblings, 0 replies; 4+ messages in thread
From: Joakim Tjernlund @ 2013-05-04 13:17 UTC (permalink / raw
To: gentoo-embedded
Mike Frysinger <vapier@gentoo.org> wrote on 2013/05/03 21:04:50:
>
> On Thursday 02 May 2013 16:27:04 Joakim Tjernlund wrote:
> > Note the KEYWORDS, installing pkgs using crossdev directly doesn't
care
> > about KEYWORDS
> > but installing the same as binary pkgs respects KEYWORDS, a bit
asymmetric
> > but not a big deal
>
> that's not really accurate. crossdev sets up keywords in
> /etc/portage/package.keywords/ so that it uses versions that correspond
to the
> target arch. so if you're generating a cross-compiler for powerpc, you
don't
> want to install a glibc version that has KEYWORDS=-ppc just because it
also
> has KEYWORDS=amd64 (and your host system is amd64).
>
> when installing the binpkgs, the /etc/portage/package.keywords/ setting
isn't
> in place, so now you have to lie by using a hack like your
ACCEPT_KEYWORDS.
Right, just a bit surprising.
>
> > However this is somewhat confusing, I had to run
> > binutils-config powerpc-softfloat_4.5.3-linux-gnu-2.21.1
> > manually after installing the binary pkgs, is that expected?
>
> no, you shouldn't have to do that. you can see the pkg_postinst for
binutils:
> toolchain-binutils_pkg_postinst() {
> # Make sure this ${CTARGET} has a binutils version selected
> [[ -e ${ROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
> binutils-config ${CTARGET}-${BVER}
> }
>
> your CTARGET should have been set to
'powerpc-softfloat_4.5.3-linux-gnu', and
> if you didn't have that target already installed on that system, things
should
> have "just worked".
>
> if you did already have a binutils installed for that target, then
binutils-
> config would have (rightfully) not been run.
Ah, it might have been something like that. I did another install but this
time I really cleared out the old install properly, even ran
binutils-config -u
to remove all traces.
That did the trick and everything just worked.
>
> > On a side note I can mention, installing a binary x86 binutils on a
amd64
> > host requires CHOST:
> > CHOST=i686-pc-linux-gnu binutils-config
> > powerpc-softfloat_4.5.3-linux-gnu-2.21.1
>
> trying to mix x86 & amd64 packages are known not to work. no one is
> interested in supporting that today (ever?).
Well, I first installed our old 32 binary cross ppc toolchain and that
required the above "trick", gcc-config just worked so I figured I should
mention it.
>
> although, if this is the same setup as when you installed the binpkgs
above,
> then that's probably why.
Yes, I figured that too :)
>
> > Finally, running gdb yields:
> > # powerpc-softfloat_4.5.3-linux-gnu-gdb
> > Python Exception <type 'exceptions.NameError'> name 'os' is not
defined:
>
> if this is the same binpkg as you described above (built for x86 but
deployed
> to amd64), then this makes sense. gdb has been configured against a
32bit
> python, but your host has only a 64bit python.
No, this was my new amd64 built gdb. Seems to be a gdb issue though as I
backed gdb to
latest stable 7.5.1 and that worked.
Jocke
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-04 13:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 20:27 [gentoo-embedded] installing binary pkgs created with crossdev Joakim Tjernlund
2013-05-03 13:12 ` Joakim Tjernlund
2013-05-03 19:04 ` Mike Frysinger
2013-05-04 13:17 ` Joakim Tjernlund
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox