[OpenSIPS-Users] Building Presences and PUA for OpenSIPS 1.6.1

opensipslist at encambio.com opensipslist at encambio.com
Fri Feb 5 11:44:55 CET 2010

Hello Steven,

An ven., févr 05, 2010, Steven C. Blair schrieb:
> Neither the presence or PUA modules want to build under 1.6.1.
> make says it cannot find libxml2 even though the package is
> installed. Are there any known issues building these modules?
There are no problems building the modules of the 1.6.1 release,
however the difficulty you describe is already known. To date no
correction has been made to the defective build configuration.

Take a look at the Makefile of a number of modules using libxml,
for example the one in modules/presence specifies:

DEFS+=-I$(SYSBASE)/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
LIBS=-L$(SYSBASE)/include/lib  -L$(LOCALBASE)/lib -lxml2

...but hardcoding such values into the build configuration is risky
and often leads to runtime security problems or build failures like
the one you're describing. Do this instead:

DEFS+=`/pfx/bin/pkg-config --cflags-only-I libxml-2.0`
LIBS=`/pfx/bin/pkg-config --libs libxml-2.0`

The 'pfx' is the path root in which you have libxml. In
'/pfx/lib/pkgconfig' you'll find 'libxml-2.0.pc' which can
be queried with the program 'pkg-config'.

Testing this on my system I see:

  $ /pfx/bin/pkg-config --cflags-only-I libxml-2.0
  -I/pfx/include/libxml2 -I/pfx/include
  $ /pfx/bin/pkg-config --libs libxml-2.0
  -R/pfx/lib -L/pfx/lib -lxml2 -lz -liconv -lm -lsocket -lnsl

...and that is what the OpenSIPS build configuration should be
using. By the way, this defect is not specific to the build
configuration of the presence modules. It is in others as well.
Good luck.


More information about the Users mailing list