I am building lftp from source. How to configure it correctly to support secure protocol with gnutls libraries?
I am on SuSE Linux, s390 uname -a Linux zdsdeveng03 3.0.101-108.84-default #1 SMP Fri Nov 30 15:57:27 UTC 2018 (7a72692) s390x s390x s390x GNU/Linux
Regular lftp installed on the system does not support TLS 1.2 protocol, but I need to use it for communication with z/OS ftp host.
lftp -v LFTP | Version 4.6.3a | Copyright (c) 1996-2014 Alexander V. Lukyanov ... ibraries used: Readline 5.2, GnuTLS 2.4.1, zlib 1.2.7
I am trying to compile from source current lftp version and use newer GnuTLS libary.
I compiled gnutls-3.6.6 and installed it in my ~/lib folder
Now trying to compile lftp-4.8.4 I configured it with
./configure --with-gnutls=/gsa/pokgsa/home/l/e/leonidt/local --prefix=/gsa/pokgsa/home/l/e/leonidt/local --with-libpth-prefix=/gsa/pokgsa/home/l/e/leonidt/local/ LIBGNUTLS_LIBS=-L/gsa/pokgsa/home/l/e/leonidt/local/lib/ LIBGNUTLS_CFLAGS=-I/gsa/pokgsa/home/l/e/leonidt/local/include
/gsa/pokgsa/home/l/e/leonidt - is my home folder
Then installed it with make install
Before running lftp I have set environment variables:
export LD_LIBRARY_PATH=/gsa/pokgsa/home/l/e/leonidt/local/lib:$LD_LIBRARY_PATH export PATH=/gsa/pokgsa/home/l/e/leonidt/local/bin:$PATH
But lftp executable that I got, does not support secure protocol commands:
lftp
lftp :~> set ftp:ssl-force true
ftp:ssl-force: no such variable. Use `set -a' to look at all variables.
lftp :~>
and lftp -v output does not show GnuTLS among libraries used.
So I tried to run libtool command, that make generated and add path to /bin/sh ../libtool --silent --tag=CXX --mode=link g++ -O2 -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -export-dynamic -s -o lftp lftp-lftp.o lftp-complete.o lftp-lftp_rl.o lftp-attach.o liblftp-jobs.la liblftp-tasks.la -L/usr/lib -L//gsa/pokgsa/home/l/e/leonidt/local/lib -lreadline -lutil -lncurses -ldl with -lgnutls option appended to the end manually
It generated executable, which now shows GnuTLS among libraries used, but still does not support set ftp:ssl-force true command with same error messages :(
There was some messages while it was linked: /bin/sh ../libtool --silent --tag=CXX --mode=link g++ -O2 -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -export-dynamic -s -o lftp lftp-lftp.o lftp-complete.o lftp-lftp_rl.o lftp-attach.o liblftp-jobs.la liblftp-tasks.la -L/usr/lib -L//gsa/pokgsa/home/l/e/leonidt/local/lib -lreadline -lutil -lncurses -ldl -lgnutls
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/libutil.so when searching for -lutil
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/libutil.a when searching for -lutil
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
Can it be a reason of set ftp:ssl-force true command not supported?
I examined libraries with the file command:
file /usr/lib/libutil.so /usr/lib/libutil.so: symbolic link to `/lib/libutil.so.1'
file /lib/libutil.so.1 /lib/libutil.so.1: symbolic link to `libutil-2.11.3.so'
file /lib/libutil-2.11.3.so /lib/libutil-2.11.3.so: ELF 32-bit MSB shared object, IBM S/390, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), not stripped
Libraries are 32 bit! So I looked for 64 bit versions and found them in /lib64
So I tried to run above command explicitly specifying -L/lib64 instead of -L/usr/lib
No help - same result :(
Can anybody advice how to get rid of this skipping incompatible messages? Are they really source of the problem?