[SR-Users] problem with compiling kamailio version 5.1.4 including a private Module

Abdulaziz Alghosh aziz647 at gmail.com
Thu Aug 9 22:05:09 CEST 2018


Hi Henning,

thanks again. I found meanwhile the root cause. It caused as you said by
the old logic of the make file. I used instead the new Formula of the tm
module’s make file (as i remember). Consequently, it did not bring the
compilation through those unwanted libraries.

I will spot the details later when i am back in office next Monday.

BR
Abdulaziz


On Thu 9. Aug 2018 at 21:19 Henning Westerholt <hw at kamailio.org> wrote:

> Am Donnerstag, 9. August 2018, 14:27:44 CEST schrieb Abdulaziz Alghosh:
> > thanks a lot for your response and explanation. strutils.[c,h] and
> > strcommon.[c,h] are almost the same. So I modified my included header
> from
> > stcommon[] to strutils as you mentioned.
> > Unfortunately, I surfed sequentially Kamailio version upgrades. Even
> > though, i did not found such hints about this modification. So I have
> some
> > doubts the called headers and codes from our own module. Hence, I am
> asking
> > for yor advice.
>
> Hello Abdul,
>
> lets move this discussion to the sr-dev list, as its a development related
> topic.
>
> > What I am trying to do now is compiliing our module separately under it
> is
> > own directory so I gain the Shared Object file (.so). Somehow our Module
> is
> > requring cds, presence and xcap libraries. But the strange thing is that
> > headers from these libraries are #including other headers assuming these
> > included header files are under the same library's directory (but in fact
> > most of the header files are under ../src/core/). For example :
>
> Do you placed your own module in the src/modules directory as well? If
> not, I
> would suggest to place it there. Its hard to find the issue just with the
> logs, there are also many errors here.
>
> My suggestion would be to go from your own module and try to compile a
> single
> file with gcc (for the actual command you can call "make quiet=0" and copy-
> paste it). I would try to investigate one error a time, in the end they
> should
> be all mostly related.
>
> There were also some changes in the Makefile logic, maybe you should
> compare
> your Makefile to one of the official modules.
>
> > Making  in cds
> > CC (gcc) [L libser_cds.so.0.1]          cds.o
> > In file included from cds.c:2:
> >
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/memory.h:125:21:
> > warning: mem/mem.h: No such file or directory
> >
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/memory.h:126:25:
> > warning: mem/shm_mem.h: No such file or directory
> > In file included from cds.c:3:
> > /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/sync.h:30:22:
> > warning: locking.h: No such file or directory
> > In file included from cds.c:4:
> >
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/logger.h:42:20:
> > error: dprint.h: No such file or directory
> > make[2]: *** [cds.o] Error 1
> > make[1]: [cds] Error 2 (ignored)
> >
> >
> > Those libraries are delivered with version 5.1.4 itself so i do not think
> > it is a good idea to modify the paths of the included header files to
> > compile my module. because most probably these libraries are needed by
> > standard default modules of kamailio.
> >
> > I hope this is not too much for you to inspect.
> > Note: The attached has the log files ( resulting from make all and
> install
> > ) .
> >
> > Your kind response is highly appreciated
> > BR
> > Abdulaziz
> >
> > On Thu, Aug 9, 2018 at 11:31 AM, Abdulaziz Alghosh <aziz647 at gmail.com>
> >
> > wrote:
> > > Hello Henning,
> > >
> > > thanks a lot for your response and explanation. strutils.[c,h] and
> > > strcommon.[c,h] are almost the same. So I modified my included header
> from
> > > stcommon[] to strutils as you mentioned.
> > > Unfortunately, I surfed sequentially Kamailio version upgrades. Even
> > > though, i did not found such hints about this modification. So I have
> some
> > > doubts the called headers and codes from our own module. Hence, I am
> > > asking
> > > for yor advice.
> > >
> > > What I am trying to do now is compiliing our module separately under
> it is
> > > own directory so I gain the Shared Object file (.so). Somehow our
> Module
> > > is
> > > requring cds, presence and xcap libraries. But the strange thing is
> that
> > > headers from these libraries are #including other headers assuming
> these
> > > included header files are under the same library's directory (but in
> fact
> > > most of the header files are under ../src/core/). For example :
> > >
> > > Making  in cds
> > > CC (gcc) [L libser_cds.so.0.1]          cds.o
> > > In file included from cds.c:2:
> > >
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/memory.h:125:2
> > > 1: warning: mem/mem.h: No such file or directory
> > >
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/memory.h:126:2
> > > 5: warning: mem/shm_mem.h: No such file or directory
> > > In file included from cds.c:3:
> > >
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/sync.h:30:22:
> > > warning: locking.h: No such file or directory
> > > In file included from cds.c:4:
> > >
> /Abdul/install/clean_test/kamailio-5.1.4/src/lib/cds/../cds/logger.h:42:20
> > > :
> > > error: dprint.h: No such file or directory
> > > make[2]: *** [cds.o] Error 1
> > > make[1]: [cds] Error 2 (ignored)
> > >
> > >
> > > Those libraries are delivered with version 5.1.4 itself so i do not
> think
> > > it is a good idea to modify the paths of the included header files to
> > > compile my module. because most probably these libraries are needed by
> > > standard default modules of kamailio.
> > >
> > > I hope this is not too much for you to inspect.
> > > Note: The attached has the log files ( resulting from make all and
> install
> > > ) .
> > >
> > > Your kind response is highly appreciated
> > > Abdulaziz
> > >
> > >
> > > On Thu, Aug 9, 2018 at 8:11 AM, Henning Westerholt <hw at kamailio.org>
> > >
> > > wrote:
> > >> Am Mittwoch, 8. August 2018, 17:47:07 CEST schrieb Abdulaziz Alghosh:
> > >> > i am somehow newbie with Kamailio and trying to migrate from
> kamailio
> > >> > version 3.0.3 to 5.1.4. Former fellows had developed own modules
> which
> > >> > needed "strcommon.h" and "strcommon.c".
> > >> >
> > >> > These last two files are not delievered with version 5.1.4. but I
> > >> > copied
> > >> > them under ../src/core/ thinking it would be beneficial.
> Unfortunately,
> > >> > after make prefix / (and including our own module) all, it seem that
> > >> > several dependencies exist. Especially from header files under
> > >> > ..src/lib/xcap/ and ../src/lib/presence
> > >> >
> > >> > Can somebody tell me how "strcommon.h" and "strcommon.c"  where
> > >>
> > >> replaced in
> > >>
> > >> > version 5.1.4 ?
> > >>
> > >> Hello Abdul,
> > >>
> > >> the functions in strcommon.[c,h] were moved into
> src/core/strutils.[c,h]
> > >> in
> > >> releases starting from 5.0. I'd suggest to have a look to the file to
> > >> verify
> > >> if there are no other changes.
>
> Best regards,
>
> --
> Henning Westerholt
> https://skalatan.de/blog/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180809/115a6dc8/attachment.html>


More information about the sr-users mailing list