python3-pjsip icon indicating copy to clipboard operation
python3-pjsip copied to clipboard

Build Instructions on Centos

Open blaine12100 opened this issue 5 years ago • 3 comments

Hi

I am trying to build the python3 pjsip for a centos based machine but if i run the command sudo python setup.py install,i get a gcc error .My gcc compiler is at the latest version and if i run this with our root,

I double checked that i have the python development headers installed(Here when i run python it opens python 3.7.0)

Can anybody help me in fixing this issue?

Screenshot from 2019-11-13 12-42-12 Screenshot from 2019-11-13 12-43-06

blaine12100 avatar Nov 13 '19 07:11 blaine12100

I am not actively working on this project, but just noticed this open issue.

The first error is caused by trying to do a system install (python setup.py install) without sudo. I'm not sure what the full context of the second error is.

As a side note -- you may want to use a virtual environment. The setup.py for this project, however, does not lend itself to such due to to the fact that it opens ../../../version.mak. It's not the best solutioon, but I was able to work around this and install into a virtual environment just now by copying version.mak into the python3-pjsip directory and applying this patch:

index 09092fa..41e6485 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,8 @@ pj_version_major=""
 pj_version_minor=""
 pj_version_rev=""
 pj_version_suffix=""
-f = open('../../../version.mak', 'r')
+#f = open('../../../version.mak', 'r')
+f = open('version.mak', 'r')
 for line in f:
     if line.find("export PJ_VERSION_MAJOR") != -1:
         tokens=line.split("=")

mgwilliams avatar Nov 24 '19 23:11 mgwilliams

Incase you did not get it working, here are the commands I used to install it successfully:

sudo apt install python3 python3-dev build-essential libasound2-dev
wget https://www.pjsip.org/release/2.9/pjproject-2.9.zip
unzip pjproject-2.9.zip
cd pjproject-2.9
chmod +x configure aconfigure
./configure CXXFLAGS=-fPIC CFLAGS=-fPIC LDFLAGS=-fPIC CPPFLAGS=-fPIC
make dep
make
sudo make install

cd pjsip-apps/src/
git clone https://github.com/mgwilliams/python3-pjsip.git
cd python3-pjsip

python3 setup.py build
python3 setup.py install

nicolaipre avatar Jan 08 '20 20:01 nicolaipre

Thanks for replying back to this.

We ended up using ubuntu instead of dealing and managing with centos

On Thu, Jan 9, 2020 at 2:19 AM Nicolai Prebensen [email protected] wrote:

Incase you did not get it working, here are the commands I used to install it successfully:

sudo apt install python3 python3-dev build-essential libasound2-dev wget https://www.pjsip.org/release/2.9/pjproject-2.9.zip unzip pjproject-2.9.zipcd pjproject-2.9 chmod +x configure aconfigure ./configure CXXFLAGS=-fPIC CFLAGS=-fPIC LDFLAGS=-fPIC CPPFLAGS=-fPIC make dep make sudo make install cd pjsip-apps/src/ git clone https://github.com/mgwilliams/python3-pjsip.gitcd python3-pjsip-buffer

python3 setup.py build python3 setup.py install

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mgwilliams/python3-pjsip/issues/4?email_source=notifications&email_token=AEMBOZSEQQZSH3NZZATGKE3Q4Y34TA5CNFSM4JMT5FNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIN5TJI#issuecomment-572250533, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMBOZWMU5QAYOZYGNMQT6TQ4Y34TANCNFSM4JMT5FNA .

blaine12100 avatar Jan 14 '20 20:01 blaine12100