[Asterisk-bsd] asterisk port pwlib problem

Steve Ames steve at virtual-voodoo.com
Wed Aug 3 17:00:58 CDT 2005


The problem is that FreeBSD ports attempt to compile pwlib and openh323
statically. However a lot of ports (and pwlib itself) search /usr/local
before the compile directory. In your case it seems you have pwlib
installed (perhaps a different version?) and that's causing the problem:

 /usr/local/include/ptclib/url.h

is being included instead of the url.h from devel/pwlib. This patch will
change the include search order and make pwlib compile. But its not quite
the right solution.

A couple of us have submitted PRs to freebsd-ports to update pwlib and
openh323 to current versions and start compiling dynamically. Still waiting
on someone to commit things one way or another. *sigh*

This patch really just modifies mak-ptbuildopts.mak.in so that
STDCCFLAGS defines the local include directory before /usr/local/include

-steve

diff -ruN files/patch-make-ptbuildopts.mak.in.orig files/patch-make-ptbuildopts.mak.in
--- files/patch-make-ptbuildopts.mak.in.orig     Thu Jan  1 00:00:00 1970
+++ files/patch-make-ptbuildopts.mak.in  Thu Jul  7 14:20:06 2005
@@ -0,0 +1,14 @@
+--- make/ptbuildopts.mak.in.orig       Thu Jul  7 14:17:24 2005
++++ make/ptbuildopts.mak.in    Thu Jul  7 14:15:47 2005
+@@ -9,6 +9,11 @@
+ OSTYPE           = @OSTYPE@
+ OSRELEASE  = @OSRELEASE@
+
++# This line makes this port of pwlib play well with others... otherwise
++# /usr/local/include gets inserted first and causes the inclusion of
++# files from different versions of pwlib
++STDCCFLAGS    += -I at PWLIBDIR@/include/ptlib/unix -I at PWLIBDIR@/include
++
+ STDCCFLAGS    += @STDCCFLAGS@
+ OPTSTDCCFLAGS += @OPTSTDCCFLAGS@
+ LDFLAGS             += @LDFLAGS@




On Wed, Aug 03, 2005 at 05:56:21PM -0300, Diego Valencia wrote:
>    Hi everyone, I want to install asterisk from ports on FreeBSD 5.4, but
>    there is an error when it try to compile pwlib:
> 
>    /usr/ports/net/asterisk
>    BSD5# make install
>    ===>   asterisk-1.0.9_1 depends on executable: mpg123 - found
>    ===>   asterisk-1.0.9_1 depends on file: /nonexistent - not found
>    ===>    Verifying build for /nonexistent in /usr/ports/devel/pwlib
>    ===>  Building for pwlib-1.5.2,1
>    gmake P_SHAREDLIB=0 opt
>    gmake[1]: Entering directory `/usr/ports/devel/pwlib/work/pwlib'
>    set -e; gmake -C src/ptlib/unix opt; gmake -C tools/asnparser opt;
>    gmake[2]: Entering directory
>    `/usr/ports/devel/pwlib/work/pwlib/src/ptlib/unix'
>    c++ -DP_FREEBSD=504000 -D_REENTRANT -I/usr/local/include
>    -I/usr/local/include -Wall  -DP_FREEBSD=504000 -DP_USE_PRAGMA
>    -DPHAS_TEMPLATES -I/usr/ports/devel/pwlib/work/pwlib/include/ptlib/unix
>    -I/usr/include/pwlib -I/usr/ports/devel/pwlib/work/pwlib/include -DNDEBUG
>    -O -pipe  -DPTRACING=1 -x c++ -c ../../ptclib/http.cxx -o
>    /usr/ports/devel/pwlib/work/pwlib/lib/obj_FreeBSD_x86_r/http.o
>    ../../ptclib/http.cxx:592: error: prototype for `void PURL::Parse(const
>    char*, const char*)' does not match any in class `PURL'
>    /usr/local/include/ptclib/url.h:194: error: candidates are: BOOL
>    PURL::Parse(const PString&, const char*)
>    /usr/local/include/ptclib/url.h:189: error:                 BOOL
>    PURL::Parse(const char*, const char*)
>    ../../ptclib/http.cxx:592: error: `void PURL::Parse(const char*, const
>    char*)' and `BOOL PURL::Parse(const char*, const char*)' cannot be
>    overloaded
>    gmake[2]: ***
>    [/usr/ports/devel/pwlib/work/pwlib/lib/obj_FreeBSD_x86_r/http.o] Error 1
>    gmake[2]: Leaving directory
>    `/usr/ports/devel/pwlib/work/pwlib/src/ptlib/unix'
>    gmake[1]: *** [opt] Error 2
>    gmake[1]: Leaving directory `/usr/ports/devel/pwlib/work/pwlib'
>    gmake: *** [optnoshared] Error 2
>    *** Error code 2
> 
>    Stop in /usr/ports/devel/pwlib.
>    *** Error code 1
> 
>    Stop in /usr/ports/net/asterisk.
> 
> 
>    Can you help me?
> 
>    Thanks!
> 
>    Diego

> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd



More information about the Asterisk-BSD mailing list