Re: Issues compiling pjsip and pysua on centos 7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luke 
I am flat out clueless about PJSUA2 vs PJSUA but i think i fumbled my way through compiling the project. It seems to be working fine on python 2.7 so i will not touch it. 
Hopefully one day this project can be packaged easier for noobs like me can just do a simple yum install.

Thanks for everyone's help. Got past the scary stuff and onto the fun part =)




On Tue, Dec 19, 2017 at 9:55 PM, Luke Biddle <lukeandrewbiddle@xxxxxxxxx> wrote:
That ticket is for the python wrapper for PJSUA2, however this part of the build is for PJSUA which is still in python2.

In the build error you posted we can see:
Leaving directory `/root/pjproject-2.7.1/pjsip-apps/src/python' -I/usr/include/python2.7 -c _pjsua.c -o build/temp.linux-x86_64-2.7/_pjsua.o
which confirms that the pjsua, which lives in pjsip-apps/src/python, was being built using python2.7.

If you did intend to use PJSUA2 for it's python3 support, you may run into the issue I mentioned here: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2017-November/020351.html
Unfortunately I never found a way past it, but keep me posted if you have more luck!

On 20 December 2017 at 10:41, allen chan <allen.michael.chan@xxxxxxxxx> wrote:
Luke,

Sorry I do not understand. I thought build defaults to python 3 now.



On Tue, Dec 19, 2017 at 4:19 PM, Luke Biddle <lukeandrewbiddle@xxxxxxxxx> wrote:
Looks like the build is trying to use python2.7, make sure you have the headers for that version too.

On 20 December 2017 at 05:13, allen chan <allen.michael.chan@xxxxxxxxx> wrote:
Thank you for lightening fast response Ernesto. I figured it was something stupid. Still doesn't work yet.

$ sudo yum -y install python36u-devel

$ rpm -qa | grep -i python36
python36u-3.6.3-1.ius.centos7.x86_64
python36u-setuptools-36.6.0-1.ius.centos7.noarch
python36u-libs-3.6.3-1.ius.centos7.x86_64
python36u-pip-9.0.1-1.ius.centos7.noarch
python36u-devel-3.6.3-1.ius.centos7.x86_64

$ ls -lah /usr/bin/ | grep -i python
lrwxrwxrwx.  1 root    7 Nov 27 22:06 python -> python2
lrwxrwxrwx.  1 root    9 Nov 27 22:06 python2 -> python2.7
-rwxr-xr-x.  1 root 7.0K Aug  4 00:40 python2.7
lrwxrwxrwx.  1 root   18 Dec 19 18:19 python3 -> /usr/bin/python3.6
-rwxr-xr-x.  2 root  12K Oct 11 23:20 python3.6
lrwxrwxrwx.  1 root   26 Dec 19 19:06 python3.6-config -> /usr/bin/python3.6m-config
-rwxr-xr-x.  2 root  12K Oct 11 23:20 python3.6m
-rwxr-xr-x.  1 root  173 Oct 11 23:19 python3.6m-config
-rwxr-xr-x.  1 root 3.4K Oct 11 23:17 python3.6m-x86_64-config

$ pwd
/root/pjproject-2.7.1/pjsip-apps/src/python

$ sudo make
python setup.py build
running build
running build_py
running build_ext
building '_pjsua' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPJ_AUTOCONF=1 -Imake[1]: Entering directory `/root/pjproject-2.7.1/pjsip-apps/src/python' -I/root/pjproject-2.7.1/pjlib/include -I/root/pjproject-2.7.1/pjlib-util/include -I/root/pjproject-2.7.1/pjnath/include -I/root/pjproject-2.7.1/pjmedia/include -I/root/pjproject-2.7.1/pjsip/include -Imake[1]: Leaving directory `/root/pjproject-2.7.1/pjsip-apps/src/python' -I/usr/include/python2.7 -c _pjsua.c -o build/temp.linux-x86_64-2.7/_pjsua.o
In file included from _pjsua.c:20:0:
_pjsua.h:25:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
                    ^
compilation terminated.
error: command 'gcc' failed with exit status 1
make: *** [all] Error 1



On Tue, Dec 19, 2017 at 11:00 AM, Ernesto Celis <celisdelafuente@xxxxxxxxx> wrote:
On Tue, Dec 19, 2017 at 12:53 PM, allen chan
<allen.michael.chan@xxxxxxxxx> wrote:
> I went through the mailing list archives for the entire 2017. No one seems
> to have issues compiling so i must be doing something stupid.
> I am trying to write a python app to do sip testing.
>
> In file included from _pjsua.c:20:0:
>
> _pjsua.h:25:20: fatal error: Python.h: No such file or directory
>
>  #include <Python.h>
>
>                     ^

The issues is obvious, your python headers are missing. You'll need to
install either python-devel or python34-devel depending on the python
version you wish to use.

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



--
Allen Michael Chan

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




--
Allen Michael Chan

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




--
Allen Michael Chan
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux