Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix foreman_ygg_worker build on CentOS 9-stream #9962

Open
wants to merge 1 commit into
base: rpm/develop
Choose a base branch
from

Conversation

sbernhard
Copy link

This fixes a build issue on CentOS 9 stream:

+ head -c20 /dev/urandom
+ od -An -tx1
+ tr -d ' \n'
+ go build -buildmode pie -compiler gc '-tags=rpm_crashtraceback libtrust_openssl ' -ldflags ' -linkmode=external -compressdwarf=false -B 0x9155578dd8908ef952f7d130ca0a82e638b73252 -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 '\''' -a -v
go: open ../../../go.mod: no such file or directory

@ekohl
Copy link
Member

ekohl commented Nov 23, 2023

Why is this needed? We've built it in our build envs on EL9. How is it different for you? Can you share something about your build environment?

@sbernhard
Copy link
Author

  • go build -buildmode pie -compiler gc '-tags=rpm_crashtraceback libtrust_openssl ' -ldflags ' -linkmode=external -compressdwarf=false -B 0x9155578dd8908ef952f7d130ca0a82e638b73252 -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 '''' -a -v
    go: open ../../../go.mod: no such file or directory

@sbernhard sbernhard closed this Nov 23, 2023
@sbernhard sbernhard reopened this Nov 23, 2023
@sbernhard
Copy link
Author

Why is this needed? We've built it in our build envs on EL9. How is it different for you? Can you share something about your build environment?

Because of this issue we had on our build env:

  • go build -buildmode pie -compiler gc '-tags=rpm_crashtraceback libtrust_openssl ' -ldflags ' -linkmode=external -compressdwarf=false -B 0x9155578dd8908ef952f7d130ca0a82e638b73252 -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 '''' -a -v
    go: open ../../../go.mod: no such file or directory

We are using a CentOS9 stream docker image.

Last successful run was on Oct 28. First attempt where it failed was on Nov 10.

Failed package list:

Installing:
 golang                x86_64    1.21.3-3.el9                appstream    669 k
Upgrading:
 libgcc                x86_64    11.4.1-2.3.el9              baseos        93 k
 libgomp               x86_64    11.4.1-2.3.el9              baseos       269 k
Installing dependencies:
 annobin               x86_64    12.28-1.el9                 appstream    1.0 M
 cpp                   x86_64    11.4.1-2.3.el9              appstream     11 M
 gcc                   x86_64    11.4.1-2.3.el9              appstream     32 M
 gcc-plugin-annobin    x86_64    11.4.1-2.3.el9              appstream     48 k
 glibc-devel           x86_64    2.34-84.el9                 appstream     51 k
 glibc-headers         x86_64    2.34-84.el9                 appstream    553 k
 golang-bin            x86_64    1.21.3-3.el9                appstream     56 M
 golang-src            noarch    1.21.3-3.el9                appstream     13 M
 kernel-headers        x86_64    5.14.0-381.el9              appstream    6.9 M
 libedit               x86_64    3.1-38.20210216cvs.el9      baseos       104 k
 libmpc                x86_64    1.2.1-4.el9                 appstream     62 k
 libxcrypt-devel       x86_64    4.4.18-3.el9                appstream     29 k
 llvm-libs             x86_64    16.0.6-4.el9                appstream     24 M
 openssl-devel         x86_64    1:3.0.7-24.el9              appstream    4.1 M

Successful:

Installing:
 golang                x86_64    1.20.6-5.el9                appstream    601 k
Upgrading:
 libgcc                x86_64    11.4.1-2.3.el9              baseos        93 k
 libgomp               x86_64    11.4.1-2.3.el9              baseos       269 k
Installing dependencies:
 annobin               x86_64    12.28-1.el9                 appstream    1.0 M
 cpp                   x86_64    11.4.1-2.3.el9              appstream     11 M
 gcc                   x86_64    11.4.1-2.3.el9              appstream     32 M
 gcc-plugin-annobin    x86_64    11.4.1-2.3.el9              appstream     48 k
 glibc-devel           x86_64    2.34-82.el9                 appstream     52 k
 glibc-headers         x86_64    2.34-82.el9                 appstream    452 k
 golang-bin            x86_64    1.20.6-5.el9                appstream     58 M
 golang-src            noarch    1.20.6-5.el9                appstream     11 M
 kernel-headers        x86_64    5.14.0-378.el9              appstream    6.8 M
 libedit               x86_64    3.1-38.20210216cvs.el9      baseos       104 k
 libmpc                x86_64    1.2.1-4.el9                 appstream     62 k
 libxcrypt-devel       x86_64    4.4.18-3.el9                appstream     29 k
 llvm-libs             x86_64    16.0.6-4.el9                appstream     24 M
 openssl-devel         x86_64    1:3.0.7-24.el9              appstream    4.1 M

@ekohl ekohl changed the title Fix build on CentOS 9-stream Fix foreman_ygg_worker build on CentOS 9-stream Nov 23, 2023
@ekohl ekohl mentioned this pull request Nov 23, 2023
ekohl added a commit to ekohl/foreman-packaging that referenced this pull request Nov 23, 2023
This is to verify it still builds. Reportedly, golang 1.21 broke the
build: theforeman#9962
@ekohl
Copy link
Member

ekohl commented Nov 23, 2023

I've opened #10019 to see if we can reproduce it in copr, which should also use the latest packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants