Ошибка компиляции PJSIP для iOS5

Помогите, пожалуйста, собрать siphone для iOS 5.

Я пытаюсь скомпилировать pjsip для проекта siphone. Источник PJSIP — svn co http://svn.pjsip.org/repos/pjproject/trunk pjproject Siphone code – проверка svn http://siphon.googlecode.com/svn/trunk/ syphon Следуя скрипту build-libpj.sh из code.google.com/p/siphon/downloads/list

Получение следующей ошибки:

`if test ! -d ../lib; then mkdir -p ../lib; fi`
`echo ranlib -static -o ../lib/libpj-arm-apple-darwin10.a  output/pjlib-arm-apple-darwin10  /ioqueue_select.o  output/pjlib-arm-apple-darwin10/file_access_unistd.o  output/pjlib-arm-apple-darwin10/file_io_ansi.o  output/pjlib-arm-apple-darwin10/os_core_unix.o  output/pjlib-arm-apple-darwin10/os_error_unix.o  output/pjlib-arm-apple-darwin10/os_time_unix.o  output/pjlib-arm-apple-darwin10/os_timestamp_posix.o  output/pjlib-arm-apple-darwin10/os_info_iphone.o  output/pjlib-arm-apple-darwin10/guid_simple.o  output/pjlib-arm-apple-darwin10/os_core_darwin.o  output/pjlib-arm-apple-darwin10/addr_resolv_sock.o  output/pjlib-arm-apple-darwin10/log_writer_stdout.o  output/pjlib-arm-apple-darwin10/os_timestamp_common.o  output/pjlib-arm-apple-darwin10/pool_policy_malloc.o  output/pjlib-arm-apple-darwin10/sock_bsd.o  output/pjlib-arm-apple-darwin10/sock_select.o  output/pjlib-arm-apple-darwin10/activesock.o  output/pjlib-arm-apple-darwin10/array.o  output/pjlib-arm-apple-darwin10/config.o  output/pjlib-arm-apple-darwin10/ctype.o  output/pjlib-arm-apple-darwin10/errno.o  output/pjlib-arm-apple-darwin10/except.o  output/pjlib-arm-apple-darwin10/fifobuf.o  output/pjlib-arm-apple-darwin10/guid.o  output/pjlib-arm-apple-darwin10/hash.o  output/pjlib-arm-apple-darwin10/ip_helper_generic.o  output/pjlib-arm-apple-darwin10/list.o  output/pjlib-arm-apple-darwin10/lock.o  output/pjlib-arm-apple-darwin10/log.o  output/pjlib-arm-apple-darwin10/os_time_common.o  output/pjlib-arm-apple-darwin10/os_info.o  output/pjlib-arm-apple-darwin10/pool.o  output/pjlib-arm-apple-darwin10/pool_buf.o  output/pjlib-arm-apple-darwin10/pool_caching.o  output/pjlib-arm-apple-darwin10/pool_dbg.o  output/pjlib-arm-apple-darwin10/rand.o  output/pjlib-arm-apple-darwin10/rbtree.o  output/pjlib-arm-apple-darwin10/sock_common.o  output/pjlib-arm-apple-darwin10/sock_qos_common.o  output/pjlib-arm-apple-darwin10/sock_qos_bsd.o  output/pjlib-arm-apple-darwin10/ssl_sock_common.o  output/pjlib-arm-apple-darwin10/ssl_sock_ossl.o  output/pjlib-arm-apple-darwin10/ssl_sock_dump.o  output/pjlib-arm-apple-darwin10/string.o  output/pjlib-arm-apple-darwin10/timer.o  output/pjlib-arm-apple-darwin10/types.o`
    `ranlib -static -o ../lib/libpj-arm-apple-darwin10.a output/pjlib-arm-apple-darwin10/ioqueue_select.o output/pjlib-arm-apple-darwin10/file_access_unistd.o output/pjlib-arm-apple-darwin10/file_io_ansi.o output/pjlib-arm-apple-darwin10/os_core_unix.o output/pjlib-arm-apple-darwin10/os_error_unix.o output/pjlib-arm-apple-darwin10/os_time_unix.o output/pjlib-arm-apple-darwin10/os_timestamp_posix.o output/pjlib-arm-apple-darwin10/os_info_iphone.o output/pjlib-arm-apple-darwin10/guid_simple.o output/pjlib-arm-apple-darwin10/os_core_darwin.o output/pjlib-arm-apple-darwin10/addr_resolv_sock.o output/pjlib-arm-apple-darwin10/log_writer_stdout.o output/pjlib-arm-apple-darwin10/os_timestamp_common.o output/pjlib-arm-apple-darwin10/pool_policy_malloc.o output/pjlib-arm-apple-darwin10/sock_bsd.o output/pjlib-arm-apple-darwin10/sock_select.o output/pjlib-arm-apple-darwin10/activesock.o output/pjlib-arm-apple-darwin10/array.o output/pjlib-arm-apple-darwin10/config.o output/pjlib-arm-apple-darwin10/ctype.o output/pjlib-arm-apple-darwin10/errno.o output/pjlib-arm-apple-darwin10/except.o output/pjlib-arm-apple-darwin10/fifobuf.o output/pjlib-arm-apple-darwin10/guid.o output/pjlib-arm-apple-darwin10/hash.o output/pjlib-arm-apple-darwin10/ip_helper_generic.o output/pjlib-arm-apple-darwin10/list.o output/pjlib-arm-apple-darwin10/lock.o output/pjlib-arm-apple-darwin10/log.o output/pjlib-arm-apple-darwin10/os_time_common.o output/pjlib-arm-apple-darwin10/os_info.o output/pjlib-arm-apple-darwin10/pool.o output/pjlib-arm-apple-darwin10/pool_buf.o output/pjlib-arm-apple-darwin10/pool_caching.o output/pjlib-arm-apple-darwin10/pool_dbg.o output/pjlib-arm-apple-darwin10/rand.o output/pjlib-arm-apple-darwin10/rbtree.o output/pjlib-arm-apple-darwin10/sock_common.o output/pjlib-arm-apple-darwin10/sock_qos_common.o output/pjlib-arm-apple-darwin10/sock_qos_bsd.o output/pjlib-arm-apple-darwin10/ssl_sock_common.o output/pjlib-arm-apple-darwin10/ssl_sock_ossl.o output/pjlib-arm-apple-darwin10/ssl_sock_dump.o output/pjlib-arm-apple-darwin10/string.o output/pjlib-arm-apple-darwin10/timer.o output/pjlib-arm-apple-darwin10/types.o`
`make -f /Users/RajaSekhar/Desktop/siphone/pjproject/build/rules.mak APP=TEST app=pjlib-test ../bin/pjlib-test-arm-apple-darwin10`
`if test ! -d ../bin; then mkdir -p ../bin; fi`
`/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc -o ../bin/pjlib-test-arm-apple-darwin10 \`
`output/pjlib-test-arm-apple-darwin10/main.o  output/pjlib-test-arm-apple-darwin10/activesock.o  output/pjlib-test-arm-apple-darwin10/atomic.o  output/pjlib-test-arm-apple-darwin10/echo_clt.o  output/pjlib-test-arm-apple-darwin10/errno.o  output/pjlib-test-arm-apple-darwin10/exception.o  output/pjlib-test-arm-apple-darwin10/fifobuf.o  output/pjlib-test-arm-apple-darwin10/file.o  output/pjlib-test-arm-apple-darwin10/hash_test.o  output/pjlib-test-arm-apple-darwin10/ioq_perf.o  output/pjlib-test-arm-apple-darwin10/ioq_udp.o  output/pjlib-test-arm-apple-darwin10/ioq_unreg.o  output/pjlib-test-arm-apple-darwin10/ioq_tcp.o  output/pjlib-test-arm-apple-darwin10/list.o  output/pjlib-test-arm-apple-darwin10/mutex.o  output/pjlib-test-arm-apple-darwin10/os.o   output/pjlib-test-arm-apple-darwin10/pool.o  output/pjlib-test-arm-apple-darwin10/pool_perf.o  output/pjlib-test-arm-apple-darwin10/rand.o  output/pjlib-test-arm-apple-darwin10/rbtree.o  output/pjlib-test-arm-apple-darwin10/select.o  output/pjlib-test-arm-apple-darwin10/sleep.o  output/pjlib-test-arm-apple-darwin10/sock.o  output/pjlib-test-arm-apple-darwin10/sock_perf.o  output/pjlib-test-arm-apple-darwin10/ssl_sock.o  output/pjlib-test-arm-apple-darwin10/string.o  output/pjlib-test-arm-apple-darwin10/test.o  output/pjlib-test-arm-apple-darwin10/thread.o  output/pjlib-test-arm-apple-darwin10/timer.o  output/pjlib-test-arm-apple-darwin10/timestamp.o  output/pjlib-test-arm-apple-darwin10/udp_echo_srv_sync.o  output/pjlib-test-arm-apple-darwin10/udp_echo_srv_ioqueue.o  output/pjlib-test-arm-apple-darwin10/util.o -O2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -framework AudioToolbox -framework Foundation -lbz2 -lz -lpthread  -framework CoreAudio -framework CoreFoundation -framework AudioToolbox -framework CFNetwork -framework UIKit -framework AVFoundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia  ../lib/libpj-arm-apple-darwin10.a  -O2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -framework AudioToolbox -framework Foundation -lbz2 -lz -lpthread  -framework CoreAudio -framework CoreFoundation -framework AudioToolbox -framework CFNetwork -framework UIKit -framework AVFoundation -framework UIKit -framework CoreGraphics -framework  QuartzCore -framework CoreVideo -framework CoreMedia`     
`arm-apple-darwin10-llvm-gcc-4.2: ../lib/libpj-arm-apple-darwin10.a: No such file or directory`
`make[2]: *** [../bin/pjlib-test-arm-apple-darwin10] Error 1`
`make[1]: *** [pjlib-test] Error 2`
`make: *** [all] Error 1`

Заранее спасибо за помощь!


person Raja T S Sekhar    schedule 01.03.2012    source источник
comment
в файле pjlib/include/pj/config_site.h. Добавил в него следующий код. #define PJ_CONFIG_IPHONE 1 #include ‹pj/config_site_sample.h› Теперь можно компилировать библиотеки, но возникает ошибка при компоновке в коде xcode-siphon, лексический препроцессор выдает фатальную ошибку: файл «pjsua-lib/pjsua.h» не найден   -  person Raja T S Sekhar    schedule 06.03.2012
comment
рекурсивно связал библиотеки в поиске по заголовку и пути поиска lib. Теперь получаю следующую ошибку. ../pjproject-svn/pj/compat/setjmp.h:30:12: ошибка: неизвестное имя типа 'jmp_buf'   -  person Raja T S Sekhar    schedule 06.03.2012
comment
ошибка исчезла, когда в этом файле прокомментирована следующая строка #define PJ_HAS_SETJMP_H 1   -  person Raja T S Sekhar    schedule 10.03.2012
comment
Строка #define PJ_HAS_SETJMP_H 1, которую необходимо закомментировать, находится в строке 63 pjproject-2.1.0/pjlib/include/pj/compat/os_auto.h.   -  person Hlung    schedule 23.09.2013
comment
@RajaTSSekhar: я столкнулся с той же проблемой. Я использую PJSIP версии 2.5.5 и XCode 8.2.1. Пожалуйста, помогите мне решить эту проблему.   -  person mital solanki    schedule 09.01.2017


Ответы (2)


pjsip имеет множество заголовков, которые дублируют имена основных заголовков. Это может привести к хаосу, если ваш источник и пути поиска не настроены тщательно.

person Ted P    schedule 25.10.2012

См. этот ответ. Я думаю, что в основном вы включаете в свой проект все фактические заголовки pjsip. Это вызывает эти конфликтные проблемы. Похоже, что настроек путей поиска заголовков достаточно, чтобы компилятор мог искать эти заголовки.

Так что вам не нужно комментировать эту строку #define PJ_HAS_SETJMP_H 1. Просто оставьте это так.

person Hlung    schedule 24.09.2013