-
Notifications
You must be signed in to change notification settings - Fork 585
Closed
Description
Libssh2 1.11.0 donot link with openssl 1.1.1, but libssh2 1.10.0 do.
OS: RHEL 7
Openssl Version: OpenSSL 1.1.1t
I installed openssl 1.1.1 to /usr/local/openssl-1.1.1, and built libssh2 1.11.0 with following steps:
./configure --build=x86_64-linux-gnu --host=x86_64-linux-gnu \
--prefix=/usr --libdir=/usr/lib64 --includedir=/usr/include --sysconfdir=/etc \
--enable-shared --enable-static --disable-silent-rules --with-libz --enable-debug \
--with-crypto=openssl --with-libssl-prefix=/usr/local/openssl-1.1.1 \
&& make
The output:
checking for shared library run path origin... done
checking for libssl... yes
checking how to link with libssl... /usr/local/openssl-1.1.1/lib/libssl.so /usr/local/openssl-1.1.1/lib/libcrypto.so -Wl,-rpath -Wl,/usr/local/openssl-1.1.1/lib
checking for libz... yes
checking how to link with libz... /usr/lib64/libz.so
checking whether to enable pedantic and debug compiler options... checking how to run the C preprocessor... gcc -E
checking if cpp -P is needed... yes
checking if cpp -P works... yes
yes
checking if compiler is clang... no
checking for icc in use... no
checking gcc version... 11
configure: Added this set of compiler options: -W -Wall -Wwrite-strings -pedantic -Wpointer-arith -Wnested-externs -Winline -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wundef -Wno-long-long -Wno-multichar -Wshadow -Wsign-compare -Wunused -Wfloat-equal -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wno-system-headers -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wignored-qualifiers -Wconversion -Wno-sign-conversion -Wvla -ftree-vrp -Wdouble-promotion -Wformat=2 -Warray-bounds=2 -Wshift-negative-value -Wshift-overflow=2 -Wnull-dereference -fdelete-null-pointer-checks -Wduplicated-cond -Wunused-const-variable -Wduplicated-branches -Wrestrict -Walloc-zero -Wformat-overflow=2 -Wformat-truncation=1 -Warith-conversion -Wenum-conversion -isystem /usr/local/openssl-1.1.1/include
checking whether to enable hidden symbols in the library... no
...
configure: summary of build options:
version: 1.11.0
Host type: x86_64-pc-linux-gnu
Install prefix: /usr
Compiler: gcc
Compiler flags: -g -g -W -Wall -Wwrite-strings -pedantic -Wpointer-arith -Wnested-externs -Winline -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wundef -Wno-long-long -Wno-multichar -Wshadow -Wsign-compare -Wunused -Wfloat-equal -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wno-system-headers -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wignored-qualifiers -Wconversion -Wno-sign-conversion -Wvla -ftree-vrp -Wdouble-promotion -Wformat=2 -Warray-bounds=2 -Wshift-negative-value -Wshift-overflow=2 -Wnull-dereference -fdelete-null-pointer-checks -Wduplicated-cond -Wunused-const-variable -Wduplicated-branches -Wrestrict -Walloc-zero -Wformat-overflow=2 -Wformat-truncation=1 -Warith-conversion -Wenum-conversion -isystem /usr/local/openssl-1.1.1/include
Library types: Shared=yes, Static=yes
Crypto library: OpenSSL
zlib compression: yes
Clear memory: yes
Debug build: yes
Build examples: yes
Run Docker tests: yes
Run sshd tests: yes
Path to sshd: /usr/sbin/sshd (only for self-tests)
...
/bin/sh ../libtool --tag=CC --mode=link gcc -g -g -W -Wall -Wwrite-strings -pedantic -Wpointer-arith -Wnested-externs -Winline -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wundef -Wno-long-long -Wno-multichar -Wshadow -Wsign-compare -Wunused -Wfloat-equal -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wno-system-headers -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wignored-qualifiers -Wconversion -Wno-sign-conversion -Wvla -ftree-vrp -Wdouble-promotion -Wformat=2 -Warray-bounds=2 -Wshift-negative-value -Wshift-overflow=2 -Wnull-dereference -fdelete-null-pointer-checks -Wduplicated-cond -Wunused-const-variable -Wduplicated-branches -Wrestrict -Walloc-zero -Wformat-overflow=2 -Wformat-truncation=1 -Warith-conversion -Wenum-conversion -isystem /usr/local/openssl-1.1.1/include -o x11 x11.o ../src/libssh2.la -L/usr/local/openssl-1.1.1/lib -lssl -L/usr/local/openssl-1.1.1/lib -lcrypto -R/usr/local/openssl-1.1.1/lib
libtool: link: gcc -g -g -W -Wall -Wwrite-strings -pedantic -Wpointer-arith -Wnested-externs -Winline -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wundef -Wno-long-long -Wno-multichar -Wshadow -Wsign-compare -Wunused -Wfloat-equal -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wno-system-headers -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wignored-qualifiers -Wconversion -Wno-sign-conversion -Wvla -ftree-vrp -Wdouble-promotion -Wformat=2 -Warray-bounds=2 -Wshift-negative-value -Wshift-overflow=2 -Wnull-dereference -fdelete-null-pointer-checks -Wduplicated-cond -Wunused-const-variable -Wduplicated-branches -Wrestrict -Walloc-zero -Wformat-overflow=2 -Wformat-truncation=1 -Warith-conversion -Wenum-conversion -isystem /usr/local/openssl-1.1.1/include -o .libs/x11 x11.o ../src/.libs/libssh2.so -L/usr/local/openssl-1.1.1/lib -lssl -lcrypto -Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath -Wl,/usr/local/openssl-1.1.1/lib
/usr/bin/ld: warning: libssl.so.10, needed by ../src/.libs/libssh2.so, may conflict with libssl.so.1.1
/usr/bin/ld: warning: libcrypto.so.10, needed by ../src/.libs/libssh2.so, may conflict with libcrypto.so.1.1
# readelf -d src/.libs/libssh2.so.1.0.1
Dynamic section at offset 0x59d88 contains 29 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libz.so.1]
0x0000000000000001 (NEEDED) Shared library: [libssl.so.10]
0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.10]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [libssh2.so.1]
0x000000000000001d (RUNPATH) Library runpath: [/usr/local/openssl-1.1.1/lib]