When trying to compile AVR toolchain according to instructions at https://wiki.gentoo.org/wiki/Arduino#Build_and_install_the_toolchain, crossdev failed with the message "gcc failed :(". Logs mention trying to move "${workdir}/image/usr/lib64/libcc1*". However, the "${workdir}/image/usr" directory contains only lib, libexec, share and x86_64-pc-linux-gnu directories. I tried to compile for other targets, but was met with the same result. Reproducible: Always Steps to Reproduce: 1. sudo crossdev -s4 ${target} 2. Wait 3. ??? Actual Results: crossdev failed to compile stage1 gcc Expected Results: successful compilation of the toolchain
Created attachment 853424 [details] emerge --info '=cross-avr/gcc-13.0.1_pre20230212::crossdev'
Created attachment 853426 [details] emerge -pqv '=cross-avr/gcc-13.0.1_pre20230212::crossdev'
Created attachment 853428 [details] /var/tmp/portage/cross-avr/gcc-13.0.1_pre20230212/work/gcc-build-logs.tar.xz
Created attachment 853430 [details] /var/log/portage/cross-avr-info.log
Created attachment 853432 [details] /var/log/portage/cross-avr-gcc-stage1.log.xz
Created attachment 853434 [details] /var/tmp/portage/cross-avr/gcc*/temp/gcc-config.logs.tar.xz
It shouldn't be trying to use GCC 13 for a start. Which other targets have you tried which failed?
x86_64-w64-mingw32, i686-w64-mingw32, avr, and arm.
Please try without CC/CXX set in make.conf (setting it to clang is upsetting it, it appears).
Can I somehow set these as package.env entries? Also, should I specifically unset them or can I just set them to gcc/g++?
Commented out CC and CXX entries in make.conf, ran "sudo crossdev -s4 --portage --verbose --target avr", gcc compiled, but avr-libc failed.
Created attachment 853714 [details] /var/log/portage/cross-avr-info.log (after commenting out CC/CXX)
Created attachment 853716 [details] /var/log/portage/cross-avr-avr-libc.log.xz
Created attachment 853718 [details] /var/tmp/portage/cross-avr/avr-libc-2.1.0/temp/avr-libc-config.logs.tar.xz
Commented out AR, NM and RANLIB in make.conf, avr-libc compiled successfully Can I just create a file in /etc/portage/env and set cross-avr/* to use this file?
Tried to "sudo crossdev -s4 --portage --verbose --target arm", glibc failed saying that it cannot find ld
Created attachment 853720 [details] /var/log/portage/cross-arm-unknown-linux-gnueabi-info.log
Created attachment 853722 [details] /var/log/portage/cross-arm-unknown-linux-gnueabi-glibc.log.xz
Created attachment 853724 [details] /var/tmp/portage/cross-arm-unknown-linux-gnueabi/glibc*/temp/glibc-config.logs.tar.xz
(In reply to tigrmango from comment #10) > Can I somehow set these as package.env entries? > Also, should I specifically unset them or can I just set them to gcc/g++? It's something I need to look into. (In reply to tigrmango from comment #16) > Tried to "sudo crossdev -s4 --portage --verbose --target arm", glibc failed > saying that it cannot find ld For now, drop -fuse-ld=lld.
Now it complains about "__ARM_ARCH" not defined
Created attachment 853894 [details] /var/log/portage/cross-arm-unknown-linux-gnueabi-info.log
Created attachment 853896 [details] /var/log/portage/cross-arm-unknown-linux-gnueabi-glibc.log.xz
Created attachment 853898 [details] /var/tmp/portage/cross-arm-unknown-linux-gnueabi/glibc*/temp/glibc-config.logs.tar.xz
(In reply to tigrmango from comment #21) > Now it complains about "__ARM_ARCH" not defined arm-unknown-linux-gnueabi is not a valid tuple. You have to specify the ABI. armv7a or something.
Why this command is specified in https://wiki.gentoo.org/wiki/Arduino#ARM_.28STM32.2FGD32.2Fetc..29 then?
(In reply to tigrmango from comment #26) > Why this command is specified in > https://wiki.gentoo.org/wiki/Arduino#ARM_.28STM32.2FGD32.2Fetc..29 then? arm is not the same thing as arm-unknown-linux-gnueabi. arm by itself implies no libc. arm-unknown-linux-gnueabi implies glibc.
❯ sudo crossdev -s4 --portage --verbose --target arm Password: -------------------------------------------- * crossdev version: 20221228 * Host Portage ARCH: amd64 * Host Portage System: x86_64-pc-linux-gnu (i686-pc-linux-gnu x86_64-pc-linux-gnu) * Target Portage ARCH: arm * Target System: arm-unknown-linux-gnueabi * Stage: 4 (C/C++ compiler) * USE=multilib: no * Target ABIs: default * binutils: binutils-[latest] * gcc: gcc-[latest] * headers: linux-headers-[latest] * libc: glibc-[latest] * CROSSDEV_OVERLAY: /var/db/repos/portage-crossdev * PORT_LOGDIR: /var/log/portage * PORTAGE_CONFIGROOT: / * Portage flags: --verbose
Could you try arm-none-eabi-gcc?
(In reply to Sam James from comment #29) > Could you try arm-none-eabi-gcc? uh: arm-none-eabi
Tried that and it worked, thank you