Bug 218154 - sign-file.c:149:17: warning: implicit declaration of function ‘ENGINE_load_builtin_engines’
Summary: sign-file.c:149:17: warning: implicit declaration of function ‘ENGINE_load_bu...
Status: NEW
Alias: None
Product: Tools
Classification: Unclassified
Component: Other (show other bugs)
Hardware: Intel Linux
: P3 normal
Assignee: Tools.Other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-16 16:34 UTC by Dennis Clarke
Modified: 2023-11-16 18:25 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Dennis Clarke 2023-11-16 16:34:40 UTC
This feels like the linker is confused about where to find libssl.so.3
and/or libcrypto.so.3 for scripts/sign-file.c : 

  HOSTCC  scripts/sign-file
scripts/sign-file.c: In function ‘read_private_key’:
scripts/sign-file.c:149:17: warning: implicit declaration of function ‘ENGINE_load_builtin_engines’ [-Wimplicit-function-declaration]
  149 |                 ENGINE_load_builtin_engines();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:151:21: warning: implicit declaration of function ‘ENGINE_by_id’ [-Wimplicit-function-declaration]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                     ^~~~~~~~~~~~
scripts/sign-file.c:151:19: warning: assignment to ‘ENGINE *’ {aka ‘struct engine_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                   ^
scripts/sign-file.c:153:21: warning: implicit declaration of function ‘ENGINE_init’ [-Wimplicit-function-declaration]
  153 |                 if (ENGINE_init(e))
      |                     ^~~~~~~~~~~
scripts/sign-file.c:158:30: warning: implicit declaration of function ‘ENGINE_ctrl_cmd_string’ [-Wimplicit-function-declaration]
  158 |                         ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
      |                              ^~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:114:32: note: in definition of macro ‘ERR’
  114 |                 bool __cond = (cond);                   \
      |                                ^~~~
scripts/sign-file.c:160:31: warning: implicit declaration of function ‘ENGINE_load_private_key’ [-Wimplicit-function-declaration]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                               ^~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:160:29: warning: assignment to ‘EVP_PKEY *’ {aka ‘struct evp_pkey_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                             ^
/usr/local/bin/ld: /var/tmp/root/ccqqhtVK.o: in function `main':
sign-file.c:(.text.startup+0x346): undefined reference to `ENGINE_load_builtin_engines'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x357): undefined reference to `ENGINE_by_id'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x37e): undefined reference to `ENGINE_init'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3a8): undefined reference to `ENGINE_ctrl_cmd_string'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3d3): undefined reference to `ENGINE_load_private_key'
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/Makefile.host:111: scripts/sign-file] Error 1
make: *** [Makefile:1273: scripts] Error 2


If I try to just deal with the sign-file.c by itself I see that I can compile
and link fine with OpenSSL 3.1.4 : 

e# 
e# which openssl 
/usr/local/bin/openssl
e# 
e# ldd /usr/local/bin/openssl
        linux-vdso.so.1 (0x00007ffcfb3f7000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x00007f6f3b2fb000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x00007f6f3ac00000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f6f3b2d3000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6f3aa1f000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6f3b3e5000)
e# 
e# openssl version 
OpenSSL 3.1.4 24 Oct 2023 (Library: OpenSSL 3.1.4 24 Oct 2023)
e# 

I can compile the source fine ( with strange warnings ) with the
 latest OpenSSL bits : 


e# /usr/local/gcc13/bin/gcc -c -g -O0 -m64 -I/usr/local/include  -I/usr/local/include/openssl -o scripts/sign-file.o scripts/sign-file.c  
scripts/sign-file.c: In function ‘read_private_key’:
scripts/sign-file.c:149:17: warning: implicit declaration of function ‘ENGINE_load_builtin_engines’ [-Wimplicit-function-declaration]
  149 |                 ENGINE_load_builtin_engines();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:151:21: warning: implicit declaration of function ‘ENGINE_by_id’ [-Wimplicit-function-declaration]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                     ^~~~~~~~~~~~
scripts/sign-file.c:151:19: warning: assignment to ‘ENGINE *’ {aka ‘struct engine_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                   ^
scripts/sign-file.c:117:25: warning: implicit declaration of function ‘errx’ [-Wimplicit-function-declaration]
  117 |                         errx(1, fmt, ## __VA_ARGS__);   \
      |                         ^~~~
scripts/sign-file.c:152:17: note: in expansion of macro ‘ERR’
  152 |                 ERR(!e, "Load PKCS#11 ENGINE");
      |                 ^~~
scripts/sign-file.c:153:21: warning: implicit declaration of function ‘ENGINE_init’ [-Wimplicit-function-declaration]
  153 |                 if (ENGINE_init(e))
      |                     ^~~~~~~~~~~
scripts/sign-file.c:158:30: warning: implicit declaration of function ‘ENGINE_ctrl_cmd_string’ [-Wimplicit-function-declaration]
  158 |                         ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
      |                              ^~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:114:32: note: in definition of macro ‘ERR’
  114 |                 bool __cond = (cond);                   \
      |                                ^~~~
scripts/sign-file.c:160:31: warning: implicit declaration of function ‘ENGINE_load_private_key’ [-Wimplicit-function-declaration]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                               ^~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:160:29: warning: assignment to ‘EVP_PKEY *’ {aka ‘struct evp_pkey_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                             ^
e# 

Then we link gently : 

e# /usr/local/gcc13/bin/gcc -g -O0 -m64 -L/usr/local/include  -L/usr/local/include/openssl -Wl,-rpath=/usr/local/lib,-enable-new-dtags -o scripts/sign-file scripts/sign-file.o -lssl -lcrypto
e# 

e# ls -l scripts/sign-file
-rwxr-xr-x 1 root root 37800 Nov 16 16:22 scripts/sign-file
e# 
e# readelf -delV scripts/sign-file  | grep -E 'NEED|NAME|PATH' 
  [10] .gnu.version_r    VERNEED          0000000000400be8  00000be8
 0x0000000000000001 (NEEDED)             Shared library: [libssl.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000001d (RUNPATH)            Library runpath: [/usr/local/lib]
 0x000000006ffffffe (VERNEED)            0x400be8
 0x000000006fffffff (VERNEEDNUM)         2
e# 
e# ldd scripts/sign-file
        linux-vdso.so.1 (0x00007ffed8579000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x00007fde99d2e000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x00007fde99800000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fde9961f000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fde99600000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fde99e18000)
e# 
e# scripts/sign-file -foo
scripts/sign-file: invalid option -- 'f'
Usage: scripts/sign-file [-dp] <hash algo> <key> <x509> <module> [<dest>]
       scripts/sign-file -s <raw sig> <hash algo> <x509> <module> [<dest>]
e# 

 * * *  T H E R E F O R E     I T    C O M P I L E S    F I N E    * * *

However my Linux kernel compile fails on that : 

e# /usr/bin/time -p /usr/bin/nice -n +18 make 2>&1 | tee ../linux-6.1.62.make_j1.log
  HOSTCC  scripts/sign-file
scripts/sign-file.c: In function ‘read_private_key’:
scripts/sign-file.c:149:17: warning: implicit declaration of function ‘ENGINE_load_builtin_engines’ [-Wimplicit-function-declaration]
  149 |                 ENGINE_load_builtin_engines();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:151:21: warning: implicit declaration of function ‘ENGINE_by_id’ [-Wimplicit-function-declaration]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                     ^~~~~~~~~~~~
scripts/sign-file.c:151:19: warning: assignment to ‘ENGINE *’ {aka ‘struct engine_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                   ^
scripts/sign-file.c:153:21: warning: implicit declaration of function ‘ENGINE_init’ [-Wimplicit-function-declaration]
  153 |                 if (ENGINE_init(e))
      |                     ^~~~~~~~~~~
scripts/sign-file.c:158:30: warning: implicit declaration of function ‘ENGINE_ctrl_cmd_string’ [-Wimplicit-function-declaration]
  158 |                         ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
      |                              ^~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:114:32: note: in definition of macro ‘ERR’
  114 |                 bool __cond = (cond);                   \
      |                                ^~~~
scripts/sign-file.c:160:31: warning: implicit declaration of function ‘ENGINE_load_private_key’ [-Wimplicit-function-declaration]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                               ^~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:160:29: warning: assignment to ‘EVP_PKEY *’ {aka ‘struct evp_pkey_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                             ^
/usr/local/bin/ld: /var/tmp/root/ccqqhtVK.o: in function `main':
sign-file.c:(.text.startup+0x346): undefined reference to `ENGINE_load_builtin_engines'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x357): undefined reference to `ENGINE_by_id'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x37e): undefined reference to `ENGINE_init'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3a8): undefined reference to `ENGINE_ctrl_cmd_string'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3d3): undefined reference to `ENGINE_load_private_key'
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/Makefile.host:111: scripts/sign-file] Error 1
make: *** [Makefile:1273: scripts] Error 2
real 0.92
user 0.74
sys 0.18
e#

Looks like some confusion with the linker ? 

Setting LDFLAGS=-rpath=/usr/local/openssl/lib -enable-new-dtag seems to mean
nothing.

Not related to https://bugzilla.kernel.org/show_bug.cgi?id=215750 but I *feel* that
this code needs a hug.

Dennis
Comment 1 Dennis Clarke 2023-11-16 16:40:09 UTC
A total clean extract of the kernel tarball and then make localmodconfig also fails : 

e# 
e# env | sort 
ADDR2LINE=/usr/local/bin/addr2line
AR=/usr/local/bin/ar
AS=/usr/local/bin/as
CC=/usr/local/gcc13/bin/gcc
CXX=/usr/local/gcc13/bin/g++
EDITOR=/usr/bin/vi
ELFEDIT=/usr/local/bin/elfedit
HOME=/root
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_TIME=C
LDFLAGS=-rpath=/usr/local/openssl/lib -enable-new-dtags
LD=/usr/local/bin/ld
LOGNAME=root
MAIL=/var/mail/root
NM=/usr/local/bin/nm -p
OBJCOPY=/usr/local/bin/objcopy
OBJDUMP=/usr/local/bin/objdump
OLDPWD=/usr/local/build
PAGER=/bin/more
PATH=/usr/local/gcc13/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
PWD=/usr/local/build/linux-6.1.62.003
RANLIB=/usr/local/bin/ranlib
READELF=/usr/local/bin/readelf
SHELL=/bin/bash
SHLVL=1
SIZE=/usr/local/bin/size
SRC=/usr/local/src
STRINGS=/usr/local/bin/strings
STRIP=/usr/local/bin/strip
TERM=xterm
TMPDIR=/var/tmp/root
TZ=GMT0
USER=root
_=/usr/bin/env
VISUAL=/usr/bin/vi
XTERM_LOCALE=en_US.UTF-8
XTERM_SHELL=/usr/bin/bash
e# pwd
/usr/local/build/linux-6.1.62.003
e# 
e# 
e# 
e# /usr/bin/time -p /usr/bin/nice -n +18 make 2>&1 | tee ../linux-6.1.62.003.make_j1.log
  SYNC    include/config/auto.conf.cmd
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_x32.h
  HYPERCALLS arch/x86/include/generated/asm/xen-hypercalls.h
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  HOSTCC  scripts/genksyms/genksyms.o
  YACC    scripts/genksyms/parse.tab.[ch]
  HOSTCC  scripts/genksyms/parse.tab.o
  LEX     scripts/genksyms/lex.lex.c
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTLD  scripts/genksyms/genksyms
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/bin2c
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/sorttable
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/sign-file
scripts/sign-file.c: In function ‘read_private_key’:
scripts/sign-file.c:149:17: warning: implicit declaration of function ‘ENGINE_load_builtin_engines’ [-Wimplicit-function-declaration]
  149 |                 ENGINE_load_builtin_engines();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:151:21: warning: implicit declaration of function ‘ENGINE_by_id’ [-Wimplicit-function-declaration]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                     ^~~~~~~~~~~~
scripts/sign-file.c:151:19: warning: assignment to ‘ENGINE *’ {aka ‘struct engine_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                   ^
scripts/sign-file.c:153:21: warning: implicit declaration of function ‘ENGINE_init’ [-Wimplicit-function-declaration]
  153 |                 if (ENGINE_init(e))
      |                     ^~~~~~~~~~~
scripts/sign-file.c:158:30: warning: implicit declaration of function ‘ENGINE_ctrl_cmd_string’ [-Wimplicit-function-declaration]
  158 |                         ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
      |                              ^~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:114:32: note: in definition of macro ‘ERR’
  114 |                 bool __cond = (cond);                   \
      |                                ^~~~
scripts/sign-file.c:160:31: warning: implicit declaration of function ‘ENGINE_load_private_key’ [-Wimplicit-function-declaration]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                               ^~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:160:29: warning: assignment to ‘EVP_PKEY *’ {aka ‘struct evp_pkey_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                             ^
/usr/local/bin/ld: /var/tmp/root/ccjWlRmg.o: in function `main':
sign-file.c:(.text.startup+0x346): undefined reference to `ENGINE_load_builtin_engines'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x357): undefined reference to `ENGINE_by_id'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x37e): undefined reference to `ENGINE_init'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3a8): undefined reference to `ENGINE_ctrl_cmd_string'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3d3): undefined reference to `ENGINE_load_private_key'
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/Makefile.host:111: scripts/sign-file] Error 1
make: *** [Makefile:1273: scripts] Error 2
real 6.49
user 5.60
sys 0.89
e#
Comment 2 Dennis Clarke 2023-11-16 16:43:40 UTC
Using V=1 reveals not much : 

e# 
e# /usr/bin/time -p /usr/bin/nice -n +18 make V=1 2>&1 | tee ../linux-6.1.62.003.make_j1_v1.log
make -f ./scripts/Makefile.build obj=arch/x86/entry/syscalls all
make -f ./scripts/Makefile.build obj=scripts/basic
make -f ./scripts/Makefile.build obj=arch/x86/tools relocs
make -f ./scripts/Makefile.build obj=scripts/dtc
make -f ./scripts/Makefile.build obj=scripts
make -f ./scripts/Makefile.build obj=scripts/gcc-plugins \
need-builtin= \
need-modorder= \

make -f ./scripts/Makefile.build obj=scripts/genksyms \
need-builtin= \
need-modorder= \

make -f ./scripts/Makefile.build obj=scripts/selinux \
need-builtin= \
need-modorder= \

make -f ./scripts/Makefile.build obj=scripts/selinux/genheaders \
need-builtin= \
need-modorder= \

make -f ./scripts/Makefile.build obj=scripts/selinux/mdp \
need-builtin= \
need-modorder= \

  gcc -Wp,-MMD,scripts/.sign-file.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement      -I/usr/local/include    -o scripts/sign-file scripts/sign-file.c   -L/usr/local/lib -lcrypto 
scripts/sign-file.c: In function ‘read_private_key’:
scripts/sign-file.c:149:17: warning: implicit declaration of function ‘ENGINE_load_builtin_engines’ [-Wimplicit-function-declaration]
  149 |                 ENGINE_load_builtin_engines();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:151:21: warning: implicit declaration of function ‘ENGINE_by_id’ [-Wimplicit-function-declaration]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                     ^~~~~~~~~~~~
scripts/sign-file.c:151:19: warning: assignment to ‘ENGINE *’ {aka ‘struct engine_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                   ^
scripts/sign-file.c:153:21: warning: implicit declaration of function ‘ENGINE_init’ [-Wimplicit-function-declaration]
  153 |                 if (ENGINE_init(e))
      |                     ^~~~~~~~~~~
scripts/sign-file.c:158:30: warning: implicit declaration of function ‘ENGINE_ctrl_cmd_string’ [-Wimplicit-function-declaration]
  158 |                         ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
      |                              ^~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:114:32: note: in definition of macro ‘ERR’
  114 |                 bool __cond = (cond);                   \
      |                                ^~~~
scripts/sign-file.c:160:31: warning: implicit declaration of function ‘ENGINE_load_private_key’ [-Wimplicit-function-declaration]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                               ^~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:160:29: warning: assignment to ‘EVP_PKEY *’ {aka ‘struct evp_pkey_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                             ^
/usr/local/bin/ld: /var/tmp/root/ccKhfViI.o: in function `main':
sign-file.c:(.text.startup+0x346): undefined reference to `ENGINE_load_builtin_engines'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x357): undefined reference to `ENGINE_by_id'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x37e): undefined reference to `ENGINE_init'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3a8): undefined reference to `ENGINE_ctrl_cmd_string'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3d3): undefined reference to `ENGINE_load_private_key'
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/Makefile.host:111: scripts/sign-file] Error 1
make: *** [Makefile:1273: scripts] Error 2
real 0.87
user 0.68
sys 0.19
e#
Comment 3 Dennis Clarke 2023-11-16 16:50:42 UTC
AH  HA  !!!

New OpenSSL is the problem.

Or rather the old old sign-file.c is the problem : 

e# 
e# cd /
e# /opt/schily/bin/star -c -v -p -sparse -dump file=/root/new_openssl.star /usr/local/bin/openssl /usr/local/lib/libcrypto.a /usr/local/lib/libcrypto.so /usr/local/lib/libcrypto.so.3 /usr/local/lib/libssl.a /usr/local/lib/libssl.so /usr/local/lib/libssl.so.3
a /usr/local/bin/openssl 1908040 bytes, 3727 tape blocks
a /usr/local/lib/libcrypto.a 18237188 bytes, 35620 tape blocks
a /usr/local/lib/libcrypto.so symbolic link to libcrypto.so.3
a /usr/local/lib/libcrypto.so.3 11288056 bytes, 22047 tape blocks
a /usr/local/lib/libssl.a 3530436 bytes, 6896 tape blocks
a /usr/local/lib/libssl.so symbolic link to libssl.so.3
a /usr/local/lib/libssl.so.3 2278616 bytes, 4451 tape blocks
star: 3639 blocks + 0 bytes (total of 37263360 bytes = 36390.00k).
e# 
e# 
e# 
e# rm /usr/local/bin/openssl /usr/local/lib/libcrypto.a /usr/local/lib/libcrypto.so /usr/local/lib/libcrypto.so.3 /usr/local/lib/libssl.a /usr/local/lib/libssl.so /usr/local/lib/libssl.so.3
e# 


After I remove all the new OpenSSL ... then we get past the sign-file.c issue. 


The problem is the old old sign-file.c that needs a hug. 


--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
Comment 4 Dennis Clarke 2023-11-16 18:25:37 UTC
No doubt in my mind .. the old sign-file.c is borked : 

e# 
e# /usr/bin/time -p /usr/bin/nice -n +18 make V=1 2>&1 | tee ../linux-6.1.62.004.make_j1_v1.log 
make -f ./scripts/Makefile.build obj=arch/x86/entry/syscalls all
  sh ./scripts/syscallhdr.sh --abis i386 --emit-nr   arch/x86/entry/syscalls/syscall_32.tbl arch/x86/include/generated/uapi/asm/unistd_32.h
  sh ./scripts/syscallhdr.sh --abis common,64 --emit-nr   arch/x86/entry/syscalls/syscall_64.tbl arch/x86/include/generated/uapi/asm/unistd_64.h
  sh ./scripts/syscallhdr.sh --abis common,x32 --emit-nr --offset __X32_SYSCALL_BIT  arch/x86/entry/syscalls/syscall_64.tbl arch/x86/include/generated/uapi/asm/unistd_x32.h
  sh ./scripts/syscalltbl.sh --abis i386 arch/x86/entry/syscalls/syscall_32.tbl arch/x86/include/generated/asm/syscalls_32.h
  sh ./scripts/syscallhdr.sh --abis i386 --emit-nr  --prefix ia32_ arch/x86/entry/syscalls/syscall_32.tbl arch/x86/include/generated/asm/unistd_32_ia32.h
  sh ./scripts/syscallhdr.sh --abis x32 --emit-nr  --prefix x32_ arch/x86/entry/syscalls/syscall_64.tbl arch/x86/include/generated/asm/unistd_64_x32.h
  sh ./scripts/syscalltbl.sh --abis common,64 arch/x86/entry/syscalls/syscall_64.tbl arch/x86/include/generated/asm/syscalls_64.h
  sh ./scripts/syscalltbl.sh --abis common,x32 arch/x86/entry/syscalls/syscall_64.tbl arch/x86/include/generated/asm/syscalls_x32.h
  sh 'scripts/xen-hypercalls.sh' arch/x86/include/generated/asm/xen-hypercalls.h include/xen/interface/xen-mca.h include/xen/interface/xen.h include/xen/interface/xenpmu.h
make -f ./scripts/Makefile.build obj=scripts/basic
make -f ./scripts/Makefile.build obj=arch/x86/tools relocs
  gcc -Wp,-MMD,arch/x86/tools/.relocs_32.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement     -I./tools/include  -c -o arch/x86/tools/relocs_32.o arch/x86/tools/relocs_32.c
  gcc -Wp,-MMD,arch/x86/tools/.relocs_64.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement     -I./tools/include  -c -o arch/x86/tools/relocs_64.o arch/x86/tools/relocs_64.c
  gcc -Wp,-MMD,arch/x86/tools/.relocs_common.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement     -I./tools/include  -c -o arch/x86/tools/relocs_common.o arch/x86/tools/relocs_common.c
  gcc   -o arch/x86/tools/relocs arch/x86/tools/relocs_32.o arch/x86/tools/relocs_64.o arch/x86/tools/relocs_common.o   
make -f ./scripts/Makefile.build obj=scripts/dtc
make -f ./scripts/Makefile.build obj=scripts
make -f ./scripts/Makefile.build obj=scripts/gcc-plugins \
need-builtin= \
need-modorder= \

  g++ -Wp,-MMD,scripts/gcc-plugins/.stackleak_plugin.so.d -Wall -O2   -fPIC -include ./include/linux/compiler-version.h -DPLUGIN_VERSION='"6.1.62"' -I /usr/local/gcc13/lib/gcc/x86_64-pc-linux-gnu/13.2.0/plugin/include -I scripts/gcc-plugins -fno-rtti -fno-exceptions -fasynchronous-unwind-tables -ggdb -Wno-narrowing -Wno-unused-variable -Wno-format-diag -shared -o scripts/gcc-plugins/stackleak_plugin.so scripts/gcc-plugins/stackleak_plugin.c
make -f ./scripts/Makefile.build obj=scripts/genksyms \
need-builtin= \
need-modorder= \

  gcc -Wp,-MMD,scripts/genksyms/.genksyms.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement       -c -o scripts/genksyms/genksyms.o scripts/genksyms/genksyms.c
  bison --version >/dev/null; bison -o scripts/genksyms/parse.tab.c --defines=scripts/genksyms/parse.tab.h -t -l scripts/genksyms/parse.y 2>/dev/null
  gcc -Wp,-MMD,scripts/genksyms/.parse.tab.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement      -I ./scripts/genksyms -c -o scripts/genksyms/parse.tab.o scripts/genksyms/parse.tab.c
  flex -oscripts/genksyms/lex.lex.c -L scripts/genksyms/lex.l
  gcc -Wp,-MMD,scripts/genksyms/.lex.lex.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement      -I ./scripts/genksyms -c -o scripts/genksyms/lex.lex.o scripts/genksyms/lex.lex.c
  gcc   -o scripts/genksyms/genksyms scripts/genksyms/genksyms.o scripts/genksyms/parse.tab.o scripts/genksyms/lex.lex.o   
make -f ./scripts/Makefile.build obj=scripts/selinux \
need-builtin= \
need-modorder= \

make -f ./scripts/Makefile.build obj=scripts/selinux/genheaders \
need-builtin= \
need-modorder= \

  gcc -Wp,-MMD,scripts/selinux/genheaders/.genheaders.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement     -I./include/uapi -I./include -I./security/selinux/include    -o scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c   
make -f ./scripts/Makefile.build obj=scripts/selinux/mdp \
need-builtin= \
need-modorder= \

  gcc -Wp,-MMD,scripts/selinux/mdp/.mdp.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement     -I./include/uapi -I./include -I./security/selinux/include -I./include    -o scripts/selinux/mdp/mdp scripts/selinux/mdp/mdp.c   
  gcc -Wp,-MMD,scripts/.bin2c.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement         -o scripts/bin2c scripts/bin2c.c   
  gcc -Wp,-MMD,scripts/.kallsyms.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement         -o scripts/kallsyms scripts/kallsyms.c   
  gcc -Wp,-MMD,scripts/.sorttable.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement      -I./tools/include -I./tools/arch/x86/include -DUNWINDER_ORC_ENABLED -DMCOUNT_SORT_ENABLED   -o scripts/sorttable scripts/sorttable.c   -lpthread
  gcc -Wp,-MMD,scripts/.asn1_compiler.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement      -I./include   -o scripts/asn1_compiler scripts/asn1_compiler.c   
  gcc -Wp,-MMD,scripts/.sign-file.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -Wdeclaration-after-statement      -I/usr/local/include    -o scripts/sign-file scripts/sign-file.c   -L/usr/local/lib -lcrypto 
scripts/sign-file.c: In function ‘read_private_key’:
scripts/sign-file.c:149:17: warning: implicit declaration of function ‘ENGINE_load_builtin_engines’ [-Wimplicit-function-declaration]
  149 |                 ENGINE_load_builtin_engines();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:151:21: warning: implicit declaration of function ‘ENGINE_by_id’ [-Wimplicit-function-declaration]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                     ^~~~~~~~~~~~
scripts/sign-file.c:151:19: warning: assignment to ‘ENGINE *’ {aka ‘struct engine_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  151 |                 e = ENGINE_by_id("pkcs11");
      |                   ^
scripts/sign-file.c:153:21: warning: implicit declaration of function ‘ENGINE_init’ [-Wimplicit-function-declaration]
  153 |                 if (ENGINE_init(e))
      |                     ^~~~~~~~~~~
scripts/sign-file.c:158:30: warning: implicit declaration of function ‘ENGINE_ctrl_cmd_string’ [-Wimplicit-function-declaration]
  158 |                         ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
      |                              ^~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:114:32: note: in definition of macro ‘ERR’
  114 |                 bool __cond = (cond);                   \
      |                                ^~~~
scripts/sign-file.c:160:31: warning: implicit declaration of function ‘ENGINE_load_private_key’ [-Wimplicit-function-declaration]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                               ^~~~~~~~~~~~~~~~~~~~~~~
scripts/sign-file.c:160:29: warning: assignment to ‘EVP_PKEY *’ {aka ‘struct evp_pkey_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  160 |                 private_key = ENGINE_load_private_key(e, private_key_name,
      |                             ^
/usr/local/bin/ld: /tmp/ccVHuNbH.o: in function `main':
sign-file.c:(.text.startup+0x346): undefined reference to `ENGINE_load_builtin_engines'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x357): undefined reference to `ENGINE_by_id'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x37e): undefined reference to `ENGINE_init'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3a8): undefined reference to `ENGINE_ctrl_cmd_string'
/usr/local/bin/ld: sign-file.c:(.text.startup+0x3d3): undefined reference to `ENGINE_load_private_key'
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/Makefile.host:111: scripts/sign-file] Error 1
make: *** [Makefile:1273: scripts] Error 2
real 13.80
user 6.47
sys 1.00
e#

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