RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2078777 - podman fails to compile with golang-1.18
Summary: podman fails to compile with golang-1.18
Keywords:
Status: CLOSED DUPLICATE of bug 2079761
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: golang
Version: 8.7
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: David Benoit
QA Contact: Edjunior Barbosa Machado
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-26 07:48 UTC by Jindrich Novy
Modified: 2022-05-11 08:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-11 08:20:55 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-119934 0 None None None 2022-04-26 07:59:58 UTC

Description Jindrich Novy 2022-04-26 07:48:08 UTC
Description of problem:
+ GO111MODULE=off
+ go build -buildmode pie -compiler gc '-tags=rpm_crashtraceback remote seccomp btrfs_noversion exclude_graphdriver_devicemapper exclude_graphdriver_btrfs libdm_no_deferred_remove selinux systemd libsubid' -ldflags ' -linkmode=external -compressdwarf=false -B 0x120bcfebae6f11029aff2c514eb87a4fd0e6731a -extldflags '\''-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'\''' -a -v -o bin/gvproxy github.com/containers/gvisor-tap-vsock/cmd/gvproxy
package github.com/containers/gvisor-tap-vsock/cmd/gvproxy
	imports github.com/containers/gvisor-tap-vsock/pkg/virtualnetwork
	imports github.com/containers/gvisor-tap-vsock/pkg/services/dhcp
	imports github.com/containers/gvisor-tap-vsock/pkg/tap
	imports gvisor.dev/gvisor/pkg/tcpip
	imports gvisor.dev/gvisor/pkg/state
	imports gvisor.dev/gvisor/pkg/state/wire
	imports gvisor.dev/gvisor/pkg/gohacks: build constraints exclude all Go files in /builddir/build/BUILD/podman-62534053086fdeba7b93117e7c4dc6e797835a3e/gvisor-tap-vsock-0.1.0/_build/src/github.com/containers/gvisor-tap-vsock/vendor/gvisor.dev/gvisor/pkg/gohacks
error: Bad exit status from /var/tmp/rpm-tmp.TjfgxM (%build)
    Bad exit status from /var/tmp/rpm-tmp.TjfgxM (%build)
RPM build errors:
Child return code was: 1

Can you please advise what causes this? It compiles fine with 1.16.5 or 1.17.x. Thanks!

Comment 2 Valentin Rothberg 2022-04-28 09:23:00 UTC
The build constraints in the affected package are:
//go:build go1.13 && !go1.19 
// +build go1.13,!go1.19     

I assume that the RHEL go 1.18 package got it's internal version wrong?

Comment 3 Valentin Rothberg 2022-04-28 09:36:28 UTC
I setup a RHEL 8.7 VM and tried to reproduce manually with golang-1.18.0-2.module+el8.7.0+14880+f5e30240.src.rpm.

Unfortunately, it compiles just fine.  I do not know why the package build fails.

Comment 4 Jindrich Novy 2022-05-10 08:04:03 UTC
Still the same error in podman-4.1.0: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=45157418

Comment 5 Edjunior Barbosa Machado 2022-05-10 15:34:56 UTC
Looks like the build fails due to constraints in the gvisor-tap-vsock code being used (+build !go1.18):

[root@sheep-41 ~]# rpm -ivh podman-4.1.0-1.module%2Bel8.7.0%2B15189%2Be48d4702.src.rpm                                                                                                                                                        
Updating / installing...                                                                                                                                                                                                                      
   1:podman-2:4.1.0-1.module+el8.7.0+1warning: user mockbuild does not exist - using root                                                                                                                                                     
warning: group mock does not exist - using root                                                                                                                                                                                               
warning: user mockbuild does not exist - using root                                                                                                                                                                                           
warning: group mock does not exist - using root                                                                                                                                                                                               
warning: user mockbuild does not exist - using root                                                                                                                                                                                           
warning: group mock does not exist - using root                                                                                                                                                                                               
warning: user mockbuild does not exist - using root                                                                                                                                                                                           
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root                   
################################# [100%]                           
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
[root@sheep-41 ~]# rpmbuild -bb rpmbuild/SPECS/podman.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.J9FpNa                                                                                                                                                                                           
+ umask 022                                                                  
+ cd /root/rpmbuild/BUILD                                            
+ cd /root/rpmbuild/BUILD                                                                                                                                        
+ rm -rf podman-e4b03902052294d4f342a185bb54702ed5bed8b1                                            
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/podman-4.1.0-e4b0390.tar.gz                                                                                                                                                                        
+ /usr/bin/tar -xof -                                                                              
+ STATUS=0                                                                                                            
+ '[' 0 -ne 0 ']'                                                                                                                              
+ cd podman-e4b03902052294d4f342a185bb54702ed5bed8b1                                                                                                                                                                                          
(...)
+ export GOPATH=/root/rpmbuild/BUILD/podman-e4b03902052294d4f342a185bb54702ed5bed8b1/gvisor-tap-vsock-0.1.0/_build:/root/rpmbuild/BUILD/podman-e4b03902052294d4f342a185bb54702ed5bed8b1/gvisor-tap-vsock-0.1.0
+ GOPATH=/root/rpmbuild/BUILD/podman-e4b03902052294d4f342a185bb54702ed5bed8b1/gvisor-tap-vsock-0.1.0/_build:/root/rpmbuild/BUILD/podman-e4b03902052294d4f342a185bb54702ed5bed8b1/gvisor-tap-vsock-0.1.0
++ tr -d ' \n'
++ head -c20 /dev/urandom
++ od -An -tx1
+ GO111MODULE=off
+ go build -buildmode pie -compiler gc '-tags=rpm_crashtraceback remote seccomp btrfs_noversion exclude_graphdriver_devicemapper exclude_graphdriver_btrfs  selinux systemd libsubid' -ldflags ' -linkmode=external -compressdwarf=false -B 0x19bc6107f0b6fa47cb2d830cec152a417a0bf130 -extldflags '\''-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'\''' -a -v -o bin/gvproxy github.com/containers/gvisor-tap-vsock/cmd/gvproxy
package github.com/containers/gvisor-tap-vsock/cmd/gvproxy
        imports github.com/containers/gvisor-tap-vsock/pkg/virtualnetwork
        imports github.com/containers/gvisor-tap-vsock/pkg/services/dhcp
        imports github.com/containers/gvisor-tap-vsock/pkg/tap
        imports gvisor.dev/gvisor/pkg/tcpip
        imports gvisor.dev/gvisor/pkg/state
        imports gvisor.dev/gvisor/pkg/state/wire
        imports gvisor.dev/gvisor/pkg/gohacks: build constraints exclude all Go files in /root/rpmbuild/BUILD/podman-e4b03902052294d4f342a185bb54702ed5bed8b1/gvisor-tap-vsock-0.1.0/_build/src/github.com/containers/gvisor-tap-vsock/vendor/gvisor.dev/gvisor/pkg/gohacks
error: Bad exit status from /var/tmp/rpm-tmp.Q975DB (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.Q975DB (%build)
[root@sheep-41 ~]# head -n 20 /root/rpmbuild/BUILD/podman-e4b03902052294d4f342a185bb54702ed5bed8b1/gvisor-tap-vsock-0.1.0/_build/src/github.com/containers/gvisor-tap-vsock/vendor/gvisor.dev/gvisor/pkg/gohacks/gohacks_unsafe.go 
// Copyright 2020 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// +build go1.13
// +build !go1.18

// Check type signatures when updating Go version.

// Package gohacks contains utilities for subverting the Go compiler.
[root@sheep-41 ~]# rpm -qa golang
golang-1.18.0-2.module+el8.7.0+14880+f5e30240.x86_64
[root@sheep-41 ~]# go env GOVERSION
go1.18
[root@sheep-41 ~]#

Comment 6 Edjunior Barbosa Machado 2022-05-11 06:15:07 UTC
Quickly tweaked the specfile to use a newer version of gvisor-tap-vsock (%global gvproxyver 0.2.0) and verified that it builds on x86_64 with no failures.

Comment 7 Jindrich Novy 2022-05-11 06:48:16 UTC
Thanks for confirmation - just updated gvisor-tap-vsock to 0.2.0 to fix compilation with golang 1.18

Comment 8 Jindrich Novy 2022-05-11 08:20:55 UTC

*** This bug has been marked as a duplicate of bug 2079761 ***


Note You need to log in before you can comment on or make changes to this bug.