NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.44k stars 13.65k forks source link

Build failure: simavr #295610

Closed OPNA2608 closed 6 months ago

OPNA2608 commented 6 months ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. build simavr on any platform (according to Hydra)

Build log

make -C tests RELEASE=0
make[1]: Entering directory '/build/source/tests'
AVR-CC atmega2560_uart_echo.c
atmega2560_uart_echo.c: In function 'main':
atmega2560_uart_echo.c:109:16: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Warray-bounds=-Warray-bounds=8;;]
  109 |         UCSR3A &= ~(1 << U2X3);
      |                ^~
cc1: note: source object is likely at address zero
/nix/store/r0pw76qs88qwz3v3p40ml0jh968083ka-avr-binutils-2.40/bin/avr-ld: skipping incompatible /nix/store/rx3ncjpfkj68400si0nchwddr2m1pz7s-avr-libc-avr-2.1.0/avr/lib/libm.a when searching for -lm
/nix/store/r0pw76qs88qwz3v3p40ml0jh968083ka-avr-binutils-2.40/bin/avr-ld: skipping incompatible /nix/store/rx3ncjpfkj68400si0nchwddr2m1pz7s-avr-libc-avr-2.1.0/avr/lib/libc.a when searching for -lc
   2333      68      89    2490     9ba atmega2560_uart_echo.axf
AVR-CC atmega48_disabled_timer.c
    208       0       0     208      d0 atmega48_disabled_timer.axf
AVR-CC atmega48_enabled_timer.c
    214       0       0     214      d6 atmega48_enabled_timer.axf
AVR-CC atmega48_watchdog_test.c
    410      82       6     498     1f2 atmega48_watchdog_test.axf
AVR-CC atmega644_adc_test.c
atmega644_adc_test.c: In function 'main':
atmega644_adc_test.c:89:16: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Warray-bounds=-Warray-bounds=8;;]
   89 |         ADCSRA &= ~(1 << ADIE); // remove interrupt
      |                ^~
cc1: note: source object is likely at address zero
atmega644_adc_test.c:100:16: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Warray-bounds=-Warray-bounds=8;;]
  100 |         ADCSRA &= ~(1 << ADEN); // disable ADC...
      |                ^~
cc1: note: source object is likely at address zero
/nix/store/r0pw76qs88qwz3v3p40ml0jh968083ka-avr-binutils-2.40/bin/avr-ld: /nix/store/rx3ncjpfkj68400si0nchwddr2m1pz7s-avr-libc-avr-2.1.0/avr/lib/libc.a(vfprintf_std.o): in function `.L15':
vfprintf.c:(.text.avr-libc+0xd8): undefined reference to `__mulqi3'
/nix/store/r0pw76qs88qwz3v3p40ml0jh968083ka-avr-binutils-2.40/bin/avr-ld: /nix/store/rx3ncjpfkj68400si0nchwddr2m1pz7s-avr-libc-avr-2.1.0/avr/lib/libc.a(vfprintf_std.o): in function `.L18':
vfprintf.c:(.text.avr-libc+0xe4): undefined reference to `__mulqi3'
collect2: error: ld returned 1 exit status
make[1]: *** [../Makefile.common:161: atmega644_adc_test.axf] Error 1

Additional context

n/a

Notify maintainers

@goodrone

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-linux"`
 - host os: `Linux 6.7.5, NixOS, 24.05 (Uakari), 24.05pre586498.0e74ca98a74b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos, nixos-hardware"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

bjornfor commented 6 months ago

Broken by b2844f89d10d4a2665aed231144950c354f275a6.

bjornfor commented 6 months ago

Broken by b2844f8.

Ping @pennae (author), @emilytrau (committer).

OPNA2608 commented 6 months ago

https://github.com/NixOS/nixpkgs/pull/273047 might fix it? Will test when I'm home tonight.

OPNA2608 commented 6 months ago

Can confirm that it will fix this.

bjornfor commented 6 months ago

Can confirm that it will fix this.

Yes, because part of https://github.com/NixOS/nixpkgs/pull/273047 is reverting the offending commit.