buserror / simavr

simavr is a lean, mean and hackable AVR simulator for linux & OSX
GNU General Public License v3.0
1.56k stars 365 forks source link

build error: "initialization of flexible array member in a nested context" #205

Closed bjornfor closed 7 years ago

bjornfor commented 7 years ago

Hi,

I noticed simavr is broken in the Nix package manager. It looks like the code is using a construct that gcc doesn't accept anymore (from what I can tell):

$ nix-build -A simavr
...
AVR-CC atmega32_ssd1306.c
In file included from atmega88_uart_echo.c:22:0:
atmega88_uart_echo.c:34:23: error: initialization of flexible array member in a nested context
  { AVR_MCU_VCD_SYMBOL("UDR0"), .what = (void*)&UDR0, },
                       ^

A quick seach led me here: http://stackoverflow.com/questions/3875523/lookup-table-in-c

bjornfor commented 7 years ago

CC @goodrone (maintainer of the package in Nixpkgs).

buserror commented 7 years ago

This is already fixed in the master branch.

bjornfor commented 7 years ago

Great! When will a release with that fix be ready?

buserror commented 7 years ago

Not sure; do you need a tag to do that?

bjornfor commented 7 years ago

Yes, a git tag is what I had in mind. I see you have releases/tags already at https://github.com/buserror/simavr/releases. I'm simply looking for a v1.5 or something, that includes the fix, which we can add to Nixpkgs.

buserror commented 7 years ago

Ok, well unless someone has an objection, this version appear quite stable as it is, and I have a few 'bigger' bits to push later, so I'll tag...

bjornfor commented 7 years ago

Thank you! Nixpkgs now has v1.5 (working).