error while building pjsip in linux
Ubuntu 16.04 - amd64
git clone https://github.com/svn2github/pjsip.git
... or pjproject-2.7.2.tar.bz2
: Both will build OK here, with gcc version 4.8 → sudo apt install g++-4.8
Build example, ref. https://trac.pjsip.org/repos/wiki/Getting-Started/Autoconf
export CC=gcc-4.8 CXX=g++-4.8 && ./configure --enable-shared --disable-static --enable-memalign-hack
make dep && make
Interesting is that pjsip can be built with gcc, g++ v. 7.3 on an rpm based OS. But then again, the Ubuntu gcc´s have a very different patching.
error while building pjsip
This is because pjsua-app is not generated by default on the general build (more specifically, pjsua:
target is not included on all:
target at pjsip-apps/build/Makefile). To fix this just go to pjsip-apps/build and run:
make pjsua
This would create proper object files at: pjsip-apps/build/output/pjsua-arm-unknown-linux-androideabi/ (needed when building android sample).
Once you've all corresponding object files, you can run ndk-build again at pjsip-apps/src/pjsua/android
Error: Compiling simple PjSIP program under ubuntu
It seems that the pj* can't build the neccessary libaries - for a simple fix try to locate the line in /home/mypc/pjproject-1.4.5/build.mak
where -Werror
is added to $(APP_CFLAGS)
and remove it (the -Werror
, not the whole line if other flags are added :).
Alternatively apply the fix suggested by gcc on line 230 in src/pjnath/stun_session.c
.
edit:
Just read that you found no -Werror
. Could you either paste line 230 of stun_session.c or the make-files somewhere?
The source line would be preferred.
Error While building PJSiP in Android
I'm sure you've moved on past this by now, but for anyone else who finds this thread:
Just set the NDK_TOOLCHAIN_VERSION
environment variable to 4.9
This can be done either by doing an export prior to the configure call:
export NDK_TOOLCHAIN_VERSION=4.9
./configure-android
or on the same command line as the configure call:
NDK_TOOLCHAIN_VERSION=4.9 TARGET_ABI=<whatever> ./configure-android --use-ndk-cflags
In revision 13+ of the android NDK, the default compiler is Clang instead of GCC. PJSIP 2.6 (newest as of this writing) is not yet updated to parse for the Clang compiler location correctly, so it claims "compiler not found, please check environment settings". Setting the NDK_TOOLCHAIN_VERSION
to 4.9
forces the NDK to use GCC in place of Clang, and then PJSIP will be happy.
According to the NDK revision history, GCC will be removed in a future release. So if someone reading this is using a version of the NDK where it's been removed (which hasn't happened yet at the time of this writing), you'll need to just downgrade your NDK.
This solution comes from this answer and the corresponding PJSIP ticket can be found here.
Error compiling PJSIP on Ubuntu
Seems that you miss libavcodec/avcodec.h
and, most probably, also libavformat/avformat.h
. This should be because ffmpeg include folder is not into gcc
's list of directories to look for header files.
From your update seems that pjsip
is building against a newer ffmpeg
version that the one available in Ubuntu's repositories. As you've built it yourself, you can configure pjsip
to use your version by running:
./configure --with-ffmpeg=<YOUR_FFMPEG_FOLDER>
or
#Copy all library ffmpeg library files into one folder
CFLAGS="-I<YOUR_FFMPEG_FOLDER>" LDFLAGS="-L<YOUR_FFMPEG_LIB_FOLDER>" ./configure
PJSIP Error building for x86
I have resolved issue, using ready "script"..
pjsip-android-builder
Simply follow the instructions :)
Related Topics
Generic Printing Using a Usb Port
Sort a Find Command to Respect a Custom Order in Unix
Logstash Too Many Files Opened
Insecure $Env{Path} While Running with - T Switch
Linux Shell Scripting: How to Remove Final Numbers in a Word List File
Use Awk to Print $0 Using The Same Format for All Columns
Git Status Between Windows and Linux Does Not Agree
How to Continue Next Iteration When an Error Occurs in Bash
How to Get The Process Id of Command Executed in Bash Script
Complete Password Field Scp Command on Linux
Change The Rlimit_Nproc in Linux
Cvs Error: Failed to Create Lock Directory... Permission Denied
Golang Math Can Not Finished with My Code, But Python Is Ok
Suppressing Compile Time Linkage of Shared Libraries