Created attachment 390358 [details] /var/tmp/portage/cross-avr/gcc-4.8.3/work/build/avr/libsanitizer/config.log I'm trying to build the AVR toolchain on AMD64, as per this guide[1] with the help of this other guide[2]. [1]: http://playground.arduino.cc/Linux/Gentoo [2]: http://wiki.gentoo.org/wiki/Arduino When I run the following command: $ sudo USE="-openmp" crossdev -t avr -s4 -S --without-headers I get this output: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * crossdev version: 20141030 * Host Portage ARCH: amd64 * Target Portage ARCH: * * Target System: avr * Stage: 4 (C/C++ compiler) * ABIs: default * binutils: binutils-[stable] * gcc: gcc-[stable] * libc: avr-libc-[stable] * CROSSDEV_OVERLAY: /usr/local/portage * PORT_LOGDIR: /var/log/portage * PORTAGE_CONFIGROOT: * Portage flags: _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ * leaving sys-devel/binutils in /usr/local/portage * leaving sys-devel/gcc in /usr/local/portage * leaving dev-embedded/avr-libc in /usr/local/portage * leaving sys-devel/gdb in /usr/local/portage * leaving metadata/layout.conf alone in /usr/local/portage _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ * Log: /var/log/portage/cross-avr-binutils.log * Emerging cross-binutils ... [ ok ] * Log: /var/log/portage/cross-avr-gcc-stage1.log * Emerging cross-gcc-stage1 ... [ ok ] * Log: /var/log/portage/cross-avr-avr-libc.log * Emerging cross-avr-libc ... [ ok ] * Log: /var/log/portage/cross-avr-gcc-stage2.log * Emerging cross-gcc-stage2 ... * gcc failed :( * If you file a bug, please attach the following logfiles: * /var/log/portage/cross-avr-info.log * /var/log/portage/cross-avr-gcc-stage2.log.xz * /var/tmp/portage/cross-avr/gcc*/temp/gcc-config.logs.tar.xz When I look at cross-avr-gcc-stage2.log, it seems that `cross-avr/gcc` is built successfully, and then it fails with this error: checking for C compiler default output file name... configure: error: in `/var/tmp/portage/cross-avr/gcc-4.8.3/work/build/avr/avr25/libsanitizer': configure: error: C compiler cannot create executables See `config.log' for more details. Makefile:9339: recipe for target 'configure-target-libsanitizer' failed The following line confirms that it was libsanitizer that failed: $ sudo tail -1 /var/tmp/portage/cross-avr/gcc-4.8.3/work/build/avr/libsanitizer/config.log configure: exit 1 I'm also attaching the relevant config.log, in case that helps.
Created attachment 390360 [details] /var/log/portage/cross-avr-info.log
Created attachment 390362 [details] /var/log/portage/cross-avr-gcc-stage2.log.xz
Created attachment 390364 [details] /var/tmp/portage/cross-avr/gcc-4.8.3/temp/gcc-config.logs.tar.xz
*** This bug has been marked as a duplicate of bug 525910 ***
(In reply to Jeroen Roovers from comment #4) > > *** This bug has been marked as a duplicate of bug 525910 *** Thanks, I had no idea USE=sanitize was causing this.
I managed to build my toolchain using this command: $ sudo USE="-sanitize" crossdev -t avr -s4 -S --without-headers However, now I'm hitting the issue that is the description of this bug report: /usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr5.xn: No such file or directory collect2: error: ld returned 1 exit status The duplicate bug, https://bugs.gentoo.org/show_bug.cgi?id=525910, is in turn a duplicate of https://bugs.gentoo.org/show_bug.cgi?id=370063, which is still UNCONFIRMED. So the question remains: 1. Why do I have to use `USE="-sanitize"` when building for avr? 2. Just where the hell is ldscripts/avr5.xn? It seems that the "sanitize" steps were failing for the exact same reason.
It seems though that I have the file. $ sudo find / -name avr5.xn /usr/lib64/binutils/avr/2.24/ldscripts/avr5.xn
Apparently this solves the issue: $ sudo ln -s /usr/lib64/binutils/avr/2.24/ldscripts/ /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.24/ See http://forums.gentoo.org/viewtopic-p-7567730.html#7567730.
*** This bug has been marked as a duplicate of bug 147155 ***