[Freeswitch-dev] [patch] build with the recent binutils (DSO link change)

Jun Sun jsun at junsun.net
Sat Feb 2 07:37:10 MSK 2013


When I tried to build against the latest 64bit amazon ec2 instance, I 
got the following error:

----
...
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
configure: error: libtermcap, libcurses or libncurses are required!
----

A little bit research shows there was a ld behavior change recently. See 
the link below.

http://fedoraproject.org/wiki/UnderstandingDSOLinkChange

The attached patch fixes the problem. I *believe* the patch should be 
safe to older systems, but someone would have check it out.

Cheers.

Jun
-------------- next part --------------
diff -Nru freeswitch-1.2.5.3/libs/libedit/configure.orig freeswitch-1.2.5.3/libs/libedit/configure
--- freeswitch-1.2.5.3/libs/libedit/configure.orig	2012-12-07 15:22:41.000000000 +0000
+++ freeswitch-1.2.5.3/libs/libedit/configure	2013-02-02 03:58:05.043776662 +0000
@@ -15200,7 +15200,7 @@
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lncurses  $LIBS"
+LIBS="-lncurses -ltinfo $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -15235,7 +15235,7 @@
 #define HAVE_LIBNCURSES 1
 _ACEOF
 
-  LIBS="-lncurses $LIBS"
+  LIBS="-lncurses -ltinfo $LIBS"
 
 else
   as_fn_error $? "libtermcap, libcurses or libncurses are required!" "$LINENO" 5
diff -Nru freeswitch-1.2.5.3/libs/esl/Makefile.orig freeswitch-1.2.5.3/libs/esl/Makefile
--- freeswitch-1.2.5.3/libs/esl/Makefile.orig	2012-12-07 15:21:14.000000000 +0000
+++ freeswitch-1.2.5.3/libs/esl/Makefile	2013-02-02 04:15:22.816032763 +0000
@@ -7,7 +7,7 @@
 CFLAGS=$(BASE_FLAGS) $(PICKY)
 CXXFLAGS=$(BASE_FLAGS)
 MYLIB=libesl.a
-LIBS=-lncurses -lesl -lpthread -lm
+LIBS=-lncurses -ltinfo -lesl -lpthread -lm
 LDFLAGS=-L.
 OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o src/esl_json.o src/esl_buffer.o
 SRC=src/esl.c src/esl_json.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c src/esl_oop.cpp src/esl_json.c src/esl_buffer.c
diff -Nru freeswitch-1.2.5.3/configure.orig freeswitch-1.2.5.3/configure
--- freeswitch-1.2.5.3/configure.orig	2012-12-07 15:24:03.000000000 +0000
+++ freeswitch-1.2.5.3/configure	2013-02-02 03:57:07.287330057 +0000
@@ -21763,7 +21763,7 @@
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lncurses  $LIBS"
+LIBS="-lncurses -ltinfo $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -21798,7 +21798,7 @@
 #define HAVE_LIBNCURSES 1
 _ACEOF
 
-  LIBS="-lncurses $LIBS"
+  LIBS="-lncurses -ltinfo $LIBS"
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list