I've been attempting to install the Python binding for INDI on my Raspberry Pi 3, following the instructions here: indilib.org/develop/tutorials/151-time-l...ith-indi-python.html . When I get to using the make command, I keep getting the same error (below):

pi@raspberrypi:~/libindipython$ make
[ 25%] Swig source
Language subdirectory: python
Search paths:
   ./
   /usr/include/python2.7/
   /usr/include/libindi/
   /usr/include/
   /home/pi/swig-indi-python/
   ./swig_lib/python/
   /usr/share/swig2.0/python/
   ./swig_lib/
   /usr/share/swig2.0/
Preprocessing...
Starting language-specific parse...
/usr/include/libindi/baseclient.h:32: Warning 322: Redundant redeclaration of 'MAXRBUF',
/usr/include/libindi/indibase.h:10: Warning 322: previous declaration of 'MAXRBUF'.
/usr/include/libindi/basedevice.h:33: Warning 322: Redundant redeclaration of 'MAXRBUF',
/usr/include/libindi/indibase.h:10: Warning 322: previous declaration of 'MAXRBUF'.
Processing types...
C++ analysis...
/usr/include/libindi/baseclient.h:55: Warning 403: Class 'INDI::BaseClient' might be abstract, no constructors generated,
/usr/include/libindi/indibase.h:79: Warning 403: Method INDI::BaseMediator::newDevice(INDI::BaseDevice *) might not be implemented.
Generating wrappers...
Scanning dependencies of target _PyIndi
[ 25%] Swig source
Language subdirectory: python
Search paths:
   ./
   /usr/include/python2.7/
   /usr/include/libindi/
   /usr/include/
   /home/pi/swig-indi-python/
   ./swig_lib/python/
   /usr/share/swig2.0/python/
   ./swig_lib/
   /usr/share/swig2.0/
Preprocessing...
Starting language-specific parse...
/usr/include/libindi/baseclient.h:32: Warning 322: Redundant redeclaration of 'MAXRBUF',
/usr/include/libindi/indibase.h:10: Warning 322: previous declaration of 'MAXRBUF'.
/usr/include/libindi/basedevice.h:33: Warning 322: Redundant redeclaration of 'MAXRBUF',
/usr/include/libindi/indibase.h:10: Warning 322: previous declaration of 'MAXRBUF'.
Processing types...
C++ analysis...
/usr/include/libindi/baseclient.h:55: Warning 403: Class 'INDI::BaseClient' might be abstract, no constructors generated,
/usr/include/libindi/indibase.h:79: Warning 403: Method INDI::BaseMediator::newDevice(INDI::BaseDevice *) might not be implemented.
Generating wrappers...
[ 50%] Building CXX object CMakeFiles/_PyIndi.dir/indiclientpythonPYTHON_wrap.cxx.o
Linking CXX shared module _PyIndi.so
[ 50%] Built target _PyIndi
[ 75%] Swig source
Language subdirectory: python
Search paths:
   ./
   /usr/include/python2.7/
   /usr/include/libindi/
   /usr/include/
   /home/pi/swig-indi-python/
   ./swig_lib/python/
   /usr/share/swig2.0/python/
   ./swig_lib/
   /usr/share/swig2.0/
Preprocessing...
/home/pi/swig-indi-python/indiserverpython.i:52: Error: Unable to find 'libindiserver.h'
CMakeFiles/_PyIndiServer.dir/build.make:53: recipe for target 'indiserverpythonPYTHON_wrap.c' failed
make[2]: *** [indiserverpythonPYTHON_wrap.c] Error 1
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/_PyIndiServer.dir/all' failed
make[1]: *** [CMakeFiles/_PyIndiServer.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

I've managed to fix this by copying libindiserver.h and fq.h out of the libindiserver directory in swig-indi-python. This gets rid of the above error, but generates a new one:
pi@raspberrypi:~/libindipython$ make
[ 25%] Swig source
Language subdirectory: python
Search paths:
   ./
   /usr/include/python2.7/
   /usr/include/libindi/
   /usr/include/
   /home/pi/swig-indi-python/
   ./swig_lib/python/
   /usr/share/swig2.0/python/
   ./swig_lib/
   /usr/share/swig2.0/
Preprocessing...
Starting language-specific parse...
/usr/include/libindi/baseclient.h:32: Warning 322: Redundant redeclaration of 'MAXRBUF',
/usr/include/libindi/indibase.h:10: Warning 322: previous declaration of 'MAXRBUF'.
/usr/include/libindi/basedevice.h:33: Warning 322: Redundant redeclaration of 'MAXRBUF',
/usr/include/libindi/indibase.h:10: Warning 322: previous declaration of 'MAXRBUF'.
Processing types...
C++ analysis...
/usr/include/libindi/baseclient.h:55: Warning 403: Class 'INDI::BaseClient' might be abstract, no constructors generated,
/usr/include/libindi/indibase.h:79: Warning 403: Method INDI::BaseMediator::newDevice(INDI::BaseDevice *) might not be implemented.
Generating wrappers...
[ 50%] Building CXX object CMakeFiles/_PyIndi.dir/indiclientpythonPYTHON_wrap.cxx.o
Linking CXX shared module _PyIndi.so
[ 50%] Built target _PyIndi
[ 75%] Swig source
Language subdirectory: python
Search paths:
   ./
   /usr/include/python2.7/
   /usr/include/libindi/
   /usr/include/
   /home/pi/swig-indi-python/
   ./swig_lib/python/
   /usr/share/swig2.0/python/
   ./swig_lib/
   /usr/share/swig2.0/
Preprocessing...
Starting language-specific parse...
Processing types...
C++ analysis...
Generating wrappers...
/home/pi/swig-indi-python/libindiserver.h:47: Warning 451: Setting a const char * variable may leak memory.
/home/pi/swig-indi-python/libindiserver.h:64: Warning 454: Setting a pointer/reference variable may leak memory.
Scanning dependencies of target _PyIndiServer
[ 75%] Swig source
Language subdirectory: python
Search paths:
   ./
   /usr/include/python2.7/
   /usr/include/libindi/
   /usr/include/
   /home/pi/swig-indi-python/
   ./swig_lib/python/
   /usr/share/swig2.0/python/
   ./swig_lib/
   /usr/share/swig2.0/
Preprocessing...
Starting language-specific parse...
Processing types...
C++ analysis...
Generating wrappers...
/home/pi/swig-indi-python/libindiserver.h:47: Warning 451: Setting a const char * variable may leak memory.
/home/pi/swig-indi-python/libindiserver.h:64: Warning 454: Setting a pointer/reference variable may leak memory.
[100%] Building C object CMakeFiles/_PyIndiServer.dir/indiserverpythonPYTHON_wrap.c.o
/home/pi/libindipython/indiserverpythonPYTHON_wrap.c: In function ‘Swig_var_clinfo_get’:
/home/pi/libindipython/indiserverpythonPYTHON_wrap.c:4933:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
     for(size_t i = 0; i < nclinfo; ++i)
     ^
/home/pi/libindipython/indiserverpythonPYTHON_wrap.c:4933:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
/home/pi/libindipython/indiserverpythonPYTHON_wrap.c: In function ‘Swig_var_dvrinfo_set’:
/home/pi/libindipython/indiserverpythonPYTHON_wrap.c:6136:7: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
       for (int i = 0; i < size; ++i) {
       ^
/home/pi/libindipython/indiserverpythonPYTHON_wrap.c: In function ‘Swig_var_dvrinfo_get’:
/home/pi/libindipython/indiserverpythonPYTHON_wrap.c:6161:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
     for(size_t i = 0; i < ndvrinfo; ++i)
     ^
CMakeFiles/_PyIndiServer.dir/build.make:62: recipe for target 'CMakeFiles/_PyIndiServer.dir/indiserverpythonPYTHON_wrap.c.o' failed
make[2]: *** [CMakeFiles/_PyIndiServer.dir/indiserverpythonPYTHON_wrap.c.o] Error 1
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/_PyIndiServer.dir/all' failed
make[1]: *** [CMakeFiles/_PyIndiServer.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

I'm at a loss here. Any help would be greatly appreciated :cheer:

Read More...