Hi All,

Basically I am following the tutorial from the below link.
https://github.com/EdjeElectronics/TensorFlow-Object-Detection-on-the-Raspberry-Pi

I have reached till the point where I have to run the below command.
"python3 setup.py build --cpp_implementation" 

I am using Raspberry pi 4 B model. Python version is 3.7
after running the command i have received the below error.

"
pi@raspberrypi:~/protobuf-3.5.1/python $ python3 setup.py build 
--cpp_implementation
running build
running build_py
running build_ext
building 'google.protobuf.pyext._message' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -fPIC -I. -I../src -I/usr/include/python3.7m -c 
google/protobuf/pyext/descriptor_database.cc -o 
build/temp.linux-armv7l-3.7/google/protobuf/pyext/descriptor_database.o 
-Wno-write-strings -Wno-invalid-offsetof -Wno-sign-compare
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -fPIC -I. -I../src -I/usr/include/python3.7m -c 
google/protobuf/pyext/repeated_composite_container.cc -o 
build/temp.linux-armv7l-3.7/google/protobuf/pyext/repeated_composite_container.o
 
-Wno-write-strings -Wno-invalid-offsetof -Wno-sign-compare
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -fPIC -I. -I../src -I/usr/include/python3.7m -c 
google/protobuf/pyext/descriptor_containers.cc -o 
build/temp.linux-armv7l-3.7/google/protobuf/pyext/descriptor_containers.o 
-Wno-write-strings -Wno-invalid-offsetof -Wno-sign-compare
google/protobuf/pyext/descriptor_containers.cc: In function ‘bool 
google::protobuf::python::descriptor::_GetItemByKey(google::protobuf::python::PyContainer*,
 
PyObject*, const void**)’:
google/protobuf/pyext/descriptor_containers.cc:69:45: error: invalid 
conversion from ‘const char*’ to ‘char*’ [-fpermissive]
        ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 
0): \
                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
google/protobuf/pyext/descriptor_containers.cc:172:13: note: in expansion 
of macro ‘PyString_AsStringAndSize’
         if (PyString_AsStringAndSize(key, &name, &name_size) < 0) {
             ^~~~~~~~~~~~~~~~~~~~~~~~
google/protobuf/pyext/descriptor_containers.cc:69:45: error: invalid 
conversion from ‘const char*’ to ‘char*’ [-fpermissive]
        ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 
0): \
                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
google/protobuf/pyext/descriptor_containers.cc:189:13: note: in expansion 
of macro ‘PyString_AsStringAndSize’
         if (PyString_AsStringAndSize(key, &camelcase_name, &name_size) < 
0) {
             ^~~~~~~~~~~~~~~~~~~~~~~~
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
"


Please suggest on how to resolve it. I followed the below options but it 
did not resolve.
https://github.com/jgarff/rpi_ws281x/issues/294

sudo apt-get update
sudo apt-get install build-essential python-dev git scons swig
sudo apt-get install libzbar-dev libzbar0
sudo apt install python-dev
sudo apt-get install portaudio19-dev
sudo apt install -y python python-pip libffi-dev 
python-backports.ssl-match-hostname

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/d0475b8e-691b-43fc-924c-587d3fe06631%40googlegroups.com.

Reply via email to