Question

I'm trying to compile pjsip version 2 using the terminal and I'm getting constant error no matter what I try. Been looking for the answer all over the internet including stackoverflow.

I downloaded pjsip version 2 using their subversion repository today so all files should be up to date.

When following this guide: http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone I get this error after running "make dep && make clean && make":

ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
make[2]: *** [../bin/pjsua-arm-apple-darwin9] Error 1
make[1]: *** [pjsua] Error 2
make: *** [all] Error 1

When using the above guide combined with this guide: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2011-October/013481.html I get this error after running "make dep && make clean && make":

ld: symbol(s) not found for architecture arm
collect2: ld returned 1 exit status
make[2]: *** [../bin/pjsua-arm-apple-darwin10] Error 1
make[1]: *** [pjsua] Error 2
make: *** [all] Error 1

I've included /pjlib/include/pj/config_site.h with the following code:

#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>

How do I get pjsip to compile without errors?

Please consider that I'm new to this, thank you!

Was it helpful?

Solution

From your error, it looks like there could be a couple things wrong. I would make sure all your environment variables are cleared before continuing (just to be safe).

In ./configure-iphone, make sure you change:

./aconfigure --host=arm-apple-darwin9 --disable-floating-point $*

To:

./aconfigure --host=arm-apple-darwin10 --disable-floating-point $*

Here are the scripts that I use to build the libraries:

Simulator:

    export DEVPATH=/Developer/Platforms/iPhoneSimulator.platform/Developer
    export CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc

    export CFLAGS="-O2 -m32 -miphoneos-version-min=5.0 -g -ggdb -g3 -DNDEBUG" 
    export LDFLAGS="-O2 -m32"

    ./configure-iphone

    make clean
    make dep
    make
    make clean

Device:

  export ARCH="-arch armv7"
  export CFLAGS="-DNDEBUG -g -ggdb -g3"

  ./configure-iphone

  make clean
  make dep
  make
  make clean
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top