Skip to contentSkip to conversation

binutils fails for AVR32

DISCUSSION Ulf Samuelsson 5 participants 9 messages Jul 20, 2008 – Oct 4, 2008

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I managed to complete the AT91SAM9263 build, but now I am caught in the configure hell when trying the AVR32.

I first got stuck in the binutils build since CC is defined as "'CC=ccache" in the binutils Makefile, and this should be "'CC=ccache gcc'"

(<OpenEmbedded>/build-avr32/tmp/work/avr32-angstrom-linux-uclibc/ \
binutils-cross-2.17-r6/binutils-2.17/ \
build.i686-linux.avr32-angstrom-linux-uclibc/Makefile)

The failure means that the initial quote character is dangling free.

I tried to check binutils "configure" where this is defined but came to the conclusion that this was part of "$ac_arg" and have not managed to dig any further.

Managed to fix that by patching binutils-avr32.inc Added:

(cd ${B} && sed -i -e "s,'CC=ccache,'CC=ccache gcc'," Makefile)

to "do_avr32_configure_bfd" but then when making "intl", there is a complaint that both the build and host is i686-linux.

| Configuring in ./intl
| configure: warning: build_alias=i686-linux: invalid host type
| configure: warning: host_alias=i686-linux: invalid host type
| configure: error: can only configure for one host and one target at a time
| make[1]: *** [configure-intl] Error 1
| make[1]: Leaving directory

`/mnt/home/ulf/OpenEmbedded/build-avr32/tmp/work/avr32-angstrom-linux-uclibc/binutils-cross-2.17-r6/binutils-2.17/build.i686-linux.avr32-angstrom-linux-uclibc' | make: *** [all] Error 2
| FATAL: oe_runmake failed

These problems seems to be caused by build_alias, host_alias and target_alias beeing passed to "configure", but these are only supported by binutils-2.18 and not 2.17 which is used by the AVR32.

I am adding
~ (cd ${B} && sed -i -e "s,'host_alias=i686-linux',," Makefile) ~ (cd ${B} && sed -i -e "s,'build_alias=i686-linux',," Makefile) ~ (cd ${B} && sed -i -e "s,'target_alias=avr32-angstrom-linux-uclibc',," Makefile)

to the do_avr32_configure_bfd

host_alias etc. should not be generated in the first place for binutils-2.17...

Anyone got the AVR32 toolchain to build properly using a recent version?

BR
Ulf Samuelsson

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIg7yxAyRRH5cXxqwRAiwtAJ9mgndjSDdeM/dgyHOR7wrjWOYMMACeNu/x IK9zwA5tisI3ZSFeSkutq9Q=
=QY5Q
-----END PGP SIGNATURE-----

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ulf Samuelsson skrev:

|
| I managed to complete the AT91SAM9263 build, but
| now I am caught in the configure hell when trying the AVR32.
|
|
| I first got stuck in the binutils build since CC is defined as
| "'CC=ccache" in the binutils Makefile, and this should be
| "'CC=ccache gcc'"
|
| (<OpenEmbedded>/build-avr32/tmp/work/avr32-angstrom-linux-uclibc/ \
| binutils-cross-2.17-r6/binutils-2.17/ \
| build.i686-linux.avr32-angstrom-linux-uclibc/Makefile)
|
| The failure means that the initial quote character is dangling free.
|
| I tried to check binutils "configure" where this is defined
| but came to the conclusion that this was part of "$ac_arg"
| and have not managed to dig any further.
|
|
| Managed to fix that by patching binutils-avr32.inc
| Added:
|
| (cd ${B} && sed -i -e "s,'CC=ccache,'CC=ccache gcc'," Makefile)
|
| to "do_avr32_configure_bfd" but then when making "intl", there
| is a complaint that both the build and host is i686-linux.
|
| | Configuring in ./intl
| | configure: warning: build_alias=i686-linux: invalid host type
| | configure: warning: host_alias=i686-linux: invalid host type
| | configure: error: can only configure for one host and one target at a
| time
| | make[1]: *** [configure-intl] Error 1
| | make[1]: Leaving directory
|

`/mnt/home/ulf/OpenEmbedded/build-avr32/tmp/work/avr32-angstrom-linux-uclibc/binutils-cross-2.17-r6/binutils-2.17/build.i686-linux.avr32-angstrom-linux-uclibc'

|
| | make: *** [all] Error 2
| | FATAL: oe_runmake failed
|
| These problems seems to be caused by build_alias, host_alias and
| target_alias beeing passed to "configure", but these are only
| supported by binutils-2.18 and not 2.17 which is used by the AVR32.
|

Actually this refers to "./intl/configure".

BR
Ulf

| I am adding
| ~ (cd ${B} && sed -i -e "s,'host_alias=i686-linux',," Makefile)
| ~ (cd ${B} && sed -i -e "s,'build_alias=i686-linux',," Makefile)
| ~ (cd ${B} && sed -i -e "s,'target_alias=avr32-angstrom-linux-uclibc',,"
| Makefile)
|
| to the do_avr32_configure_bfd
|
| host_alias etc. should not be generated in the first place for
| binutils-2.17...
|
| Anyone got the AVR32 toolchain to build properly using a recent version?
|
| BR
| Ulf Samuelsson
|

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIg8LsAyRRH5cXxqwRAp84AJ9vlNOBezsHBIskXGF61ox9ECCqIQCfdfbU Jfb36wi+w8ZGRfojXZUvzCY=
=q39W
-----END PGP SIGNATURE-----

#2 lore raw
In reply to Ulf Samuelsson

Hello Ulf,

Quoted 7 lines · Ulf Samuelsson

I managed to complete the AT91SAM9263 build, but now I am caught in the configure hell when trying the AVR32.

...

Anyone got the AVR32 toolchain to build properly using a recent version?

Yes, I am building a AVR32 project using 478afd231213fcf731ddefac0314beee5d95b5fb which works fine for me.

I upgrade every now and then. Will see about more recent revisions of OE.

Regards,

Signature · 1 line
Leon
#3 lore raw

Hi,
got an ngw100 and wanted to build angstrom for it and have the same issues as Ulf with binutils-cross.

Quoted 6 lines · Leon Woestenberg
Quoted 2 lines

Anyone got the AVR32 toolchain to build properly using a recent version?

Yes, I am building a AVR32 project using 478afd231213fcf731ddefac0314beee5d95b5fb which works fine for me.

I upgrade every now and then. Will see about more recent revisions of OE.

Can you try with a current one?

Regards
Robert

#4 lore raw
Quoted 3 lines · Robert Schuster

Hi,
got an ngw100 and wanted to build angstrom for it and have the same issues as Ulf with binutils-cross.

If you work around that you'll notice that gcc-cross doesn't compile anymore :( I'm hoping to spend some time on it next week, but don't let that stop you from fixing it yourself :)

regards,

Koen

Quoted 20 lines
Quoted 6 lines · Leon Woestenberg
Quoted 2 lines

Anyone got the AVR32 toolchain to build properly using a recent version?

Yes, I am building a AVR32 project using 478afd231213fcf731ddefac0314beee5d95b5fb which works fine for me.

I upgrade every now and then. Will see about more recent revisions of OE.

Can you try with a current one?

Regards
Robert

------------------------------------------------------------------------

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#5 lore raw

Hi,

Quoted 7 lines · Koen Kooi
Quoted 3 lines · Robert Schuster

Hi,
got an ngw100 and wanted to build angstrom for it and have the same issues as Ulf with binutils-cross.

If you work around that you'll notice that gcc-cross doesn't compile anymore :( I'm hoping to spend some time on it next week

Oh no. :$

I just prepared a patch that takes Ulf's approach and implements it indepedent from $BUILD_SYS. I attached the patch but when you say this will break gcc-cross it is probably moot.

Quoted 1 line

, but don't let that stop you from fixing it yourself :)

This is my first encounter with AVR32. :)

I just looked at the Makefile that is generated for binutils 2.18.50.0.7
(machine = beagleboard). The *_CONFIGARGS variables do not contain
stuff like host_alias and CC there. I suspect that due to some weird script problem (perhaps quoting?) things end up in the *_CONFIGARGS variables that should not be there. The three variables are supposed to contain the arguments given to the initial 'configure' but in the avr32's case they contain environment variables.

As Ulf already told it all leads to ac_configure_args (or ac_arg). The shell code that generates it is different for our binutils (avr32) 2.17 and 2.18.50.0.7. The former is created by autoconf 2.61 (AFAIU it is re-generated after the avr32 patch is applied), while the latter is created by 2.61.

--

While writing this my build has failed at gcc-cross. The compiler crashes while compiling the Objective C library. As a workaround I disabled it and now it works. So many bugs ... :|

Regards
Robert

#

# old_revision [20adcf1d7f147947dc29ead2037c53133b6eb39f]
#
# patch "packages/binutils/binutils-avr32.inc"
#  from [7d4de5cdff8cbe23a79ceaf4ae9d202ba3b70583]
#    to [32742801acaf13d8d36e0bccb714fea20c6053da]
#
============================================================
--- packages/binutils/binutils-avr32.inc	7d4de5cdff8cbe23a79ceaf4ae9d202ba3b70583
+++ packages/binutils/binutils-avr32.inc	32742801acaf13d8d36e0bccb714fea20c6053da
@@ -18,6 +18,14 @@ do_avr32_configure_bfd () {
 do_avr32_configure_bfd () {
         if test ${TARGET_ARCH} == avr32; then

+ # fix Makefile brokenness due to unmatched single quotes
+ (cd ${B} && sed -i -e "s,'CC=ccache,'CC=${CC}'," Makefile)
+ # *_alias options are not supported in binutils 2.17 and need
+ # to be removed
+ (cd ${B} && sed -i -e "s,'host_alias=.*',," Makefile)
+ (cd ${B} && sed -i -e "s,'build_alias=.*',," Makefile)
+ (cd ${B} && sed -i -e "s,'target_alias=*.',," Makefile)
+

             (cd ${B} && make configure-bfd) || die "Error running 'make configure-bfd'"
             (cd ${B}/bfd && make headers) || die "Error running 'make headers'"
         fi
#6 lore raw
In reply to Ulf Samuelsson
Quoted 17 lines
| Configuring in ./intl
| configure: warning: build_alias=i686-linux: invalid host type
| configure: warning: host_alias=i686-linux: invalid host type
| configure: error: can only configure for one host and one target at a

time
| make[1]: *** [configure-intl] Error 1
| make[1]: Leaving directory `/mnt/home/ulf/OpenEmbedded/build-avr32/tmp/work/avr32-angstrom-linux-uclibc/binutils-cross-2.17-r6/binutils-2.17/build.i686-linux.avr32-angstrom-linux-uclibc'

| make: *** [all] Error 2
| FATAL: oe_runmake failed

These problems seems to be caused by build_alias, host_alias and target_alias beeing passed to "configure", but these are only supported by binutils-2.18 and not 2.17 which is used by the AVR32.

Quoted 8 lines

I am adding
~ (cd ${B} && sed -i -e "s,'host_alias=i686-linux',," Makefile) ~ (cd ${B} && sed -i -e "s,'build_alias=i686-linux',," Makefile) ~ (cd ${B} && sed -i -e "s,'target_alias=avr32-angstrom-linux-uclibc',," Makefile)

to the do_avr32_configure_bfd

Did you add this as prepend to this stage ? in which bb file did you add it ?
Did the whole toolchain work out for you now ?

#7 lore raw
Quoted 22 lines · Robert Wörle
Quoted 22 lines
| Configuring in ./intl
| configure: warning: build_alias=i686-linux: invalid host type
| configure: warning: host_alias=i686-linux: invalid host type
| configure: error: can only configure for one host and one target at a

time
| make[1]: *** [configure-intl] Error 1
| make[1]: Leaving directory `/mnt/home/ulf/OpenEmbedded/build-avr32/tmp/work/avr32-angstrom-linux-uclibc/binutils-cross-2.17-r6/binutils-2.17/build.i686-linux.avr32-angstrom-linux-uclibc'

| make: *** [all] Error 2
| FATAL: oe_runmake failed

These problems seems to be caused by build_alias, host_alias and target_alias beeing passed to "configure", but these are only supported by binutils-2.18 and not 2.17 which is used by the AVR32.

I am adding

~ (cd ${B}&&  sed -i -e "s,'host_alias=i686-linux',," Makefile)
~ (cd ${B}&&  sed -i -e "s,'build_alias=i686-linux',," Makefile)
~ (cd ${B}&&  sed -i -e "s,'target_alias=avr32-angstrom-linux-uclibc',,"

Makefile)

Quoted 5 lines
Quoted 2 lines

to the do_avr32_configure_bfd

Did you add this as prepend to this stage ? in which bb file did you add it ?
Did the whole toolchain work out for you now ?

It seems your metadata is obsolete, avr32 builds have 'just worked' for a few months now thanks to several companies funding OE avr32 work.

A sample of what angstrom can do now:

http://www.youtube.com/watch?v=vvOyixL8BRM

regards,

Koen

#8 lore raw
Quoted 30 lines · Koen Kooi
Quoted 23 lines · Robert Wörle
Quoted 23 lines
| Configuring in ./intl
| configure: warning: build_alias=i686-linux: invalid host type
| configure: warning: host_alias=i686-linux: invalid host type
| configure: error: can only configure for one host and one target at a

time
| make[1]: *** [configure-intl] Error 1
| make[1]: Leaving directory `/mnt/home/ulf/OpenEmbedded/build-avr32/tmp/work/avr32-angstrom-linux-uclibc/binutils-cross-2.17-r6/binutils-2.17/build.i686-linux.avr32-angstrom-linux-uclibc'

| make: *** [all] Error 2
| FATAL: oe_runmake failed

These problems seems to be caused by build_alias, host_alias and target_alias beeing passed to "configure", but these are only supported by binutils-2.18 and not 2.17 which is used by the AVR32.

I am adding

~ (cd ${B}&&  sed -i -e "s,'host_alias=i686-linux',," Makefile)
~ (cd ${B}&&  sed -i -e "s,'build_alias=i686-linux',," Makefile)
~ (cd ${B}&&  sed -i -e "s,'target_alias=avr32-angstrom-linux-uclibc',,"

Makefile)

Quoted 5 lines
Quoted 2 lines

to the do_avr32_configure_bfd

Did you add this as prepend to this stage ? in which bb file did you add it ?
Did the whole toolchain work out for you now ?

Quoted 7 lines

It seems your metadata is obsolete, avr32 builds have 'just worked' for a few months now thanks to several companies funding OE avr32 work.

A sample of what angstrom can do now:

http://www.youtube.com/watch?v=vvOyixL8BRM

wow thats cool !
btw .. i just managed to build avr32 again with the current meta`s by just removing the binutils-avr32.inc !! It went on and finished minimal-image !
And that on a x86_64 host ! What a joy

Hail you, Koen and the others .. feels like i can now relay on the oe chain again and start building up more products on this nice cpu

Cheers Rob

Quoted 2 lines

Koen