-
Notifications
You must be signed in to change notification settings - Fork 172
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
Print the Ruby and compiler info or the command itself before compiling. #630
Conversation
The new task "debug_compiler" to print the Ruby and compiler version or, compiler command itself for the debugging purpose. The task name is aligning with the "debug" task that is to print the info in the Ruby OpenSSL binding for the debugging purpose. The compiler version info is useful when we hit the issues coming from the newly updated compilers on the CI, and we find the cause.
5954a15
to
8aee873
Compare
In the "windows-latest ucrt" case, the compiler In the "windows-latest mswin" case, the compiler The latest commits for the Windows cases are by @MSP-Greg. do you know how to print the compiler version info by those compilers? And do you know the |
when 'gcc', 'clang' | ||
sh "#{compiler} --version" | ||
else | ||
puts "Compiler: #{RbConfig::CONFIG['CC']}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I considered if this part should be Compiler:
(the first letter is uppercase "C") or compiler:
by checking how the items are printed in other cases below. It was a difficult choice. But I chose the Compiler:
.
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
...
$ lsusb | head -3
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:0328 Realtek Semiconductor Corp. USB3.0-CRW
$ openssl version -a
OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)
built on: Thu Feb 9 00:00:00 2023 UTC
platform: linux-x86_64
options: bn(64,64)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wa,--noexecstack -Wa,--generate-missing-build-notes=yes -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG -DPURIFY -DDEVRANDOM="\"/dev/urandom\"" -DSYSTEM_CIPHERS_FILE="/etc/crypto-policies/back-ends/openssl.config"
OPENSSLDIR: "/etc/pki/tls"
ENGINESDIR: "/usr/lib64/engines-3"
MODULESDIR: "/usr/lib64/ossl-modules"
Seeding source: os-specific
CPUINFO: OPENSSL_ia32cap=0x7ffaf3ffffebffff:0x29c67af
$ podman info | head -3
host:
arch: amd64
buildahVersion: 1.30.0
$ podman info | tail -3
OsArch: linux/amd64
Version: 4.5.0
This PR is for a preparation of the #626.
Print the Ruby and compiler info or the command itself before compiling.
The new task "debug_compiler" to print the Ruby and compiler version or,
compiler command itself for the debugging purpose. The task name is aligning
with the "debug" task that is to print the info in the Ruby OpenSSL binding for
the debugging purpose.
The compiler version info is useful when we hit the issues coming from the
newly updated compilers on the CI, and we find the cause.