Compiler : gcc-toolset-9
OS : 5.15.0-306.177.4.el8uek.aarch64 (Centos 8) ARM
Version : Openssl 1.1.1k
Build Issue : Yes
This is not a build issue with openssl source itself but when we are using built libssl.so library in building our c based client code.
Steps we using for openssl build :
log "Build openssl 1.1.1k"
cd external/openssl-1.1.1k
mkdir -p openssl-build
cd openssl-build
../config make
mkdir -p $BUILD_INSTALL_PATH/$INSTALL_PATH/lib/pkgconfig
log "Copy openssl 1.1.1k binaries with symlinks and pkgconfig"
cp -Rf --no-dereference .so *.a $BUILD_INSTALL_PATH/$INSTALL_PATH/lib/
cp -Rf .pc $BUILD_INSTALL_PATH/$INSTALL_PATH/lib/pkgconfig
log "Copy openssl include files"
mkdir -p $BUILD_INSTALL_PATH/$INSTALL_PATH/include/
cp -Rf ../include/openssl/ $BUILD_INSTALL_PATH/$INSTALL_PATH/include/
Early investigation says : These symbols (ssl_read_internal, ssl_write_internal) are not part of the official OpenSSL 1.1.1k public API. They appear to be either Internal (non-exported) OpenSSL functions or Custom/private functions introduced. Also same source code and same openssl version works on linux centos 8 in x86-64 architecture. So need help on why we are facing issue on ARM architecture.
Here is logs below for build failure. Build steps at begining gives code used for build.
+ echo '[2025-06-25 04:12:04+00:00]: Building cad Client'
[2025-06-25 04:12:04+00:00]: Building cad Client
+ cd /poc
+ cd provider/2.08
+ cd dummy_cad_client
+ libtoolize
+ aclocal
+ autoheader
+ autoconf
+ automake --add-missing
+ '[' DEBUG = DEBUG ']'
+ CFLAGS=-Wno-error
+ ./configure 'LDFLAGS=-Wl,-rpath,\$$ORIGIN/../lib' PKG_CONFIG_PATH=/data/bin//opt/oci/hsm/lib//pkgconfig --prefix=/opt/oci/hsm --with-dummy_api_include_dir=/data/bin//opt/oci/hsm/include --with-dummy_api_lib_dir=/data/bin//opt/oci/hsm/lib --with-event_lib_dir=/data/bin//opt/oci/hsm/lib --with-event_include_dir=/data/bin//opt/oci/hsm/include --with-openssl_include_dir=/data/bin//opt/oci/hsm/include --with-openssl_lib_dir=/data/bin//opt/oci/hsm/lib --with-json-c_include_dir=/data/bin//opt/oci/hsm/include --with-json-c_lib_dir=/data/bin//opt/oci/hsm/lib --enable-build_debug_symbols
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /opt/rh/gcc-toolset-9/root/usr/bin/ld
checking if the linker (/opt/rh/gcc-toolset-9/root/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /opt/rh/gcc-toolset-9/root/usr/bin/nm -B
checking the name lister (/opt/rh/gcc-toolset-9/root/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /opt/rh/gcc-toolset-9/root/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /opt/rh/gcc-toolset-9/root/usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/opt/rh/gcc-toolset-9/root/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for dlopen in -ldl... yes
checking for main in -lpthread... yes
checking for /poc/provider/2.08/dummy_cad_client/../LS_BUILD_TAG_NUMBER... no
RPM support Enabled... no
checking for json_object_from_file in -ljson... no
checking for json_object_from_file in -ljson-c... yes
checking json/json.h usability... no
checking json/json.h presence... no
checking for json/json.h... no
checking json-c/json.h usability... yes
checking json-c/json.h presence... yes
checking for json-c/json.h... yes
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for JSON... no
checking for JSON... yes
checking for CRYPTO... yes
checking for SSL... yes
checking for CRYPTO_free in -lcrypto... yes
checking for SSL_version in -lssl... yes
checking for EVENT... yes
checking for event_base_new in -levent... yes
checking for EVENT_OPENSSL... yes
checking for bufferevent_openssl_socket_new in -levent_openssl... yes
checking for EVENT_PTHREADS... yes
checking for evthread_use_pthreads in -levent_pthreads... yes
Adding -fstack-protector-strong flag
Adding -Wmissing-field-initializers flag
checking for ceil in -lm... yes
checking for pthread_create in -lpthread... yes
checking for sys/types.h... (cached) yes
checking for netinet/in.h... yes
checking for arpa/nameser.h... yes
checking for netdb.h... yes
checking for resolv.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for memory.h... (cached) yes
checking for netdb.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for error_at_line... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for alarm... yes
checking for bzero... yes
checking for dup2... yes
checking for floor... yes
checking for gethostbyname... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for memmove... yes
checking for memset... yes
checking for mkdir... yes
checking for munmap... yes
checking for select... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoul... yes
checking for strtoull... yes
Compilation Hardening Enabled... no
Compilation with Gcov Utility Flags... no
dummy appliance Enabled... no
Debug symbols Enabled... yes
dummy payment Enabled... no
checking for version_compatible in -ldummy_api_client... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
+ make all
make all-recursive
make[1]: Entering directory '/poc/provider/2.08/dummy_cad_client'
Making all in src
make[2]: Entering directory '/poc/provider/2.08/dummy_cad_client/src'
CC dummy_client-always_auth.o
CC dummy_client-openssl_util.o
CC dummy_client-cfg_parser.o
CC dummy_client-lgn_hsm.o
CC dummy_client-lgn_ha_ops.o
CC dummy_client-token_ha_ops.o
CC dummy_client-cad_client_helper.o
CC dummy_client-client_server_handshake.o
CC dummy_client-cad_client_daemon.o
CC dummy_client-dumpjson.o
CC dummy_client-rsrc_tracker.o
CC dummy_client-rsrc_ctx.o
CC libev-multithread/dummy_client-libevmultithread.o
CC libev-multithread/dummy_client-loadbalancer.o
CC libev-multithread/dummy_client-workqueue.o
CC dummy_client-avl_tree.o
CC dummy_client-des3_key_usage_miti.o
CC dummy_client-oci_config_adapter.o
CC dummy_client-e2e_encryption.o
CC dummy_client-key_ha_ops.o
CC dummy_client-ha_ops.o
CC dummy_client-sm_ha_ops.o
CCLD dummy_client
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /opt/oci/hsm/lib/libdummy_api_client.so: undefined reference to `ssl_read_internal'
/opt/rh/gcc-toolset-9/root/usr/bin/ld: /opt/oci/hsm/lib/libdummy_api_client.so: undefined reference to `ssl_write_internal'
cp -Rf --no-dereference .so *.a $BUILD_INSTALL_PATH/$INSTALL_PATH/lib/... also present in your actual build script?cp -Rf .pc $BUILD_INSTALL_PATH/$INSTALL_PATH/lib/pkgconfig?