Hi
I am getting below errors while cross compiling
/home/subhra/SDK3.1.2/tools-3.1.2_build_50/bin/../lib/gcc/
mips64-octeon-linux-gnu/4.7.0/../../../../mips64-octeon-linux-gnu/bin/ld:
cannot find -lreadline
/home/subhra/SDK3.1.2/tools-3.1.2_build_50/bin/../lib/gcc/
mips64-octeon-linux-gnu/4.7.0/../../../../mips64-octeon-linux-gnu/bin/ld:
cannot find -lncurses
The fixes from this URL:
is not working.
Please help me how to compile it for mips
Thanks and regards
Subhra
On Thu, Mar 19, 2020 at 11:54 PM Daniel-Constantin Mierla <miconda(a)gmail.com>
wrote:
Module: kamailio
Branch: 5.3
Commit: c1cc4a07d11c829f89ea62206689fba92eb91ea2
URL:
https://github.com/kamailio/kamailio/commit/c1cc4a07d11c829f89ea62206689fba…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-03-19T19:19:58+01:00
kamcmd: use pkg-config to get compile flags for lib readline
(cherry picked from commit 0e6e05f8bec1fb451375d71a6b929a6908c5689d)
---
Modified: utils/kamcmd/Makefile
---
Diff:
https://github.com/kamailio/kamailio/commit/c1cc4a07d11c829f89ea62206689fba…
Patch:
https://github.com/kamailio/kamailio/commit/c1cc4a07d11c829f89ea62206689fba…
---
diff --git a/utils/kamcmd/Makefile b/utils/kamcmd/Makefile
index aae4f1394c..c8a7e6807e 100644
--- a/utils/kamcmd/Makefile
+++ b/utils/kamcmd/Makefile
@@ -18,6 +18,17 @@
readline_localpath=$(LOCALBASE)/include/readline/readline.h
readline_locations= /usr/include/readline/readline.h \
$(readline_localpath)
+ifeq ($(CROSS_COMPILE),)
+ BUILDER = $(shell which pkg-config)
+ifneq ($(BUILDER),)
+ PKGREADLINE = $(shell $(BUILDER) --exists readline > /dev/null
2>&1 ; echo $$? )
+ifneq ($(PKGREADLINE),0)
+ BUILDER =
+endif
+endif
+endif
+
+
use_readline ?=
ifneq (,$(MAKECMDGOALS))
ifeq (,$(filter-out $(nodep_targets),$(MAKECMDGOALS)))
@@ -66,6 +77,12 @@ ifneq (,$(findstring cygwin, $(OS)))
LIBS:= -lresolv
endif
+# detect libreadline
+ifneq ($(BUILDER),)
+ DEFS += $(shell $(BUILDER) --cflags readline)
+ LIBS += $(shell $(BUILDER) --libs readline)
+ use_readline := 1
+else
ifeq ($(use_readline),)
readline_path := $(shell \
for r in
$(readline_locations) ""; do \
@@ -93,14 +110,20 @@ endif
LIBS+=-lreadline -lncurses
endif
-endif
+endif # ifeq ($(use_readline),1)
+
+endif # ifneq ($(BUILDER),)
include $(COREPATH)/Makefile.utils
ifeq (,$(quiet))
ifeq ($(use_readline),1)
+ifneq ($(BUILDER),)
+$(info readline detected via pkg-config)
+else
$(info readline detected ($(readline_path)) )
+endif
$(info command completion enabled)
else
$(info "no readline include files detected, disabling readline support")
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev