Topic: Compile error for linux kernel module -linuxkm with RHEL9.5
# make
make -j17 all-recursive
make[1]: Entering directory '/root/wolfssl'
Making all in linuxkm
make[2]: Entering directory '/root/wolfssl/linuxkm'
make[2]: warning: -j17 forced in submake: resetting jobserver mode.
make ARCH='x86_64' 'CC=gcc' 'LD=/bin/ld -m elf_x86_64' -C '/usr/src/kernels/5.14.0-427.37.1.el9_4.x86_64' M='/root/wolfssl/linuxkm'
make[3]: Entering directory '/usr/src/kernels/5.14.0-427.37.1.el9_4.x86_64'
HOSTCC /root/wolfssl/linuxkm/linuxkm/get_thread_size
CC [M] /root/wolfssl/linuxkm/linuxkm/module_hooks.o
/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make[4]: *** [scripts/Makefile.host:95: /root/wolfssl/linuxkm/linuxkm/get_thread_size] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:1936: /root/wolfssl/linuxkm] Error 2
make[3]: Leaving directory '/usr/src/kernels/5.14.0-427.37.1.el9_4.x86_64'
make[2]: *** [Makefile:91: libwolfssl.ko] Error 2
make[2]: Leaving directory '/root/wolfssl/linuxkm'
make[1]: *** [Makefile:9067: all-recursive] Error 1
make[1]: Leaving directory '/root/wolfssl'
make: *** [Makefile:5417: all] Error 2
[root@localhost.dev ~/wolfssl]# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="9.5 (Plow)"
---
Configuration summary for wolfssl version 5.7.4
* Installation prefix: /usr/local
* System type: pc-linux-gnu
* Host CPU: x86_64
* C Compiler: gcc
* C Flags: -Werror -Wno-pragmas -Wall -Wextra -Wunknown-pragmas --param=ssp-buffer-size=1 -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmaybe-uninitialized -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnormalized=id -Woverride-init -Wpointer-arith -Wpointer-sign -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv
* C++ Compiler:
* C++ Flags:
* CPP Flags:
* CCAS Flags:
* LD Flags:
* LIB Flags: -pie -z relro -z now -Werror
* Library Suffix:
* Linux Kernel Build Root: /usr/src/kernels/5.14.0-427.37.1.el9_4.x86_64
* Linux Kernel Build Arch: x86_64
* fpu disable C flags: -mno-80387 -mno-fp-ret-in-387
* fpu enable C flags: -m80387
* SIMD disable C flags: -mno-sse -mgeneral-regs-only
* SIMD enable C flags: -msse -mmmx -msse2 -msse4 -mavx -mavx2
* No-auto-vectorize C flags: -fno-builtin -fno-tree-vectorize -fno-tree-loop-vectorize -fno-tree-slp-vectorize
* Auto-vectorize C flags: -fbuiltin -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize
* SIMD enable as flags: -Wa,-march=+no87+no287+no387+no687+sse+sse2+sse3+ssse3+sse4.1+sse4.2+sse4+avx+avx2+avx512f
* FPU enable as flags: -Wa,-march=+387+687+nosse+nosse2+nosse3+nossse3+nosse4.1+nosse4.2+nosse4+noavx+noavx2+noavx512f
* SIMD+FPU disable as flags: -Wa,-march=+no387+no687+nosse+nosse2+nosse3+nossse3+nosse4.1+nosse4.2+nosse4+noavx+noavx2+noavx512f
* SIMD+FPU enable as flags: -Wa,-march=+387+687+sse+sse2+sse3+ssse3+sse4.1+sse4.2+sse4+avx+avx2+avx512f
* Linux kernel module PIE: no
* Debug enabled: no
* Coverage enabled:
* Warnings as failure: yes
* make -j: 17
* VCS checkout: yes
Features
* Experimental settings: Forbidden
* FIPS: no
* Single threaded: no
* Filesystem: no
* OpenSSH Build: no
* OpenSSL Extra API: no
* OpenSSL Coexist: no
* Old Names: yes
* Max Strength Build: no
* Distro Build: no
* Reproducible Build: no
* Side-channel Hardening: yes
* Single Precision Math: no
* SP implementation: all
* Fast Math: no
* Heap Math: no
* Assembly Allowed: yes
* sniffer: no
* snifftest: no
* ARC4: no
* AES: yes
* AES-NI: no
* AES-CBC: yes
* AES-CBC length checks: no
* AES-GCM: yes
* AES-GCM streaming: no
* AES-CCM: no
* AES-CTR: no
* AES-CFB: no
* AES-OFB: no
* AES-XTS: no
* AES-XTS streaming: no
* AES-SIV: no
* AES-EAX: no
* AES Bitspliced: no
* AES Key Wrap: no
* ARIA: no
* DES3: no
* DES3 TLS Suites: no
* Camellia: no
* CUDA: no
* SM4-ECB: no
* SM4-CBC: no
* SM4-CTR: no
* SM4-GCM: no
* SM4-CCM: no
* NULL Cipher: no
* MD2: no
* MD4: no
* MD5: yes
* RIPEMD: no
* SHA: yes
* SHA-224: yes
* SHA-384: yes
* SHA-512: yes
* SHA3: yes
* SHAKE128: no
* SHAKE256: no
* SM3: no
* BLAKE2: no
* BLAKE2S: no
* SipHash: no
* CMAC: no
* keygen: no
* acert: no
* certgen: no
* certreq: no
* certext: no
* certgencache: no
* CHACHA: yes
* XCHACHA: no
* Hash DRBG: yes
* MmemUse Entropy:
* (AKA: wolfEntropy): no
* PWDBASED: yes
* Encrypted keys: no
* scrypt: no
* wolfCrypt Only: no
* HKDF: yes
* HPKE: no
* X9.63 KDF: no
* SRTP-KDF: no
* PSK: no
* Poly1305: yes
* LEANPSK: no
* LEANTLS: no
* RSA: yes
* RSA-PSS: yes
* DSA: no
* DH: yes
* DH Default Parameters: yes
* ECC: yes
* ECC Custom Curves: no
* ECC Minimum Bits: 224
* FPECC: no
* ECC_ENCRYPT: no
* Brainpool: no
* SM2: no
* CURVE25519: no
* ED25519: no
* ED25519 streaming: no
* CURVE448: no
* ED448: no
* ED448 streaming: no
* LMS: no
* LMS wolfSSL impl:
* XMSS: no
* XMSS wolfSSL impl:
* KYBER: no
* KYBER wolfSSL impl: no
* DILITHIUM: no
* ECCSI no
* SAKKE no
* ASN: yes
* Anonymous cipher: no
* CODING: yes
* MEMORY: yes
* I/O POOL: no
* wolfSentry: no
* LIGHTY: no
* WPA Supplicant: no
* HAPROXY: no
* STUNNEL: no
* tcpdump: no
* libssh2: no
* ntp: no
* rsyslog: no
* Apache httpd: no
* NGINX: no
* OpenResty: no
* ASIO: no
* LIBWEBSOCKETS: no
* Qt: no
* Qt Unit Testing: no
* SIGNAL: no
* chrony: no
* strongSwan: no
* OpenLDAP: no
* hitch: no
* memcached: no
* Mosquitto no
* ERROR_STRINGS: yes
* DTLS: no
* DTLS v1.3: no
* SCTP: no
* SRTP: no
* Indefinite Length: no
* Multicast: no
* SSL v3.0 (Old): no
* TLS v1.0 (Old): no
* TLS v1.1 (Old): no
* TLS v1.2: yes
* TLS v1.3: yes
* RPK: no
* Post-handshake Auth: no
* Early Data: no
* QUIC: no
* Send State in HRR Cookie: undefined
* OCSP: no
* OCSP Stapling: no
* OCSP Stapling v2: no
* CRL: no
* CRL-MONITOR: no
* Persistent session cache: no
* Persistent cert cache: no
* Atomic User Record Layer: no
* Public Key Callbacks: no
* libxmss: no
* liblms: no
* liboqs: no
* Whitewood netRandom: no
* Server Name Indication: yes
* ALPN: no
* Maximum Fragment Length: no
* Trusted CA Indication: no
* Truncated HMAC: no
* Supported Elliptic Curves: yes
* FFDHE only in client: no
* Session Ticket: no
* Extended Master Secret: yes
* Renegotiation Indication: no
* Secure Renegotiation: no
* Fallback SCSV: no
* Keying Material Exporter: no
* All TLS Extensions: no
* S/MIME: no
* PKCS#7: no
* PKCS#8: yes
* PKCS#11: no
* PKCS#12: yes
* wolfSSH: no
* wolfEngine: no
* wolfTPM: no
* wolfCLU: no
* wolfSCEP: no
* Secure Remote Password: no
* Small Stack: yes
* Linux Kernel Module: yes
* Linux kernel module bench: no
* Linux kernel alg register: none
* valgrind unit tests: no
* LIBZ: no
* Examples: no
* Crypt tests: no
* Stack sizes in tests: no
* Heap stats in tests: no
* Asynchronous Crypto: no
* Asynchronous Crypto (sim): no
* Cavium Nitrox: no
* Cavium Octeon (Sync): no
* Intel Quick Assist: no
* ARM ASM: no
* ARM ASM SHA512/SHA3 Crypto no
* ARM ASM SM3/SM4 Crypto no
* RISC-V ASM no
* Write duplicate: no
* Xilinx Hardware Acc.: no
* C89: no
* Inline Code: yes
* Linux AF_ALG: no
* Linux KCAPI: no
* Linux devcrypto: no
* PK callbacks: no
* Crypto callbacks: no
* i.MX CAAM: no
* IoT-Safe: no
* IoT-Safe HWRNG: no
* NXP SE050: no
* Maxim Integrated MAXQ10XX: no
* PSA: no
* System CA certs: no
* Dual alg cert support: no
* ERR Queues per Thread: yes
* rwlock: no
* keylog export: no
* AutoSAR : no
---
./configure flags: '--enable-linuxkm' '--with-linux-source=/usr/src/kernels/5.14.0-427.37.1.el9_4.x86_64'