Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895640 - unable to compile any crossdev stage1: mv: cannot stat '${workdir}/image/usr/lib64/libcc1*': No such file or directory
Summary: unable to compile any crossdev stage1: mv: cannot stat '${workdir}/image/usr/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-21 00:52 UTC by tigrmango
Modified: 2023-02-23 03:56 UTC (History)
1 user (show)

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


Attachments
emerge --info '=cross-avr/gcc-13.0.1_pre20230212::crossdev' (einfo.txt,8.08 KB, text/plain)
2023-02-21 01:32 UTC, tigrmango
Details
emerge -pqv '=cross-avr/gcc-13.0.1_pre20230212::crossdev' (epqv.txt,374 bytes, text/plain)
2023-02-21 01:33 UTC, tigrmango
Details
/var/tmp/portage/cross-avr/gcc-13.0.1_pre20230212/work/gcc-build-logs.tar.xz (gcc-build-logs.tar.xz,902.71 KB, application/x-xz)
2023-02-21 01:34 UTC, tigrmango
Details
/var/log/portage/cross-avr-info.log (cross-avr-info.log,21.39 KB, text/x-log)
2023-02-21 01:35 UTC, tigrmango
Details
/var/log/portage/cross-avr-gcc-stage1.log.xz (cross-avr-gcc-stage1.log.xz,823.67 KB, application/x-xz)
2023-02-21 01:36 UTC, tigrmango
Details
/var/tmp/portage/cross-avr/gcc*/temp/gcc-config.logs.tar.xz (gcc-config.logs.tar.xz,78.63 KB, application/x-xz)
2023-02-21 01:37 UTC, tigrmango
Details
/var/log/portage/cross-avr-info.log (after commenting out CC/CXX) (cross-avr-info.log,21.45 KB, text/x-log)
2023-02-21 23:14 UTC, tigrmango
Details
/var/log/portage/cross-avr-avr-libc.log.xz (cross-avr-avr-libc.log.xz,2.98 KB, application/x-xz)
2023-02-21 23:15 UTC, tigrmango
Details
/var/tmp/portage/cross-avr/avr-libc-2.1.0/temp/avr-libc-config.logs.tar.xz (avr-libc-config.logs.tar.xz,6.52 KB, application/x-xz)
2023-02-21 23:16 UTC, tigrmango
Details
/var/log/portage/cross-arm-unknown-linux-gnueabi-info.log (cross-arm-unknown-linux-gnueabi-info.log,21.49 KB, text/x-log)
2023-02-21 23:52 UTC, tigrmango
Details
/var/log/portage/cross-arm-unknown-linux-gnueabi-glibc.log.xz (cross-arm-unknown-linux-gnueabi-glibc.log.xz,12.04 KB, application/x-xz)
2023-02-21 23:53 UTC, tigrmango
Details
/var/tmp/portage/cross-arm-unknown-linux-gnueabi/glibc*/temp/glibc-config.logs.tar.xz (glibc-config.logs.tar.xz,8.60 KB, application/x-xz)
2023-02-21 23:54 UTC, tigrmango
Details
/var/log/portage/cross-arm-unknown-linux-gnueabi-info.log (cross-arm-unknown-linux-gnueabi-info.log,21.66 KB, text/x-log)
2023-02-22 13:57 UTC, tigrmango
Details
/var/log/portage/cross-arm-unknown-linux-gnueabi-glibc.log.xz (cross-arm-unknown-linux-gnueabi-glibc.log.xz,11.08 KB, application/x-xz)
2023-02-22 13:58 UTC, tigrmango
Details
/var/tmp/portage/cross-arm-unknown-linux-gnueabi/glibc*/temp/glibc-config.logs.tar.xz (glibc-config.logs.tar.xz,8.83 KB, application/x-xz)
2023-02-22 13:59 UTC, tigrmango
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tigrmango 2023-02-21 00:52:03 UTC
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
Comment 1 tigrmango 2023-02-21 01:32:30 UTC
Created attachment 853424 [details]
emerge --info '=cross-avr/gcc-13.0.1_pre20230212::crossdev'
Comment 2 tigrmango 2023-02-21 01:33:32 UTC
Created attachment 853426 [details]
emerge -pqv '=cross-avr/gcc-13.0.1_pre20230212::crossdev'
Comment 3 tigrmango 2023-02-21 01:34:59 UTC
Created attachment 853428 [details]
/var/tmp/portage/cross-avr/gcc-13.0.1_pre20230212/work/gcc-build-logs.tar.xz
Comment 4 tigrmango 2023-02-21 01:35:41 UTC
Created attachment 853430 [details]
/var/log/portage/cross-avr-info.log
Comment 5 tigrmango 2023-02-21 01:36:11 UTC
Created attachment 853432 [details]
/var/log/portage/cross-avr-gcc-stage1.log.xz
Comment 6 tigrmango 2023-02-21 01:37:58 UTC
Created attachment 853434 [details]
/var/tmp/portage/cross-avr/gcc*/temp/gcc-config.logs.tar.xz
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-21 06:37:10 UTC
It shouldn't be trying to use GCC 13 for a start.

Which other targets have you tried which failed?
Comment 8 tigrmango 2023-02-21 08:41:59 UTC
x86_64-w64-mingw32,
i686-w64-mingw32,
avr, and
arm.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-21 09:05:05 UTC
Please try without CC/CXX set in make.conf (setting it to clang is upsetting it, it appears).
Comment 10 tigrmango 2023-02-21 11:24:57 UTC
Can I somehow set these as package.env entries?
Also, should I specifically unset them or can I just set them to gcc/g++?
Comment 11 tigrmango 2023-02-21 23:14:00 UTC
Commented out CC and CXX entries in make.conf, ran "sudo crossdev -s4 --portage --verbose --target avr", gcc compiled, but avr-libc failed.
Comment 12 tigrmango 2023-02-21 23:14:52 UTC
Created attachment 853714 [details]
/var/log/portage/cross-avr-info.log (after commenting out CC/CXX)
Comment 13 tigrmango 2023-02-21 23:15:16 UTC
Created attachment 853716 [details]
/var/log/portage/cross-avr-avr-libc.log.xz
Comment 14 tigrmango 2023-02-21 23:16:31 UTC
Created attachment 853718 [details]
/var/tmp/portage/cross-avr/avr-libc-2.1.0/temp/avr-libc-config.logs.tar.xz
Comment 15 tigrmango 2023-02-21 23:27:15 UTC
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?
Comment 16 tigrmango 2023-02-21 23:52:23 UTC
Tried to "sudo crossdev -s4 --portage --verbose --target arm", glibc failed saying that it cannot find ld
Comment 17 tigrmango 2023-02-21 23:52:56 UTC
Created attachment 853720 [details]
/var/log/portage/cross-arm-unknown-linux-gnueabi-info.log
Comment 18 tigrmango 2023-02-21 23:53:10 UTC
Created attachment 853722 [details]
/var/log/portage/cross-arm-unknown-linux-gnueabi-glibc.log.xz
Comment 19 tigrmango 2023-02-21 23:54:17 UTC
Created attachment 853724 [details]
/var/tmp/portage/cross-arm-unknown-linux-gnueabi/glibc*/temp/glibc-config.logs.tar.xz
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 07:33:08 UTC
(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.
Comment 21 tigrmango 2023-02-22 13:55:35 UTC
Now it complains about "__ARM_ARCH" not defined
Comment 22 tigrmango 2023-02-22 13:57:44 UTC
Created attachment 853894 [details]
/var/log/portage/cross-arm-unknown-linux-gnueabi-info.log
Comment 23 tigrmango 2023-02-22 13:58:14 UTC
Created attachment 853896 [details]
/var/log/portage/cross-arm-unknown-linux-gnueabi-glibc.log.xz
Comment 24 tigrmango 2023-02-22 13:59:10 UTC
Created attachment 853898 [details]
/var/tmp/portage/cross-arm-unknown-linux-gnueabi/glibc*/temp/glibc-config.logs.tar.xz
Comment 25 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 14:02:04 UTC
(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.
Comment 26 tigrmango 2023-02-22 14:17:41 UTC
Why this command is specified in https://wiki.gentoo.org/wiki/Arduino#ARM_.28STM32.2FGD32.2Fetc..29 then?
Comment 27 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 14:20:40 UTC
(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.
Comment 28 tigrmango 2023-02-22 14:38:23 UTC
❯ 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
Comment 29 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 17:05:38 UTC
Could you try arm-none-eabi-gcc?
Comment 30 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 17:05:43 UTC
(In reply to Sam James from comment #29)
> Could you try arm-none-eabi-gcc?

uh: arm-none-eabi
Comment 31 tigrmango 2023-02-23 03:56:07 UTC
Tried that and it worked, thank you