<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>to be sure I understand properly the issue: you say that the
value of the LIBS from Makefile of the module is inherited when
compiling the internal library?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 11/01/2017 04:21, Patrick wrote:<br>
</div>
<blockquote
cite="mid:CAGAcwwcwAfXs7j4QNyEDbg41VNmqh66kYPGDUsmL8u-rYdaqhA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)">I added a C++ module
to kamalio at some point, and now I am trying to integrate
that module with another C++ internal library, but I'm getting
all sorts of headaches when trying to compile. </div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)"><br>
</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)">The latest problem
is during the "make install" part of the build - it seems like
the objects from the module are "infecting" the link line of
the internal library it's dependent on.</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)"><br>
</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)">Here is the Makefile
for the module. At the time, the only way I figured to link in
the C++ object was adding them to the LIBS. Now, i think this
interferes with the 'make install' dependencies.</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)"><br>
</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)">Any thoughs on how
to do this properly would be great!</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)"><br>
</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)">Thanks</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)"><br>
</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)"><br>
</div>
<div class="gmail_default"
style="font-size:small;color:rgb(0,51,0)"><b><u>Module
Makefile</u></b></div>
<div class="gmail_default" style="color:rgb(0,51,0)"><font
size="1"><br>
</font></div>
<div class="gmail_default">
<div class="gmail_default"><font color="#003300" size="1">#</font></div>
<div class="gmail_default"><font color="#003300" size="1">#
db_cassandra module makefile</font></div>
<div class="gmail_default"><font color="#003300" size="1">#</font></div>
<div class="gmail_default"><font color="#003300" size="1">#</font></div>
<div class="gmail_default"><font color="#003300" size="1">#
WARNING: do not run this directly, it should be run by the
master Makefile</font></div>
<div class="gmail_default"><font color="#003300" size="1"><br>
</font></div>
<div class="gmail_default"><font color="#003300" size="1">include
../../Makefile.defs</font></div>
<div class="gmail_default"><font color="#003300" size="1"><br>
</font></div>
<div class="gmail_default"><font color="#003300" size="1">CXX=g++</font></div>
<div class="gmail_default"><font color="#003300" size="1">LD=g++</font></div>
<div class="gmail_default"><span
style="color:rgb(0,51,0);font-size:x-small">auto_gen=</span><br>
</div>
<div class="gmail_default"><font color="#003300" size="1">NAME=db_arl.so</font></div>
<div class="gmail_default"><font color="#003300" size="1"><br>
</font></div>
<div class="gmail_default"><font color="#003300" size="1">ifeq
($(CROSS_COMPILE),)</font></div>
<div class="gmail_default"><font color="#003300" size="1">CURL_BUILDER=$(shell
\</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>if
pkg-config --exists libcurl; then \</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>echo
'pkg-config libcurl'; \</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>else
\</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>which
curl-config; \</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>fi)</font></div>
<div class="gmail_default"><font color="#003300" size="1">endif</font></div>
<div class="gmail_default"><font color="#003300" size="1"><br>
</font></div>
<div class="gmail_default"><span
style="color:rgb(0,51,0);font-size:x-small">DEFS+=-DKAMAILIO_MOD_INTERFACE
-DRTC_COMMON_TRACE</span><br>
</div>
<div class="gmail_default"><font size="1"><b><font
color="#003300">LIBS += </font><font color="#ff0000">db_arl_base.o
jsoncpp.o</font></b><font color="#003300"> -lcurl
-pthread</font></font></div>
<div class="gmail_default"><font color="#003300" size="1"><br>
</font></div>
<div class="gmail_default"><font color="#003300" size="1">CXXFLAGS=$(CFLAGS:-Wno-deprecated
option=)</font></div>
<div class="gmail_default"><font color="#003300" size="1">CXXFLAGS+=
-Wno-write-strings -Wno-deprecated -Wno-unused-function
-Wno-sign-compare -Wno-strict-aliasing </font></div>
<div class="gmail_default"><span
style="color:rgb(0,51,0);font-size:x-small">CXXFLAGS+= -I
${COL_LOCAL_BUILDS_ROOT}/ExternalLibs/boost/V1.60.0_27/</span><br>
</div>
<div class="gmail_default"><font color="#003300" size="1">CXXFLAGS+=
-I ./jsoncpp-dist/</font></div>
<div class="gmail_default"><font color="#003300" size="1"><br>
</font></div>
<div class="gmail_default"><font color="#003300" size="1">SERLIBPATH=../../lib</font></div>
<div class="gmail_default"><font color="#003300" size="1">SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2</font></div>
<div class="gmail_default"><font color="#003300" size="1">SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1</font></div>
<div class="gmail_default"><font color="#0000ff" size="1"><b>SER_LIBS+=$(SERLIBPATH)/rtctrace/rtctrace</b></font></div>
<div class="gmail_default"><font color="#003300" size="1"><br>
</font></div>
<div class="gmail_default"><font color="#003300" size="1">include
../../Makefile.modules</font></div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default"><font color="#003300" size="1">jsoncpp.o:
jsoncpp-dist/jsoncpp.cpp</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>@echo
COL_LOCAL_BUILDS_ROOT=${COL_LOCAL_BUILDS_ROOT}</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>@echo
"Compiling $<"</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>$(CXX)
$(CXXFLAGS) $(CFLAGS) $(C_DEFS) $(DEFS) -c $< -o $@</font></div>
<div class="gmail_default"><font color="#003300" size="1"><br>
</font></div>
<div class="gmail_default"><font color="#003300" size="1">db_arl_base.o:
db_arl_base.cpp db_arl_base.h</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>@echo
COL_LOCAL_BUILDS_ROOT=${COL_LOCAL_BUILDS_ROOT}</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>@echo
"Compiling $<"</font></div>
<div class="gmail_default"><font color="#003300" size="1"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>$(CXX)
$(CXXFLAGS) $(CFLAGS) $(C_DEFS) $(DEFS) -c $< -o $@</font></div>
<div class="gmail_default"><font color="#003300" size="1"><br>
</font></div>
<div class="gmail_default"><font color="#003300" size="1">db_arl.so:
db_arl_base.o jsoncpp.o</font></div>
<div
style="text-decoration:underline;font-weight:bold;color:rgb(0,51,0);font-size:small"><br>
</div>
<div
style="text-decoration:underline;font-weight:bold;color:rgb(0,51,0);font-size:small"><br>
</div>
<div style="font-size:small"><span
style="color:rgb(0,51,0);font-weight:bold;text-decoration:underline">During
'make install'</span><font color="#003300"> the objects in
</font><b><font color="#ff0000">red</font></b><font
color="#003300"> have no business in the link line for the
internal library</font></div>
<div>
<div style="color:rgb(0,51,0)"><font size="1">/opt/rh/devtoolset-4/root/usr/bin/g++
-fPIC -DPIC -g -funroll-loops -Wcast-align -m64
-minline-all-stringops -falign-loops -ftree-vectorize
-fno-strict-overflow -mtune=opteron -Wall
-I/home/pshea/_localbuilds/RTC/Common/2.0.0_247//Applications_rhel6_x64_dts4_pic/include
-DNAME='"kamailio"' -DVERSION='"4.2.4"'
-DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"'
-DCOMPILER='"gcc 4.4.7"' -D__CPU_x86_64 -D__OS_linux
-DSER_VER=4002004 -DCFG_DIR='"/usr/local/etc/kamailio/"'
-DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK
-DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES
-DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST
-DUSE_NAPTR -DWITH_XAVP -DF_MALLOC -DDBG_F_MALLOC
-DMEM_JOIN_FREE -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS
-DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT
-DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
-DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2
-DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
-DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL
-DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER
-DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT
-DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
-std=c++0x
-I/home/pshea/_localbuilds/RTC/Common/2.0.0_247//Applications_rhel6_x64_dts4_pic/include
-c rtctrace.c -o rtctrace.o -MMD -MP</font></div>
<div><font size="1"><font color="#003300">/opt/rh/devtoolset-4/root/usr/bin/g++
-shared -m64 -Wl,-O2 -Wl,-E
-Wl,-soname,librtctrace.so.1 rtctrace.o </font><b><font
color="#ff0000"> db_arl_base.o jsoncpp.o</font></b><font
color="#003300"> -lcurl -pthread
-L/home/pshea/_localbuilds/RTC/Common/2.0.0_247//Applications_rhel6_x64_dts4_pic/lib
-lrtccommon
-L/home/pshea/_localbuilds/ExternalLibs/boost/V1.60.0_22/Server_Linux26_x64_dts4_pic/lib
-lboost_system -lboost_thread -lpthread -o
librtctrace.so.1.0</font></font></div>
<div><font color="#ff0000" size="1"><b>g++: error:
db_arl_base.o: No such file or directory</b></font></div>
<div><font color="#ff0000" size="1"><b>g++: error:
jsoncpp.o: No such file or directory</b></font></div>
<div
style="color:rgb(0,51,0);font-size:small;text-decoration:underline"><br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>