Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617432 - sys-devel/gcc-5.4.0: does not build avr executables
Summary: sys-devel/gcc-5.4.0: does not build avr executables
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 628152 (view as bug list)
Depends on: 620316
Blocks:
  Show dependency tree
 
Reported: 2017-05-03 22:56 UTC by Jan Hrabe
Modified: 2017-12-24 11:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hrabe 2017-05-03 22:56:52 UTC
After installing version 5.4.0, I can no longer build any of the executables for various AVR targets, e.g.:

avr-gcc -Os -g -std=gnu99 -Wall -Wextra -DF_CPU=1000000UL -DBAUD=9600UL -I.  -mmcu=atmega328p -c -o main.o main.c
avr-gcc -Wl,-Map,main.map  -mmcu=atmega328p main.o -lm -o main.elf
/usr/libexec/gcc/avr/ld: cannot find crtatmega328p.o: No such file or directory
/usr/libexec/gcc/avr/ld: cannot find -latmega328p
collect2: error: ld returned 1 exit status
make: *** [Makefile:119: main.elf] Error 1


Configuration:

avr-gcc -v
Using built-in specs.
Reading specs from /usr/lib/gcc/avr/5.4.0/device-specs/specs-avr2
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/avr/gcc-bin/5.4.0/avr-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/avr/5.4.0/lto-wrapper
Target: avr
Configured with: /var/tmp/portage/cross-avr/gcc-5.4.0-r3/work/gcc-5.4.0/configure --host=x86_64-pc-linux-gnu --target=avr --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/avr/gcc-bin/5.4.0 --includedir=/usr/lib/gcc/avr/5.4.0/include --datadir=/usr/share/gcc-data/avr/5.4.0 --mandir=/usr/share/gcc-data/avr/5.4.0/man --infodir=/usr/share/gcc-data/avr/5.4.0/info --with-gxx-include-dir=/usr/lib/gcc/avr/5.4.0/include/g++-v5 --with-python-dir=/share/gcc-data/avr/5.4.0/python --enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 5.4.0-r3 p1.3, pie-0.6.5' --enable-libstdcxx-time --enable-poison-system-directories --enable-shared --disable-threads --disable-bootstrap --enable-multilib --disable-altivec --disable-fixed-point --disable-libgcj --disable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --disable-vtable-verify --disable-libvtv --disable-libquadmath --enable-lto --without-isl --disable-libsanitizer
Thread model: single
gcc version 5.4.0 (Gentoo 5.4.0-r3 p1.3, pie-0.6.5)
Comment 1 Richard Kenney 2017-06-01 07:49:28 UTC
I just found the same issue.  Turns out that the stable version of avr-libc (1.8.0) is not compatible with gcc-5.4.0. See https://forums.gentoo.org/viewtopic-t-1039606-start-0.html

Upgrading to avr-libc-2.0.0 fixes it for me.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-30 22:42:51 UTC
dev-embedded/avr-libc-2.0.0 is marked stable. That should help at least a bit.

Thanks for the report!
Comment 3 Johannes Huber (RETIRED) gentoo-dev 2017-12-24 11:43:48 UTC
*** Bug 628152 has been marked as a duplicate of this bug. ***