Dear LFTP gurus!
I'm using lftp on some machines running RHEL/CentOS 6 (old but still
officially supported). I guess the following problem might be related to
the "mature" version of GCC that ships with this Linux distribution
(because it compiles fine on Fedora 32 with GCC 10.2.1).
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
$ ./configure --prefix=/usr/local --with-openssl=/usr/local/ssl
--without-gnutls --disable-nls
$ make
[...]
/bin/sh ../libtool --silent --tag=CXX --mode=compile g++
-DHAVE_CONFIG_H -I. -I../lib -I../lib -I../trio
-I/usr/local/ssl/include -O2 -Wall -Wwrite-strings -Woverloaded-virtual
-fno-exceptions -fno-rtti -fno-implement-inlines -MT FileAccess.lo -MD
-MP -MF .deps/FileAccess.Tpo -c -o FileAccess.lo FileAccess.cc
In file included from FileAccess.cc:1026:
FileCopy.h:383: error: expected ‘;’ before ‘override’
make[2]: *** [FileAccess.lo] Error 1
make[2]: Leaving directory `/usr/local/src/lftp-4.9.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/lftp-4.9.2'
make: *** [all] Error 2
A cheap approach was to take "FileCopy.h" from lftp 4.9.1 and compile
again. But then it fails in FileCopy.cc:
/bin/sh ../libtool --silent --tag=CXX --mode=compile g++
-DHAVE_CONFIG_H -I. -I../lib -I../lib -I../trio
-I/usr/local/ssl/include -O2 -Wall -Wwrite-strings -Woverloaded-virtual
-fno-exceptions -fno-rtti -fno-implement-inlines -MT FileCopy.lo -MD -MP
-MF .deps/FileCopy.Tpo -c -o FileCopy.lo FileCopy.cc
FileCopy.cc:1416: error: no ‘const char*
FileCopyPeerFA::UseTempFile(const char*)’ member function declared in
class ‘FileCopyPeerFA’
make[2]: *** [FileCopy.lo] Error 1
make[2]: Leaving directory `/usr/local/src/lftp-4.9.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/lftp-4.9.2'
make: *** [all] Error 2
If I take both, FileCopy.h and FileCopy.cc, from lftp 4.9.1 the build
runs without errors and the binary seems to do its job, at least for the
FTP protocol. :-)
Yes, I know, pretty old GCC, it can be a pain, but everything else
compiles so lovely, maybe it's possible (and not to much work) to keep
lftp compatible with RHEL/CentOS 6.
It's just 10 lines of different code in FileCopy.h and FileCopy.cc from
lftp 4.9.1 to 4.9.2. I'm no expert here but maybe it can be done in a
way that makes old GCC happy. :-)
If there's anything I can test for you, like compiling a modified source
code with my old GCC, please let me know, I'm happy to help.
Thanks a lot in advance ... Andreas
_______________________________________________
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp