Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 888579 - app-containers/skopeo-1.8.0: build failure with =sys-fs/btrfs-progs-6.1.1
Summary: app-containers/skopeo-1.8.0: build failure with =sys-fs/btrfs-progs-6.1.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
: 888645 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-12-26 23:15 UTC by Toralf Förster
Modified: 2023-07-13 08:41 UTC (History)
4 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.05 KB, text/plain)
2022-12-26 23:15 UTC, Toralf Förster
Details
app-containers:skopeo-1.8.0:20221226-230715.log.bz2 (app-containers:skopeo-1.8.0:20221226-230715.log.bz2,49.11 KB, application/x-bzip)
2022-12-26 23:15 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,200.06 KB, text/plain)
2022-12-26 23:15 UTC, Toralf Förster
Details
environment (environment,67.02 KB, text/plain)
2022-12-26 23:15 UTC, Toralf Förster
Details
etc.clang.tar.bz2 (etc.clang.tar.bz2,704 bytes, application/x-bzip)
2022-12-26 23:15 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,33.14 KB, application/x-bzip)
2022-12-26 23:15 UTC, Toralf Förster
Details
One-liner patch to vendor/github.com/containers/storage/drivers/btrfs/btrfs.go (btrfs_max_rfer.patch,694 bytes, patch)
2023-01-04 10:15 UTC, Bernd Feige
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-12-26 23:15:18 UTC
/usr/lib/go/pkg/tool/linux_amd64/buildid -w $WORK/b502/_pkg_.a # internal
cp $WORK/b502/_pkg_.a /var/tmp/portage/app-containers/skopeo-1.8.0/temp/go-build/26/2678729ef9eb002705df3c89c349a34a5216ad015d07755e8ced01bf25950054-d # internal
/usr/lib/go/pkg/tool/linux_amd64/buildid -w $WORK/b503/_pkg_.a # internal
cp $WORK/b503/_pkg_.a /var/tmp/portage/app-containers/skopeo-1.8.0/temp/go-build/c3/c3402c291b5976cb626abcdfd4be334aafda5aea8191c1b3240188dcb482e462-d # internal
/usr/lib/go/pkg/tool/linux_amd64/buildid -w $WORK/b495/_pkg_.a # internal
cp $WORK/b495/_pkg_.a /var/tmp/portage/app-containers/skopeo-1.8.0/temp/go-build/27/27363b5d97c86d1582b8634ec40a2a88581c8f163874086cea867a82c895598d-d # internal
 * ERROR: app-containers/skopeo-1.8.0::gentoo failed (compile phase):
 *   (no error message)
 * 

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome-j4-20221225-112401

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

GNUMAKEFLAGS="$GNUMAKEFLAGS --shuffle"
gcc-config -l:
 [1] x86_64-pc-linux-gnu-11
 [2] x86_64-pc-linux-gnu-12 *
clang/llvm (if any):
clang version 15.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/15
15.0.6
Python 3.10.9
Available Rust versions:
  [1]   rust-bin-1.66.0 *
php cli (if any):

  HEAD of ::gentoo
commit cf87b619757b6b0ffe93d594119bc0fd3d0362a3
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Mon Dec 26 20:48:10 2022 +0000

    2022-12-26 20:48:10 UTC

emerge -qpvO app-containers/skopeo
[ebuild  N    ] app-containers/skopeo-1.8.0  USE="btrfs"
Comment 1 Toralf Förster gentoo-dev 2022-12-26 23:15:19 UTC
Created attachment 845067 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-12-26 23:15:20 UTC
Created attachment 845069 [details]
app-containers:skopeo-1.8.0:20221226-230715.log.bz2
Comment 3 Toralf Förster gentoo-dev 2022-12-26 23:15:22 UTC
Created attachment 845071 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2022-12-26 23:15:23 UTC
Created attachment 845073 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2022-12-26 23:15:24 UTC
Created attachment 845075 [details]
etc.clang.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-12-26 23:15:26 UTC
Created attachment 845077 [details]
etc.portage.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2022-12-26 23:15:26 UTC
The file size of ./files/temp.tar.bz2 is too big (28M) for an upload. For about 8 weeks the link http://tinderbox.zwiebeltoralf.de:31560/17.1_desktop_gnome-j4-20221225-112401/var/tmp/tb/issues/20221226-230731-app-containers_skopeo-1.8.0/files/temp.tar.bz2 is valid.
Comment 8 Bernd Feige 2023-01-04 10:02:04 UTC
Got the same here with current app-containers/skopeo-1.10.0-r1 - same error:

/usr/lib/go/pkg/tool/linux_amd64/compile -o $WORK/b490/_pkg_.a -trimpath "$WORK/b490=>" -p github.com/containers/storage/drivers/btrfs -lang=go1.16 -installsuffix shared -buildid Hi7wH1ZQmW-qJ5x1u6j3/Hi7wH1ZQmW-qJ5x1u6j3 -goversion go1.19.4 -shared -c=4 -nolocalimports -importcfg $WORK/b490/importcfg -pack $WORK/b490/_cgo_gotypes.go $WORK/b490/btrfs.cgo1.go $WORK/b490/version.cgo1.go $WORK/b490/_cgo_import.go
# github.com/containers/storage/drivers/btrfs
vendor/github.com/containers/storage/drivers/btrfs/btrfs.go:385:11: args.lim.max_referenced undefined (type _Ctype_struct_btrfs_qgroup_limit has no field or method max_referenced)
make: *** [Makefile:142: bin/skopeo] Error 2
 [31;01m*[0m ERROR: app-containers/skopeo-1.10.0-r1::gentoo failed (compile phase):
 [31;01m*[0m   emake failed


The error from Toralf's build.log is:
# github.com/containers/storage/drivers/btrfs
vendor/github.com/containers/storage/drivers/btrfs/btrfs.go:387:11: args.lim.max_referenced undefined (type _Ctype_struct_btrfs_qgroup_limit has no field or method max_referenced)
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-04 10:07:39 UTC
(In reply to Bernd Feige from comment #8)
> Got the same here with current app-containers/skopeo-1.10.0-r1 - same error:

Which version of btrfs-progs?
Comment 10 Bernd Feige 2023-01-04 10:15:13 UTC
Created attachment 847188 [details, diff]
One-liner patch to vendor/github.com/containers/storage/drivers/btrfs/btrfs.go

The field in btrfs_qgroup_limit_item is called max_rfer, not max_referenced. Fixing this lets the module compile.
Comment 11 Bernd Feige 2023-01-04 10:15:50 UTC
(In reply to Sam James from comment #9)
> (In reply to Bernd Feige from comment #8)
> > Got the same here with current app-containers/skopeo-1.10.0-r1 - same error:
> 
> Which version of btrfs-progs?

6.0.2 here.
Comment 12 Bernd Feige 2023-01-04 10:16:58 UTC
(In reply to Bernd Feige from comment #10)
> Created attachment 847188 [details, diff] [details, diff]
> One-liner patch to
> vendor/github.com/containers/storage/drivers/btrfs/btrfs.go
> 
> The field in btrfs_qgroup_limit_item is called max_rfer, not max_referenced.
> Fixing this lets the module compile.

Note: Cf. https://btrfs.wiki.kernel.org/index.php/Data_Structures
Comment 13 Bernd Feige 2023-01-04 10:19:51 UTC
(In reply to Bernd Feige from comment #11)
> (In reply to Sam James from comment #9)
> > (In reply to Bernd Feige from comment #8)
> > > Got the same here with current app-containers/skopeo-1.10.0-r1 - same error:
> > 
> > Which version of btrfs-progs?
> 
> 6.0.2 here.

Oops, sorry, just upgraded to 6.1.1...
Comment 14 Bernd Feige 2023-01-04 10:28:59 UTC
(In reply to Bernd Feige from comment #13)
> (In reply to Bernd Feige from comment #11)
> > (In reply to Sam James from comment #9)
> > > (In reply to Bernd Feige from comment #8)
> > > > Got the same here with current app-containers/skopeo-1.10.0-r1 - same error:
> > > 
> > > Which version of btrfs-progs?
> > 
> > 6.0.2 here.
> 
> Oops, sorry, just upgraded to 6.1.1...

... And confirmed that app-containers/skopeo compiles fine with sys-fs/btrfs-progs-6.0.2 but fails needing the patch with sys-fs/btrfs-progs-6.1.1 installed.
Comment 16 Bernd Feige 2023-01-04 11:14:13 UTC
(In reply to Sam James from comment #15)
> https://github.com/kdave/btrfs-progs/commit/
> e78fe2d92e75ef6655341a5f498891c5b3091cb7 Is in 6.1.1

Right - but they failed to revert libbtrfs/ioctl.h which actually gets installed to /usr/include/btrfs/ioctl.h...
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-04 11:17:14 UTC
Ah!
Comment 18 Bernd Feige 2023-01-04 11:24:08 UTC
Cf. https://github.com/kdave/btrfs-progs/issues/566
Comment 19 Toralf Förster gentoo-dev 2023-01-04 15:38:36 UTC
FWIW 1.10.1-tr1 gives:

/usr/lib/go/pkg/tool/linux_amd64/compile -o $WORK/b490/_pkg_.a -trimpath "$WORK/b490=>" -p github.com/containers/storage/drivers/btrfs -lang=go1.16 -installsuffix shared -buildid faqqzdiIndOkaXUeOyUy/faqqzdiIndOkaXUeOyUy -goversion go1.19.4 -shared -nolocalimports -importcfg $WORK/b490/importcfg -pack $WORK/b490/_cgo_gotypes.go $WORK/b490/btrfs.cgo1.go $WORK/b490/version.cgo1.go $WORK/b490/_cgo_import.go
# github.com/containers/storage/drivers/btrfs
vendor/github.com/containers/storage/drivers/btrfs/btrfs.go:385:11: args.lim.max_referenced undefined (type _Ctype_struct_btrfs_qgroup_limit has no field or method max_referenced)
make: *** [Makefile:142: bin/skopeo] Error 2
 * ERROR: app-containers/skopeo-1.10.0-r1::gentoo failed (install phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-containers/skopeo-1.10.0-r1::gentoo'`,
Comment 20 Bernd Feige 2023-01-04 16:45:56 UTC
As noted in https://github.com/kdave/btrfs-progs/issues/566 the patch https://github.com/kdave/btrfs-progs/commit/27bb4f6819df6ad7771e089e1fd3f1bd1163e437 to btrfs-progs fixes the issue.
Comment 21 Larry the Git Cow gentoo-dev 2023-01-05 00:27:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=205c9c405c1182613231e3564c678fb4855ac308

commit 205c9c405c1182613231e3564c678fb4855ac308
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-05 00:27:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-05 00:27:31 +0000

    sys-fs/btrfs-progs: fix installed headers
    
    Closes: https://bugs.gentoo.org/888579
    Closes: https://bugs.gentoo.org/889694
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-fs/btrfs-progs/btrfs-progs-6.1.1-r1.ebuild     | 154 +++++++++++++++++++++
 .../files/btrfs-progs-6.1.1-ioctl-fix.patch        |  87 ++++++++++++
 2 files changed, 241 insertions(+)
Comment 22 Larry the Git Cow gentoo-dev 2023-01-05 00:42:39 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5da2202f319d7c3ab3db3beb831e65e11b155793

commit 5da2202f319d7c3ab3db3beb831e65e11b155793
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-05 00:41:55 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-05 00:41:55 +0000

    profiles: mask =sys-fs/btrfs-progs-6.1.1
    
    Bug: https://bugs.gentoo.org/889694
    Bug: https://bugs.gentoo.org/888579
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 4 ++++
 1 file changed, 4 insertions(+)
Comment 23 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-13 08:41:47 UTC
*** Bug 888645 has been marked as a duplicate of this bug. ***