Hi -
I'm the maintainer of the lftp package here at Red Hat -
thanks for the great work!
I just tried to compile lftp-3.0.13 for inclusion in
FC4/rawhide, and came accross this niggle that caused
the compile to fail, both on FC4 and RHEL-4 - it seems
the '--tag=CXX' option in the 'CXXLINK' variable in
src/Makefile.in causes the link for shared libraries
to fail - for some reason, libtool tries to create an
executable with non-existent crtso objects. Removing
the '--tag=CXX' enables the link to work OK:
$ /usr/bin/libtool --tag=CXX --mode=link gcc -O2 -g -pipe -D_FORTIFY_SOURCE=2
-m32 -march=i386 -mtune=pentium4-Wall -Wwrite-strings -Woverloaded-virtual
-fno-exceptions -fno-rtti
-L/tmp/lftp/devel/lftp-3.0.13/src/.libs-L/usr/kerberos/lib -o liblftp-pty.la
-avoid-version -rpath /usr/lib/lftp/3.0.13 PtyShell.lo lftp_pty.lo -lutil
-lcurses -lresolv -ldl -lsupc++
g++ -shared -nostdlib /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crti.o
/usr/lib/gcc/i386-redhat-linux/3.4.2/crtbeginS.o .libs/PtyShell.o
.libs/lftp_pty.o -L/tmp/lftp/devel/lftp-3.0.13/src/.libs-L/usr/kerberos/lib
-lutil -lcurses -lresolv -ldl -lsupc++ -L/usr/lib/gcc/i386-redhat-linux/3.4.2
-L/usr/lib/gcc/i386-redhat-linux/3.4.2/../../.. -lstdc++ -lm -lc -lgcc_s
/usr/lib/gcc/i386-redhat-linux/3.4.2/crtendS.o
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crtn.o -m32 -march=i386
-mtune=pentium4-Wall -Wl,-soname -Wl,liblftp-pty.so -o .libs/liblftp-pty.so
g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crti.o: No such file or
directory
g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/crtbeginS.o: No such file or directory
g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/crtendS.o: No such file or directory
g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crtn.o: No such file or
directory
$ /usr/bin/libtool --mode=link gcc -O2 -g -pipe -D_FORTIFY_SOURCE=2 -m32
-march=i386 -mtune=pentium4-Wall -Wwrite-strings -Woverloaded-virtual
-fno-exceptions -fno-rtti
-L/tmp/lftp/devel/lftp-3.0.13/src/.libs-L/usr/kerberos/lib -o liblftp-pty.la
-avoid-version -rpath /usr/lib/lftp/3.0.13 PtyShell.lo lftp_pty.lo -lutil
-lcurses -lresolv -ldl -lsupc++
gcc -shared .libs/PtyShell.o .libs/lftp_pty.o
-L/tmp/lftp/devel/lftp-3.0.13/src/.libs-L/usr/kerberos/lib -lutil -lcurses
-lresolv -ldl -lsupc++ -m32 -march=i386 -mtune=pentium4-Wall -Wl,-soname
-Wl,liblftp-pty.so -o .libs/liblftp-pty.so
ar cru .libs/liblftp-pty.a PtyShell.o lftp_pty.o
ranlib .libs/liblftp-pty.a
creating liblftp-pty.la
(cd .libs && rm -f liblftp-pty.la && ln -s ../liblftp-pty.la liblftp-pty.la)
$ ls -l .libs/liblftp-pty.so
-rwxr-xr-x 1 root root 86796 Jan 21 18:28 .libs/liblftp-pty.so
The weird thing is, the /usr/lib/gcc/i386-redhat-linux/3.4.2
directory does not exist ; that was the PREVIOUS version of
the compiler for FC3 which is no longer installed at all on FC4 .
On RHEL-4, where the current compiler is 3.4.3, the
/usr/bin/libtool --tag=CXX --mode=link
command tries to link in objects from /usr/lib/gcc/i386-redhat-linux/3.4.1,
which also does not exist.
This could be a libtool bug with both libtool versions 1.5.6-4 and 1.5.10-1 -
what do you think? If you think it is a libtool bug, I'll raise one.
So in the meantime, we need this patch to compile lftp-3.0.13 for FC4 / RHEL-4 -
the objects produced seem to work fine:
--- lftp-3.0.13/src/Makefile.in.fix-cxxlink 2004-12-20 05:19:47.000000000
-0500
+++ lftp-3.0.13/src/Makefile.in 2005-01-21 18:20:32.167502000 -0500
@@ -149,7 +149,7 @@
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
Regards,
Jason Vas Dias
Software Engineer
Red Hat Software Inc., Westford MA USA
--- lftp-3.0.13/src/Makefile.in.fix-cxxlink 2004-12-20 05:19:47.000000000 -0500
+++ lftp-3.0.13/src/Makefile.in 2005-01-21 18:20:32.167502000 -0500
@@ -149,7 +149,7 @@
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \