* AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging()
@ 2008-03-05 19:49 Geoffrey Wossum
2008-03-05 20:43 ` Richard Purdie
0 siblings, 1 reply; 10+ messages in thread
From: Geoffrey Wossum @ 2008-03-05 19:49 UTC (permalink / raw)
To: Openembedded-devel
Hi all,
I'm working on getting OpenEmbeddded to build for an AVR32 system. Right now
I'm using an AT32STK1000, although eventually I'll be running on custom
hardware.
I've been having problems getting past the uclibc-initial (0.9.28). I get an
error when it attempts do_populate_staging(). Here's the error I've been
getting.
--begin--
NOTE: package uclibc-initial-0.9.28-r10: task do_populate_staging: started
ERROR: function do_stage failed
ERROR: log data follows
(/home/geoff/lrs/playpaq/tmp/work/avr32-angstrom-linux-uclibc/uclibc-initial-0.9.28-r10/temp/log.do_stage.17824)
| make: avr32-angstrom-linux-uclibc-gcc: Command not found
| make: avr32-angstrom-linux-uclibc-gcc: Command not found
|
+ ./extra/scripts/fix_includes.sh -k /home/geoff/lrs/playpaq/tmp/cross/avr32-angstrom-linux-uclibc -t
avr32
|
|
| The
file /home/geoff/lrs/playpaq/tmp/cross/avr32-angstrom-linux-uclibc/Makefile
or /home/geoff/lrs/playpaq/tmp/cross/avr32-angstrom-linux-uclibc/include/linux/version.h
is missing!
| Perhaps your kernel source is broken?
|
|
| make: *** [headers] Error 1
NOTE: Task
failed: /home/geoff/lrs/playpaq/tmp/work/avr32-angstrom-linux-uclibc/uclibc-initial-0.9.28-r10/temp/log.do_stage.17824
NOTE: package uclibc-initial-0.9.28-r10: task do_populate_staging: failed
ERROR: TaskFailed event exception, aborting
NOTE: package uclibc-initial-0.9.28: failed
--end--
I was able to get past this by modifying uclibc_0.9.28.bb so that
KERNEL_SOURCE is now getting to what I think is correct. It was:
KERNEL_SOURCE = "${CROSS_DIR}/${TARGET_SYS}"
and I changed it to:
KERNEL_SOURCE = "${STAGING_DIR_HOST}/${exec_prefix}"
It also looks like I could have re-enabled the nokernelheader.patch. Any
comments on what the "proper" fix is here?
With that change made, the do_populate_staging went further, but not much
further. In uclibc-initial_0.9.28.bb, there is the following command:
make PREFIX= DEVEL_PREFIX=${UCLIBC_PREFIX}/ \
RUNTIME_PREFIX=${UCLIBC_PREFIX}/ \
pregen install_dev
UCLIBC_PREFIX used to be defined in uclibc.inc, but that was changed about a
week ago. Changing uclibc-initial_0.9.28.bb to use UCLIBC_STAGING_PREFIX
instead of UCLIBC_PREFIX got me past this issue. Any comments about
the "correct" fix here?
Thanks,
---
Geoffrey
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging()
2008-03-05 19:49 AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging() Geoffrey Wossum
@ 2008-03-05 20:43 ` Richard Purdie
2008-03-05 20:58 ` AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging () Geoffrey Wossum
2008-03-07 21:23 ` Geoffrey Wossum
0 siblings, 2 replies; 10+ messages in thread
From: Richard Purdie @ 2008-03-05 20:43 UTC (permalink / raw)
To: openembedded-devel
Hi,
On Wed, 2008-03-05 at 13:49 -0600, Geoffrey Wossum wrote:
> I'm working on getting OpenEmbeddded to build for an AVR32 system. Right now
> I'm using an AT32STK1000, although eventually I'll be running on custom
> hardware.
>
> I've been having problems getting past the uclibc-initial (0.9.28). I get an
> error when it attempts do_populate_staging(). Here's the error I've been
> getting.
I think both your fixes are correct. Those changes were already made in
poky but had got lost somewhere between there and OE.dev, I'll sync them
up. Thanks for the report and let us know if anything doesn't work after
I merge them.
Cheers,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging ()
2008-03-05 20:43 ` Richard Purdie
@ 2008-03-05 20:58 ` Geoffrey Wossum
2008-03-05 21:59 ` Richard Purdie
2008-03-07 21:23 ` Geoffrey Wossum
1 sibling, 1 reply; 10+ messages in thread
From: Geoffrey Wossum @ 2008-03-05 20:58 UTC (permalink / raw)
To: openembedded-devel
On Wednesday 05 March 2008 02:43:41 pm Richard Purdie wrote:
> On Wed, 2008-03-05 at 13:49 -0600, Geoffrey Wossum wrote:
> > I'm working on getting OpenEmbeddded to build for an AVR32 system. Right
> > now I'm using an AT32STK1000, although eventually I'll be running on
> > custom hardware.
> >
> > I've been having problems getting past the uclibc-initial (0.9.28). I
> > get an error when it attempts do_populate_staging(). Here's the error
> > I've been getting.
>
> I think both your fixes are correct. Those changes were already made in
> poky but had got lost somewhere between there and OE.dev, I'll sync them
> up. Thanks for the report and let us know if anything doesn't work after
> I merge them.
I ended up getting an error much later on in the build process, while
executing do_install() for uclibc (0.9.28). ld couldn't find crt1.o while
executing the "make install_dev install_runtime" step. ld wants crt1.o in
the cross directory. Sorry, didn't save the exact error message.
I got around this by defining UCLIBC_PREFIX to what it was before
("${CROSS_DIR}/${TARGET_SYS}"), and then adding the following to the top of
uclibc.inc's do_install():
oe_runmake PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
install_dev install_runtime
This is essentially what was there before. With this in place, I get much
further.
It almost feels like the patch a week ago to uclibc.inc needed some patches to
binutils-cross or something to go with it...
Now the build stopped while building ncurses-native_5.4. Patch didn't apply
properly...
---
Geoffrey
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging ()
2008-03-05 20:58 ` AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging () Geoffrey Wossum
@ 2008-03-05 21:59 ` Richard Purdie
2008-03-05 22:47 ` Geoffrey Wossum
2008-03-07 22:56 ` Geoffrey Wossum
0 siblings, 2 replies; 10+ messages in thread
From: Richard Purdie @ 2008-03-05 21:59 UTC (permalink / raw)
To: openembedded-devel
On Wed, 2008-03-05 at 14:58 -0600, Geoffrey Wossum wrote:
> On Wednesday 05 March 2008 02:43:41 pm Richard Purdie wrote:
>
> > On Wed, 2008-03-05 at 13:49 -0600, Geoffrey Wossum wrote:
> > > I'm working on getting OpenEmbeddded to build for an AVR32 system. Right
> > > now I'm using an AT32STK1000, although eventually I'll be running on
> > > custom hardware.
> > >
> > > I've been having problems getting past the uclibc-initial (0.9.28). I
> > > get an error when it attempts do_populate_staging(). Here's the error
> > > I've been getting.
> >
> > I think both your fixes are correct. Those changes were already made in
> > poky but had got lost somewhere between there and OE.dev, I'll sync them
> > up. Thanks for the report and let us know if anything doesn't work after
> > I merge them.
>
> I ended up getting an error much later on in the build process, while
> executing do_install() for uclibc (0.9.28). ld couldn't find crt1.o while
> executing the "make install_dev install_runtime" step. ld wants crt1.o in
> the cross directory. Sorry, didn't save the exact error message.
>
> I got around this by defining UCLIBC_PREFIX to what it was before
> ("${CROSS_DIR}/${TARGET_SYS}"), and then adding the following to the top of
> uclibc.inc's do_install():
>
> oe_runmake PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
> RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
> install_dev install_runtime
>
> This is essentially what was there before. With this in place, I get much
> further.
>
> It almost feels like the patch a week ago to uclibc.inc needed some patches to
> binutils-cross or something to go with it...
>
> Now the build stopped while building ncurses-native_5.4. Patch didn't apply
> properly...
Which distro and machine are you using? This sounds like something which
isn't using sysroot or the sysroot workarounds.
Poking around cross hasn't been needed for a while and instead of the
above, building "cross-linkage" might help. This was removed from the
linux-libc-headers DEPENDS recently. You may also need
"staging-linkage", it all depends on the compiler though and if its
sysroot capable, enabling that would be infinitely preferable.
Regards,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging ()
2008-03-05 21:59 ` Richard Purdie
@ 2008-03-05 22:47 ` Geoffrey Wossum
2008-03-07 22:56 ` Geoffrey Wossum
1 sibling, 0 replies; 10+ messages in thread
From: Geoffrey Wossum @ 2008-03-05 22:47 UTC (permalink / raw)
To: openembedded-devel
On Wednesday 05 March 2008 03:59:40 pm Richard Purdie wrote:
> Which distro and machine are you using? This sounds like something which
> isn't using sysroot or the sysroot workarounds.
Distro: angstrom-2008.1
Machine: at32stk1000 (AVR32)
It's using binutils-2.17, gcc-4.1.2-atmel.1.1.0, uClibc-0.9.28.
I'll investigate whether this compiler is sysroot capable. Looking at the log
of configuring binutils and gcc, it was built using --sysroot
and --with-build-sysroot. There's an AVR32 binutils patch that does
something to sysroot handling, though. I'll have to look at it more to
figure out what they were trying to do. I'll bet this has something to do
with my problem.
Thanks!
---
Geoffrey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging ()
2008-03-05 21:59 ` Richard Purdie
2008-03-05 22:47 ` Geoffrey Wossum
@ 2008-03-07 22:56 ` Geoffrey Wossum
2008-03-07 23:33 ` Richard Purdie
1 sibling, 1 reply; 10+ messages in thread
From: Geoffrey Wossum @ 2008-03-07 22:56 UTC (permalink / raw)
To: openembedded-devel
On Wednesday 05 March 2008 03:59:40 pm Richard Purdie wrote:
> Which distro and machine are you using? This sounds like something which
> isn't using sysroot or the sysroot workarounds.
>
> Poking around cross hasn't been needed for a while and instead of the
> above, building "cross-linkage" might help. This was removed from the
> linux-libc-headers DEPENDS recently. You may also need
> "staging-linkage", it all depends on the compiler though and if its
> sysroot capable, enabling that would be infinitely preferable.
So much for blaming Atmel for their ld patch. I think I found the REAL
problem.
Checking the log.do_configure for gcc-cross-initial, --with-sysroot was NOT
getting passed to gcc's configure script.
So I started parsing gcc-cross-initial_4.1.2.bb by hand. Here's what it looks
like is happening to me. Eventually, gcc3-build-cross.inc gets required in.
This file will set EXTRA_OECONF to have the "--with-sysroot" option. But a
little later, gcc-cross-initial.inc gets required in. This file resets
EXTRA_OECONF, so the "--with-sysroot" option added by gcc3-build-cross.inc
gets lost.
I attempted to just swap the order of "require gcc-cross_${PV}.bb"
and "require gcc-cross-initial.inc" in gcc-cross-initial_4.1.2.bb. Doing
a "bitbake -c rebuild gcc-cross-initial" built the gcc-cross-initial with the
proper "--with-sysroot" option. Hooray! But then when I tried to resume
building the image, this swap made the overall build system think
that "avr32-gcc-initial-4.1.2" wasn't available. Back to the drawing board.
So then I changed gcc-cross-initial.inc to append onto EXTRA_OECONF instead of
setting EXTRA_OECONF. This seems to work for me now, although I don't know
what other implications this change may have.
Comments?
---
Geoffrey
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging ()
2008-03-07 22:56 ` Geoffrey Wossum
@ 2008-03-07 23:33 ` Richard Purdie
2008-03-07 23:46 ` Geoffrey Wossum
0 siblings, 1 reply; 10+ messages in thread
From: Richard Purdie @ 2008-03-07 23:33 UTC (permalink / raw)
To: openembedded-devel
On Fri, 2008-03-07 at 16:56 -0600, Geoffrey Wossum wrote:
> Checking the log.do_configure for gcc-cross-initial, --with-sysroot was NOT
> getting passed to gcc's configure script.
>
> So I started parsing gcc-cross-initial_4.1.2.bb by hand. Here's what it looks
> like is happening to me. Eventually, gcc3-build-cross.inc gets required in.
> This file will set EXTRA_OECONF to have the "--with-sysroot" option. But a
> little later, gcc-cross-initial.inc gets required in. This file resets
> EXTRA_OECONF, so the "--with-sysroot" option added by gcc3-build-cross.inc
> gets lost.
>
> I attempted to just swap the order of "require gcc-cross_${PV}.bb"
> and "require gcc-cross-initial.inc" in gcc-cross-initial_4.1.2.bb. Doing
> a "bitbake -c rebuild gcc-cross-initial" built the gcc-cross-initial with the
> proper "--with-sysroot" option. Hooray! But then when I tried to resume
> building the image, this swap made the overall build system think
> that "avr32-gcc-initial-4.1.2" wasn't available. Back to the drawing board.
>
> So then I changed gcc-cross-initial.inc to append onto EXTRA_OECONF instead of
> setting EXTRA_OECONF. This seems to work for me now, although I don't know
> what other implications this change may have.
I was meaning to ask what changed you'd have to make to get your image
to build.
By strange coincidence I was looking at gcc-cross-initial today and
wondered about this. I concluded that gcc-cross-initial does not need
sysroot support though. gcc-cross-initial is only used to build the libc
for gcc-cross "proper" and for that you don't need anything in staging.
So the question is why would gcc-cross-initial need to find things in
staging?
Cheers,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging ()
2008-03-07 23:33 ` Richard Purdie
@ 2008-03-07 23:46 ` Geoffrey Wossum
2008-03-10 13:59 ` Geoffrey Wossum
0 siblings, 1 reply; 10+ messages in thread
From: Geoffrey Wossum @ 2008-03-07 23:46 UTC (permalink / raw)
To: openembedded-devel
On Friday 07 March 2008 05:33:20 pm Richard Purdie wrote:
> On Fri, 2008-03-07 at 16:56 -0600, Geoffrey Wossum wrote:
> > Checking the log.do_configure for gcc-cross-initial, --with-sysroot was
> I was meaning to ask what changed you'd have to make to get your image
> to build.
>
> By strange coincidence I was looking at gcc-cross-initial today and
> wondered about this. I concluded that gcc-cross-initial does not need
> sysroot support though. gcc-cross-initial is only used to build the libc
> for gcc-cross "proper" and for that you don't need anything in staging.
>
> So the question is why would gcc-cross-initial need to find things in
> staging?
I'm using currently uClibc 0.9.28. glibc doesn't currently support the AVR32.
It's during uclibc-initial-0.9.28's do_populate_staging() step that this
whole sysroot issue pops up. Something about that step causes something to
get linked, and that's when you the problem occurs. I recreated the problem
today. Should have saved the log.
Maybe uClibc 0.9.29 fixes this issue. I need to move to it anyway. Koen
suggested it as a fix for my init segfault issue, plus I think avahi needs
it, and I need avahi in my final product.
It looks like Atmel's AVR32 patches for uClibc 0.9.29 are already in
OpenEmbedded. Looks like I just need to create a uClibc.machine file for the
AVR32. I'll try out building against uClibc 0.9.29 on Monday.
---
Geoffrey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging ()
2008-03-07 23:46 ` Geoffrey Wossum
@ 2008-03-10 13:59 ` Geoffrey Wossum
0 siblings, 0 replies; 10+ messages in thread
From: Geoffrey Wossum @ 2008-03-10 13:59 UTC (permalink / raw)
To: openembedded-devel
On Friday 07 March 2008 05:46:46 pm Geoffrey Wossum wrote:
> On Friday 07 March 2008 05:33:20 pm Richard Purdie wrote:
> > On Fri, 2008-03-07 at 16:56 -0600, Geoffrey Wossum wrote:
> > > Checking the log.do_configure for gcc-cross-initial, --with-sysroot was
> >
> > I was meaning to ask what changed you'd have to make to get your image
> > to build.
> >
> > By strange coincidence I was looking at gcc-cross-initial today and
> > wondered about this. I concluded that gcc-cross-initial does not need
> > sysroot support though. gcc-cross-initial is only used to build the libc
> > for gcc-cross "proper" and for that you don't need anything in staging.
> >
> > So the question is why would gcc-cross-initial need to find things in
> > staging?
> Maybe uClibc 0.9.29 fixes this issue. I need to move to it anyway. Koen
> suggested it as a fix for my init segfault issue, plus I think avahi needs
> it, and I need avahi in my final product.
uClibc 0.9.29 does indeed fix these strange build issues I was having. I can
build everything with uClibc 0.9.29 without any mods to the files in
packages/gcc. So that's good.
Still getting the segfault when init starts up, though.
---
Geoffrey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging ()
2008-03-05 20:43 ` Richard Purdie
2008-03-05 20:58 ` AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging () Geoffrey Wossum
@ 2008-03-07 21:23 ` Geoffrey Wossum
1 sibling, 0 replies; 10+ messages in thread
From: Geoffrey Wossum @ 2008-03-07 21:23 UTC (permalink / raw)
To: openembedded-devel
On Wednesday 05 March 2008 02:43:41 pm Richard Purdie wrote:
> Hi,
>
> On Wed, 2008-03-05 at 13:49 -0600, Geoffrey Wossum wrote:
> > I'm working on getting OpenEmbeddded to build for an AVR32 system. Right
> > now I'm using an AT32STK1000, although eventually I'll be running on
> > custom hardware.
> >
> > I've been having problems getting past the uclibc-initial (0.9.28). I
> > get an error when it attempts do_populate_staging(). Here's the error
> > I've been getting.
>
> I think both your fixes are correct. Those changes were already made in
> poky but had got lost somewhere between there and OE.dev, I'll sync them
> up. Thanks for the report and let us know if anything doesn't work after
> I merge them.
Just pulled this patch out of monotone.
uclibc.inc defines UCLIBC_STAGE_PREFIX, which is what uclibc-initial_0.9.29.bb
references. The other uclibc-initial_0.9.*.bb files reference
UCLIBC_STAGING_PREFIX, though. Changing it to UCLIBC_STAGE_PREFIX in
uclibc-initial_0.9.28.bb fixes this for me.
---
Geoffrey
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-03-10 14:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-05 19:49 AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging() Geoffrey Wossum
2008-03-05 20:43 ` Richard Purdie
2008-03-05 20:58 ` AVR32 + OpenEmbedded: Problems with uclibc-initial do_populate_staging () Geoffrey Wossum
2008-03-05 21:59 ` Richard Purdie
2008-03-05 22:47 ` Geoffrey Wossum
2008-03-07 22:56 ` Geoffrey Wossum
2008-03-07 23:33 ` Richard Purdie
2008-03-07 23:46 ` Geoffrey Wossum
2008-03-10 13:59 ` Geoffrey Wossum
2008-03-07 21:23 ` Geoffrey Wossum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.