Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 679114 - app-emulation/runc-1.0.0_rc6_p20181203-r1 : failed to initialize build cache at /.../go-build: mkdir /.../cache: permission denied
Summary: app-emulation/runc-1.0.0_rc6_p20181203-r1 : failed to initialize build cache ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 567192
  Show dependency tree
 
Reported: 2019-03-01 07:28 UTC by Toralf Förster
Modified: 2021-08-11 07:05 UTC (History)
4 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,16.58 KB, text/plain)
2019-03-01 07:29 UTC, Toralf Förster
Details
app-emulation:runc-1.0.0_rc6_p20181203-r1:20190301-015852.log (app-emulation:runc-1.0.0_rc6_p20181203-r1:20190301-015852.log,2.68 KB, text/plain)
2019-03-01 07:29 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,156.48 KB, text/plain)
2019-03-01 07:29 UTC, Toralf Förster
Details
environment (environment,19.21 KB, text/plain)
2019-03-01 07:29 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.94 KB, application/x-bzip)
2019-03-01 07:29 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,7.08 KB, application/x-bzip)
2019-03-01 07:29 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2019-03-01 07:28:58 UTC
make: Entering directory '/var/tmp/portage/app-emulation/runc-1.0.0_rc6_p20181203-r1/work/runc-1.0.0_rc6_p20181203/src/github.com/opencontainers/runc'
go build -buildmode=pie  -ldflags "-X main.gitCommit=96ec2177ae841256168fcf76954f7177af9446eb -X main.version=1.0.0-rc6+dev " -tags "ambient seccomp" -o runc .
failed to initialize build cache at /root/cache/go-build: mkdir /root/cache: permission denied
make: *** [Makefile:30: runc] Error 1
make: Leaving directory '/var/tmp/portage/app-emulation/runc-1.0.0_rc6_p20181203-r1/work/runc-1.0.0_rc6_p20181203/src/github.com/opencontainers/runc'
 * ERROR: app-emulation/runc-1.0.0_rc6_p20181203-r1::gentoo failed (compile phase):

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1-desktop-gnome_abi32+64_20190225-042012

  -------------------------------------------------------------------

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-pc-linux-gnu-8.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)
  [4]   jython2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems) *
  [2]   ruby25 (with Rubygems)
  [3]   ruby26 (with Rubygems)
Available Rust versions:
  [1]   rust-1.32.0 *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.10.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpvO app-emulation/runc
[ebuild  N    ] app-emulation/runc-1.0.0_rc6_p20181203-r1  USE="ambient kmem seccomp -apparmor -hardened"
Comment 1 Toralf Förster gentoo-dev 2019-03-01 07:29:01 UTC
Created attachment 567134 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-03-01 07:29:05 UTC
Created attachment 567136 [details]
app-emulation:runc-1.0.0_rc6_p20181203-r1:20190301-015852.log
Comment 3 Toralf Förster gentoo-dev 2019-03-01 07:29:08 UTC
Created attachment 567138 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2019-03-01 07:29:11 UTC
Created attachment 567140 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2019-03-01 07:29:14 UTC
Created attachment 567142 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-03-01 07:29:18 UTC
Created attachment 567144 [details]
temp.tbz2
Comment 7 Philippe Marti 2020-06-04 06:21:42 UTC
Bug is still present in app-emulation/runc-1.0.0_rc10, but it only manifests if I become root through 'su'. In this case, it looks like it is trying to use my users  tmp directory for the cache.

go build -buildmode=pie  -ldflags "-X main.gitCommit=dc9208a3303feef5b3839f4323d9beb36df0a9dd -X main.version=1.0.0-rc10 " -tags "ambient seccomp" -o runc .
failed to initialize build cache at /tmp/philippe/.cache/go-build: mkdir /tmp/philippe/.cache/go-build: permission denied

When logged in as root, the problem disappears and I could successfully emerge runc.

I get a similar issue in app-emulation/containerd-1.2.13 when 'su' is used.
Comment 8 Alfred Wingate 2021-04-07 09:16:29 UTC
I think the reason for why the tinderbox failed is because  it has XDG_CACHE_HOME set to "/root/cache" which is read by go to determine the value of GOCACHE, leading to go to use an illegal path.

https://github.com/golang/go/blob/47fb1fbd554a76dc961bfdedaa85efcb68646ed1/src/cmd/go/internal/cache/default.go#L60
https://github.com/golang/go/blob/master/src/os/file.go#L406

This error could be completely avoided by explicitly setting a valid GOCACHE path in golang-base eclass.
Comment 9 Reva Denis 2021-08-10 17:41:50 UTC
May it be closed in 1.0.0 version?