Issues compiling pjsip and pysua on centos 7

AC
allen chan
Tue, Dec 19, 2017 6:53 PM

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.

$cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

$uname -a
Linux extmon001 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC
2017 x86_64 x86_64 x86_64 GNU/Linux

$sudo wget http://www.pjsip.org/release/2.7.1/pjproject-2.7.1.tar.bz2

$sudo bunzip2 pjproject-2.7.1.tar.bz2

$sudo tar -xvf pjproject-2.7.1.tar

$cd pjproject-2.7.1

$sudo yum install gcc

$sudo ./configure && make dep && make clean && make

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

$sudo ln -s /usr/bin/python3.6 /usr/bin/python3

$python3 -V

Python 3.6.3

$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

$sudo python3 ./setup.py install

File "./setup.py", line 36

if len(tokens)>1:

                ^

TabError: inconsistent use of tabs and spaces in indentation

Anyone have ran into similar issues?

--
Allen Michael Chan

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. $cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) $uname -a Linux extmon001 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $sudo wget http://www.pjsip.org/release/2.7.1/pjproject-2.7.1.tar.bz2 $sudo bunzip2 pjproject-2.7.1.tar.bz2 $sudo tar -xvf pjproject-2.7.1.tar $cd pjproject-2.7.1 $sudo yum install gcc $sudo ./configure && make dep && make clean && make $cd /root/pjproject-2.7.1/pjsip-apps/src/python $sudo ln -s /usr/bin/python3.6 /usr/bin/python3 $python3 -V Python 3.6.3 $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 $sudo python3 ./setup.py install File "./setup.py", line 36 if len(tokens)>1: ^ TabError: inconsistent use of tabs and spaces in indentation Anyone have ran into similar issues? -- Allen Michael Chan
EC
Ernesto Celis
Tue, Dec 19, 2017 7:00 PM

On Tue, Dec 19, 2017 at 12:53 PM, allen chan
allen.michael.chan@gmail.com 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.

On Tue, Dec 19, 2017 at 12:53 PM, allen chan <allen.michael.chan@gmail.com> 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.
AC
allen chan
Tue, Dec 19, 2017 7:13 PM

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@gmail.com
wrote:

On Tue, Dec 19, 2017 at 12:53 PM, allen chan
allen.michael.chan@gmail.com 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@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Allen Michael Chan

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@gmail.com> wrote: > On Tue, Dec 19, 2017 at 12:53 PM, allen chan > <allen.michael.chan@gmail.com> 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@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -- Allen Michael Chan
LB
Luke Biddle
Wed, Dec 20, 2017 12:19 AM

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@gmail.com
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@gmail.com

wrote:

On Tue, Dec 19, 2017 at 12:53 PM, allen chan
allen.michael.chan@gmail.com 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@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

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@gmail.com> 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@gmail.com > > wrote: > >> On Tue, Dec 19, 2017 at 12:53 PM, allen chan >> <allen.michael.chan@gmail.com> 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@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> > > > > -- > Allen Michael Chan > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >
AC
allen chan
Wed, Dec 20, 2017 12:41 AM

Luke,

Sorry I do not understand. I thought build defaults to python 3 now.
https://trac.pjsip.org/repos/ticket/2034

On Tue, Dec 19, 2017 at 4:19 PM, Luke Biddle lukeandrewbiddle@gmail.com
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@gmail.com
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@gmail.com> wrote:

On Tue, Dec 19, 2017 at 12:53 PM, allen chan
allen.michael.chan@gmail.com 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@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Allen Michael Chan

Luke, Sorry I do not understand. I thought build defaults to python 3 now. https://trac.pjsip.org/repos/ticket/2034 On Tue, Dec 19, 2017 at 4:19 PM, Luke Biddle <lukeandrewbiddle@gmail.com> 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@gmail.com> > 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@gmail.com> wrote: >> >>> On Tue, Dec 19, 2017 at 12:53 PM, allen chan >>> <allen.michael.chan@gmail.com> 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@lists.pjsip.org >>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>> >> >> >> >> -- >> Allen Michael Chan >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -- Allen Michael Chan
LB
Luke Biddle
Wed, Dec 20, 2017 5:55 AM

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@gmail.com
wrote:

Luke,

Sorry I do not understand. I thought build defaults to python 3 now.
https://trac.pjsip.org/repos/ticket/2034

On Tue, Dec 19, 2017 at 4:19 PM, Luke Biddle lukeandrewbiddle@gmail.com
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@gmail.com
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@gmail.com> wrote:

On Tue, Dec 19, 2017 at 12:53 PM, allen chan
allen.michael.chan@gmail.com 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@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

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@gmail.com> wrote: > Luke, > > Sorry I do not understand. I thought build defaults to python 3 now. > https://trac.pjsip.org/repos/ticket/2034 > > > > On Tue, Dec 19, 2017 at 4:19 PM, Luke Biddle <lukeandrewbiddle@gmail.com> > 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@gmail.com> >> 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@gmail.com> wrote: >>> >>>> On Tue, Dec 19, 2017 at 12:53 PM, allen chan >>>> <allen.michael.chan@gmail.com> 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@lists.pjsip.org >>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>>> >>> >>> >>> >>> -- >>> Allen Michael Chan >>> >>> _______________________________________________ >>> Visit our blog: http://blog.pjsip.org >>> >>> pjsip mailing list >>> pjsip@lists.pjsip.org >>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>> >>> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> > > > -- > Allen Michael Chan > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >
AC
allen chan
Wed, Dec 20, 2017 6:17 AM

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@gmail.com
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/_p
jsua.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@gmail.com
wrote:

Luke,

Sorry I do not understand. I thought build defaults to python 3 now.
https://trac.pjsip.org/repos/ticket/2034

On Tue, Dec 19, 2017 at 4:19 PM, Luke Biddle lukeandrewbiddle@gmail.com
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@gmail.com
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@gmail.com> wrote:

On Tue, Dec 19, 2017 at 12:53 PM, allen chan
allen.michael.chan@gmail.com 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@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Allen Michael Chan

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@gmail.com> 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/_p > jsua.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@gmail.com> > wrote: > >> Luke, >> >> Sorry I do not understand. I thought build defaults to python 3 now. >> https://trac.pjsip.org/repos/ticket/2034 >> >> >> >> On Tue, Dec 19, 2017 at 4:19 PM, Luke Biddle <lukeandrewbiddle@gmail.com> >> 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@gmail.com> >>> 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@gmail.com> wrote: >>>> >>>>> On Tue, Dec 19, 2017 at 12:53 PM, allen chan >>>>> <allen.michael.chan@gmail.com> 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@lists.pjsip.org >>>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>>>> >>>> >>>> >>>> >>>> -- >>>> Allen Michael Chan >>>> >>>> _______________________________________________ >>>> Visit our blog: http://blog.pjsip.org >>>> >>>> pjsip mailing list >>>> pjsip@lists.pjsip.org >>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>>> >>>> >>> >>> _______________________________________________ >>> Visit our blog: http://blog.pjsip.org >>> >>> pjsip mailing list >>> pjsip@lists.pjsip.org >>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>> >>> >> >> >> -- >> Allen Michael Chan >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -- Allen Michael Chan