diff -Naur lftp-4.7.7/src/Makefile.am.orig lftp-4.7.7/src/Makefile.am 
--- lftp-4.7.7/src/Makefile.am.orig	2017-02-16 21:22:07.000000000 +0900
+++ lftp-4.7.7/src/Makefile.am	2017-05-09 14:15:25.483414300 +0900
@@ -40,18 +40,18 @@
 endif
 GNULIB = $(top_builddir)/lib/libgnu.la
 
-proto_ftp_la_LDFLAGS  = -module -avoid-version -rpath $(pkgverlibdir)
+proto_ftp_la_LDFLAGS  = -module -avoid-version -no-undefined -rpath $(pkgverlibdir)
 proto_http_la_CPPFLAGS = $(AM_CPPFLAGS) $(EXPAT_CFLAGS)
-proto_http_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir)
-proto_file_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir)
-proto_fish_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir)
-proto_sftp_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir)
-cmd_mirror_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir)
-cmd_sleep_la_LDFLAGS  = -module -avoid-version -rpath $(pkgverlibdir)
-cmd_torrent_la_LDFLAGS= -module -avoid-version -rpath $(pkgverlibdir)
-liblftp_pty_la_LDFLAGS     = -avoid-version -rpath $(pkgverlibdir)
+proto_http_la_LDFLAGS = -module -avoid-version -no-undefined -rpath $(pkgverlibdir)
+proto_file_la_LDFLAGS = -module -avoid-version -no-undefined -rpath $(pkgverlibdir)
+proto_fish_la_LDFLAGS = -module -avoid-version -no-undefined -rpath $(pkgverlibdir)
+proto_sftp_la_LDFLAGS = -module -avoid-version -no-undefined -rpath $(pkgverlibdir)
+cmd_mirror_la_LDFLAGS = -module -avoid-version -no-undefined -rpath $(pkgverlibdir)
+cmd_sleep_la_LDFLAGS  = -module -avoid-version -no-undefined -rpath $(pkgverlibdir)
+cmd_torrent_la_LDFLAGS= -module -avoid-version -no-undefined -rpath $(pkgverlibdir)
+liblftp_pty_la_LDFLAGS     = -avoid-version -no-undefined -rpath $(pkgverlibdir)
 liblftp_network_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_CPPFLAGS) $(ZLIB_CPPFLAGS) $(LIBGNUTLS_CFLAGS)
-liblftp_network_la_LDFLAGS = -avoid-version -rpath $(pkgverlibdir)
+liblftp_network_la_LDFLAGS = -avoid-version -no-undefined -rpath $(pkgverlibdir)
 liblftp_network_la_LIBADD  = $(SOCKSLIBS) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) $(LIBGNUTLS_LIBS) $(LIBSOCKET) $(GNULIB) $(ZLIB_LDFLAGS) $(ZLIB)
 
 proto_ftp_la_LIBADD  = liblftp-network.la
@@ -80,6 +80,8 @@
  $(LIB_CRYPTO) $(INET_PTON_LIB) $(LIB_CLOCK_GETTIME) $(SOCKSLIBS)\
  $(LIBSOCKET) $(LIB_POLL) $(LIB_SELECT) $(LTLIBINTL) $(LTLIBICONV)
 
+liblftp_tasks_la_LDFLAGS = -no-undefined
+
 liblftp_jobs_la_SOURCES = Job.cc Job.h CmdExec.cc CmdExec.h\
  commands.cc mgetJob.h mgetJob.cc SysCmdJob.cc SysCmdJob.h rmJob.cc rmJob.h\
  parsecmd.cc mvJob.cc mvJob.h alias.cc alias.h\
@@ -93,8 +95,10 @@
  buffer_std.cc buffer_std.h
 liblftp_jobs_la_LIBADD = $(JOB_MODULES_STATIC) liblftp-tasks.la
 
+liblftp_jobs_la_LDFLAGS = -no-undefined
+
 lftp_CPPFLAGS = $(AM_CPPFLAGS) $(READLINE_CFLAGS)
-lftp_LDFLAGS = -export-dynamic
+lftp_LDFLAGS = -export-dynamic -no-undefined
 lftp_LDADD = liblftp-jobs.la liblftp-tasks.la $(READLINE_LDFLAGS) $(READLINE_LIBS)
 lftp_DEPENDENCIES = liblftp-jobs.la
 
diff -Naur lftp-4.7.7/tests/Makefile.am.orig lftp-4.7.7/tests/Makefile.am
--- lftp-4.7.7/tests/Makefile.am.orig	2016-06-08 19:13:52.000000000 +0900
+++ lftp-4.7.7/tests/Makefile.am	2017-05-09 13:55:34.142355100 +0900
@@ -27,7 +27,7 @@
 
 check_LTLIBRARIES = module1.la
 module1_la_SOURCES = module1.cc
-module1_la_LDFLAGS  = -module -avoid-version -rpath $(abs_builddir)/.libs
+module1_la_LDFLAGS  = -module -avoid-version -rpath $(abs_builddir)/.libs -no-undefined
 
 TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
 EXTRA_DIST = $(check_SCRIPTS)
