Hello,
I am having problems installing the mprpc package (pre-requisite for building
the UHD driver).\
I am trying to install it because it is imported in some of the python files I
am using.
Please take a look through my notes below.
In a nut shell, the build is using the header files in
**‘/usr/include/python3.10’** when I need it to use the header files in
**‘\~/.pyenv/versions/3.5.10/include/python3.5m‘**.
Q. How do you suggest I install mprpc ?\
\
Thanks in advance,
\-Phil
====================
My linux box is running Ubuntu 22.04.5 LTS\
Python 3.10.5 is the base python version.\
\
When I build with 3.10.5 (pip install mprpc), I see the following error.
*building 'mprpc.client' extension*
*creating build/temp.linux-x86_64-3.10*
*creating build/temp.linux-x86_64-3.10/mprpc*
*x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g
-fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security
-g -fwrapv -O2 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
**-I/usr/include/python3.10** -c mprpc/client.c -o
build/temp.linux-x86_64-3.10/mprpc/client.o*
*mprpc/client.c: In function ‘__Pyx_modinit_type_init_code’:*
*mprpc/client.c:6372:38: error: ‘PyTypeObject’ {aka ‘struct _typeobject’}
has no member named ‘tp_print’*
*6372 | __pyx_type_5mprpc_6client_RPCClient.tp_print = 0;*\
\
The problem seems likely to be related to the compilation include path
***-I/usr/include/python3.10***
I used pyenv to install 3.5.10 (python 3.5 seems to be the oldest version
supported by mprpc) and have used both ‘venv’ and the ‘virtualenv’ pyenv
plug-in to build using python 3.5.10.
I see the same build error and the same include path
(***-I/usr/include/python3.10***) when building with 3.5.10.\
\
I tried to add the include path for the 3.5.10 header files by setting CFLAGS
as follows before compiling.\
\
**export CFLAGS="-I\~/.pyenv/versions/3.5.10/include/python3.5m"**
\
Even though I could now see this path added to the compilation command-line, I
still see the same build error.
The command-line now looks like this.
*building 'mprpc.client' extension*
*creating build/temp.linux-x86_64-3.10*
*creating build/temp.linux-x86_64-3.10/mprpc*
*x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g
-fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security
-g -fwrapv -O2 **-I\~/.pyenv/versions/3.5.10/include/python3.5m** -Wdate-time
-D_FORTIFY_SOURCE=2 -fPIC **-I/usr/include/python3.10** -c mprpc/client.c -o
build/temp.linux-x86_64-3.10/mprpc/client.o*
*mprpc/client.c: In function ‘__Pyx_modinit_type_init_code’:*
*mprpc/client.c:6372:38: error: ‘PyTypeObject’ {aka ‘struct _typeobject’}
has no member named ‘tp_print’*
*6372 | __pyx_type_5mprpc_6client_RPCClient.tp_print = 0;*\
\
A few lines later in the build I see the following lines which seems to
indicate that the mprpc build is STILL using ‘/usr/library/python3.10’
*In file included from /usr/include/python3.10/unicodeobject.h:1046,*
*from /usr/include/python3.10/Python.h:83,*
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]