can't build bees against latest avr32 toolchain
Closed this issue · 5 comments
so... finally got some time/motivation to hack on aleph again. Went to set up my laptop with the toolchains once more but had trouble with avr32 toolchain.
I'm trying to build against:
avr32-gnu-toolchain-3.4.3.820-linux.any.x86_64.tar.gz
avr32-headers-6.2.0.742.zip
pretty sure I've set up thet tool correctly. However instructions in the README reference a directory avr in the zipfile which is not there in the zip I just downloaded from atmel.
attempting to build bees barfs like this:
apps/bees [dev_tehn●] » make
CC avr32/drivers/ebi/smc/smc.o
as: loadlocale.c:131: _nl_intern_locale_data: Assertion cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed. In file included from ../../avr32_lib/asf-3.7.3/avr32/drivers/ebi/smc/smc.c:46: ../../avr32_lib/asf-3.7.3/avr32/utils/compiler.h:62:22: error: avr32/io.h: No such file or directory In file included from ../../avr32_lib/asf-3.7.3/avr32/drivers/ebi/smc/smc.c:48: ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:94: error: expected specifier-qualifier-list before 'uint32_t' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:112: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpio_enable_module' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:114: error: expected '=', ',', ';', 'asm' or '**attribute**' before 'gpio_enable_module_pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:116: error: expected declaration specifiers or '...' before 'uint32_t' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:118: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:120: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:122: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:137: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:139: error: expected ')' before 'port' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:141: error: expected '=', ',', ';', 'asm' or '**attribute**' before 'gpio_get_pin_value' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:150: error: expected '=', ',', ';', 'asm' or '**attribute**' before 'static' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:162: error: expected '=', ',', ';', 'asm' or '**attribute**' before 'static' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:167: error: expected '=', ',', ';', 'asm' or '**attribute**' before 'gpio_get_gpio_pin_output_value' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:169: error: expected '=', ',', ';', 'asm' or '**attribute**' before 'gpio_get_gpio_open_drain_pin_output_value' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:171: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:173: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:175: error: expected ')' before 'port' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:177: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:179: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:181: error: expected ')' before 'port' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:183: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:185: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:187: error: expected ')' before 'port' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:189: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:191: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:193: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:195: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:197: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:199: error: expected '=', ',', ';', 'asm' or '**attribute**' before 'gpio_enable_pin_interrupt' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:201: error: expected ')' before 'pin' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:203: error: expected '=', ',', ';', 'asm' or '**attribute**' before 'gpio_get_pin_interrupt_flag' ../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:205: error: expected ')' before 'pin' avr32-gcc: Internal error: Aborted (program as) Please submit a full bug report. See http://www.atmel.com/avr for instructions. ../../avr32_lib/asf-3.7.3/avr32/utils/make/Makefile.avr32.in:367: recipe for target 'avr32/drivers/ebi/smc/smc.o' failed make: **\* [avr32/drivers/ebi/smc/smc.o] Error 1 apps/bees [dev_tehn●] » make clean RMDIR avr32/drivers/ebi/smc/ ../../apps/bees/src/scalers/ ../../apps/bees/src/pages/ ../../apps/bees/src/ops/ ../../apps/bees/src/ apps/bees [dev_tehn●] » make MKDIR avr32/drivers/ebi/smc/ CC avr32/drivers/ebi/smc/smc.o as: loadlocale.c:131: _nl_intern_locale_data: Assertion
cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
In file included from ../../avr32_lib/asf-3.7.3/avr32/drivers/ebi/smc/smc.c:46:
../../avr32_lib/asf-3.7.3/avr32/utils/compiler.h:62:22: error: avr32/io.h: No such file or directory
In file included from ../../avr32_lib/asf-3.7.3/avr32/drivers/ebi/smc/smc.c:48:
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:94: error: expected specifier-qualifier-list before 'uint32_t'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:112: error: expected '=', ',', ';', 'asm' or 'attribute' before 'gpio_enable_module'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:114: error: expected '=', ',', ';', 'asm' or 'attribute' before 'gpio_enable_module_pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:116: error: expected declaration specifiers or '...' before 'uint32_t'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:118: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:120: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:122: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:137: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:139: error: expected ')' before 'port'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:141: error: expected '=', ',', ';', 'asm' or 'attribute' before 'gpio_get_pin_value'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:150: error: expected '=', ',', ';', 'asm' or 'attribute' before 'static'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:162: error: expected '=', ',', ';', 'asm' or 'attribute' before 'static'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:167: error: expected '=', ',', ';', 'asm' or 'attribute' before 'gpio_get_gpio_pin_output_value'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:169: error: expected '=', ',', ';', 'asm' or 'attribute' before 'gpio_get_gpio_open_drain_pin_output_value'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:171: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:173: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:175: error: expected ')' before 'port'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:177: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:179: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:181: error: expected ')' before 'port'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:183: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:185: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:187: error: expected ')' before 'port'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:189: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:191: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:193: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:195: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:197: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:199: error: expected '=', ',', ';', 'asm' or 'attribute' before 'gpio_enable_pin_interrupt'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:201: error: expected ')' before 'pin'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:203: error: expected '=', ',', ';', 'asm' or 'attribute' before 'gpio_get_pin_interrupt_flag'
../../avr32_lib/asf-3.7.3/avr32/drivers/gpio/gpio.h:205: error: expected ')' before 'pin'
avr32-gcc: Internal error: Aborted (program as)
Please submit a full bug report.
See http://www.atmel.com/avr for instructions.
../../avr32_lib/asf-3.7.3/avr32/utils/make/Makefile.avr32.in:367: recipe for target 'avr32/drivers/ebi/smc/smc.o' failed
make: *** [avr32/drivers/ebi/smc/smc.o] Error 1
The toolchain and headers you mention are a bit newer than the setup I have been using. I've almost exclusively been using the vagrant vm configuration from @bensteinberg (https://github.com/bensteinberg/aleph-development). The vagrant configuration leverages:
- atmel-headers-6.1.3.1475.zip
- avr32-gnu-toolchain-3.4.2.435-linux.any.x86_64.tar.gz
I just tested rebuilding the current bees dev
branch on my vm and it built cleanly.
(FWIW I'm using VMWare instead of VirtualBox and I keep the source tree on the underlying OSX system in order to easily edit it - the tweaks I made can be found here https://github.com/ngwese/aleph-development/tree/ngwese-dev-setup)
hmm - can't find that version of the atmel headers/toolkit anywhere online. Didn't have too many issues before getting everything set up on my old laptop - maybe I can dig out the old avr32 toolchain I was using...
garr - so I dug out old version of avr32 stuff only to get the same error.
Realised the environment variable LC_ALL was not set, which seems to causes avr32-as to die.
adding the following line to my zshrc did the trick:
export LC_ALL=en_GB
And I'll leave this open because it turns out even with the fix to my environment variables I still can't build with currently distributed avr32 toolchain.
Lucky for me I had a backup of 3.4.2 lying around, as I couldn't find the "good" version anywhere online...
and closed again - all works fine. I just put avr32 headers in the wrong place...