Summary: | app-containers/docker on arm64 requires x86_64 gcc | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Viacheslav Gagara <viacheslavg> |
Component: | Current packages | Assignee: | William Hubbs <williamh> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | gyakovlev, jstein, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | ARM64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Viacheslav Gagara
2022-01-10 12:01:51 UTC
Created attachment 761774 [details]
build.log
No idea off the top of my head. Built fine here on arm64. Will need gyakovlev. Can you share "env"? # env SHELL=/bin/bash LESS=-R -M --shift 5 CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/terminfo /etc/ca-certificates.conf /etc/revdep-rebuild DISTCC_VERBOSE=0 EDITOR=vim PWD=/root CONFIG_PROTECT=/usr/share/gnupg/qualified.txt /boot/config.txt /boot/cmdline.txt /boot/startup.sh LOGNAME=root DISTCC_TCP_CORK= MANPATH=/usr/share/gcc-data/aarch64-unknown-linux-gnu/11.2.1/man:/usr/share/binutils-data/aarch64-unknown-linux-gnu/2.37_p1/man:/usr/local/share/man:/usr/share/ma n UNCACHED_ERR_FD= HOME=/root LANG=en_GB.utf8 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34; 42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01 ;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01 ;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:* .7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm =01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01; 35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35: *.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01 ;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=00;32:*.ps=00;32:*.tex=00;32 :*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga =00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: OPENGL_PROFILE=xorg-x11 DISTCC_FALLBACK=1 DCC_EMAILLOG_WHOM_TO_BLAME= QT_GRAPHICSSYSTEM=raster INFOPATH=/usr/share/gcc-data/aarch64-unknown-linux-gnu/11.2.1/info:/usr/share/binutils-data/aarch64-unknown-linux-gnu/2.37_p1/info:/usr/share/info TERM=xterm-256color LESSOPEN=|lesspipe %s USER=root MANPAGER=manpager SHLVL=1 DISTCC_SAVE_TEMPS=0 PAGER=/usr/bin/less DISTCC_SSH= XSESSION=Xfce4 GCC_SPECS= DISTCC_ENABLE_DISCREPANCY_EMAIL= LC_COLLATE=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin _=/usr/bin/env looks like your go is mis-behaving and somehow enters cross mode. but ofc it fails in CGO because no compiler available. what version of dev-lang/go? is it from ::gentoo repo? please send output of the following commands: go env go version # equery l dev-lang/go * Searching for go in dev-lang ... [IP-] [ ] dev-lang/go-1.17.5:0/1.17.5 # go version go version go1.17.5 linux/arm64 # go env GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/root/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/root/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/lib/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_arm64" GOVCS="" GOVERSION="go1.17.5" GCCGO="gccgo" AR="ar" CC="x86_64-pc-linux-gnu-gcc" CXX="aarch64-unknown-linux-gnu-g++" CGO_ENABLED="1" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1470680700=/tmp/go-build -gno-record-gcc-s witches" Indeed this looks strange >CC="x86_64-pc-linux-gnu-gcc" >CXX="aarch64-unknown-linux-gnu-g++" Let me try to rebuild go yeah as you see CC="x86_64-pc-linux-gnu-gcc" somehow made it into go. rebuild it without cross or distcc involved. but docker is certainly fine on arm64 if go compiler does not do that =) good luck. you should be able to override it with go env -w "CC=aarch64-unknown-linux-gnu-gcc" but only for user that runs it. it writes own config to $HOME/.config/go/env but since this is happening for you in portage too it indicates that wrong default value got in and was hardcoded. it does react on changing CC from environment. CC=fake go env CC fake does not look like it gets overridden wrongly by portage environment though, as otherwise it would not show up for you running go as root. so everything points to binary so far. Indeed. I had broken go. It was installed from binary which was cross-compiled in x86_64. Re-emerged go natively on arm64 and now docker build works fine. Thanks a lot for helping! Bug can be closed. great to hear, you are welcome. |