Bug 2043977 - .package_note: No such file or directory on s390x, armv7hl and i686 during Golang test building
Summary: .package_note: No such file or directory on s390x, armv7hl and i686 during Go...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: package-notes
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-23 01:26 UTC by Robert-André Mauchin 🐧
Modified: 2022-01-23 12:41 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-01-23 12:41:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robert-André Mauchin 🐧 2022-01-23 01:26:15 UTC
On s390x, armv7hl and i686, I've got the following error when building Golang tests:

+ go-rpm-integration check -i github.com/influxdata/influxdb-client-go/v2 -b /builddir/build/BUILD/influxdb-client-go-2.7.0/_build/bin -s /builddir/build/BUILD/influxdb-client-go-2.7.0/_build -V 2.7.0-1.fc36 -p /builddir/build/BUILDROOT/golang-github-influxdata-influxdb-client-2-2.7.0-1.fc36.i386 -g /usr/share/gocode -r '.*example.*'
Testing    in: /builddir/build/BUILD/influxdb-client-go-2.7.0/_build/src
         PATH: /builddir/build/BUILD/influxdb-client-go-2.7.0/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/influxdb-client-go-2.7.0/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags " -X github.com/influxdata/influxdb-client-go/v2/version=2.7.0 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/influxdb-client-go-2.7.0/.package_note-golang-github-influxdata-influxdb-client-2-2.7.0-1.fc36.i386.ld '"
      testing: github.com/influxdata/influxdb-client-go/v2
github.com/influxdata/influxdb-client-go/v2
# github.com/influxdata/influxdb-client-go/v2.test
/usr/lib/golang/pkg/tool/linux_386/link: running gcc failed: exit status 1
/usr/bin/ld: cannot open linker script file /builddir/build/BUILD/influxdb-client-go-2.7.0/.package_note-golang-github-influxdata-influxdb-client-2-2.7.0-1.fc36.i386.ld: No such file or directory

See full log at https://koji.fedoraproject.org/koji/taskinfo?taskID=81691608

It seems the package notes are sometimes not generated for these architectures when building go tests.

I'm afraid this will impact a lot of Golang packages.

Comment 1 Robert-André Mauchin 🐧 2022-01-23 01:51:29 UTC
The issue happens in packages that have no %build section but compile stuff in %check. Since 

%__spec_build_pre %{___build_pre} \
  %{?_auto_set_build_flags:%{set_build_flags}} \	
  %{?_generate_package_note_file}

it fails at linking in %check.

I don't understand why it works on x86_64, aarch64, ppc64le though.

Maybe the solution is to add %{?_generate_package_note_file} in %__spec_check_pre %{___build_pre} %{?_auto_set_build_flags:%{set_build_flags}}
since it defines %{set_build_flags} too.

Comment 2 Fedora Update System 2022-01-23 11:49:52 UTC
FEDORA-2022-b662ea405c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b662ea405c

Comment 3 Fedora Update System 2022-01-23 12:41:21 UTC
FEDORA-2022-b662ea405c has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


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