0

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!

Jack Bonneman
  • 1,821
  • 18
  • 24
Linus Jäderlund
  • 515
  • 5
  • 13
  • could you share the answer i'm having the same problem whit pjsip exactly the same error – Radu Jun 26 '12 at 12:27

1 Answers1

3

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
Nathan.Arnold
  • 188
  • 1
  • 7
  • I got this working around a week after posting. Thank you for you post though! I will mark you post as accepted as a token of appreciation! – Linus Jäderlund Jun 01 '12 at 09:39
  • How did You get it to work share whit the class because i'm having a bad time whit this sip – Radu Jun 26 '12 at 13:19