I'm trying to get the pyindi client running on my Mac and raspberry Pi, but I keep running into a SWIG issue, where the client is not compatible with the latests libindi (1.9.9) version.
My understanding of using C++ with python is minimal so II asked Claude to generate a summary of the issue:
Summary
The pre-generated SWIG wrapper in pyindi-client v2.2.0 is incompatible with libindi v1.9.9, causing compilation errors on modern systems (Linux Debian Bookworm, Ubuntu 24.04, and macOS with current Homebrew versions).
Environment
- libindi: v1.9.9+dfsg-3+b5 (Debian Bookworm packages) or Homebrew latest
- pyindi-client: v2.2.0
- Python: 3.13
- Compilers tested: GCC 14.2.0, Clang 17.0.0
- Platforms: Linux arm64, macOS (Apple Silicon)
Error Details
Linux (GCC)
The SWIG-generated C++ wrapper (indiclientpython_wrap.cxx) contains template syntax errors when compiled against libindi v1.9.9:
indiclientpython_wrap.cxx:38448:3: error: missing template argument list after 'INDI::WidgetView';
for deduction, template placeholder must be followed by a simple declarator-id
38448 | INDI::WidgetView *arg1 = 0 ;
| ^~~~
| <>
In file included from /usr/include/libindi/indiproperty.h:25,
from /usr/include/libindi/abstractbaseclient.h:26,
...
/usr/include/libindi/indipropertyview.h:35:28: note: 'template<class> struct INDI::WidgetView' declared here
The wrapper file has ~150+ similar template instantiation errors.
macOS (Clang)
Additional linker errors with -bundle and -dynamiclib flags:
clang++: error: invalid argument '-bundle' not allowed with '-dynamiclib'
Root Cause
The file indiclientpython_wrap.cxx is pre-generated by SWIG from the .i interface file. The generated code assumes specific libindi template signatures that changed between v1.9.3 and v1.9.9. Specifically:
INDI::WidgetView<T> template syntax in v1.9.9 is incompatible with the wrapper's generated code
- The wrapper expects older libindi public API signatures
Impact
- Cannot install
pyindi-client on any modern Linux distribution (Debian Bookworm, Ubuntu 24.04+)
- Cannot build from source on macOS with Homebrew (current libindi versions)
- Blocks development of INDI Python clients on current systems
Solutions
-
Regenerate the SWIG wrapper using current SWIG against libindi v1.9.9
- Update
.i interface file if needed for v1.9.9 API
- Regenerate
indiclientpython_wrap.cxx
- Test with Python 3.10+
-
OR release pyindi-client v2.3+ with pre-generated wrappers for libindi v1.9.9+
-
OR update build documentation to specify which exact libindi version is compatible with v2.2.0
Workarounds
Currently there are NO working workarounds for modern systems:
- Downgrading libindi to v1.9.3 is not available in current distros
- Pre-built wheels don't exist for current systems
- Alternative INDI Python bindings are not available
Steps to Reproduce
# Linux
docker run -it python:3.13 bash
apt-get update && apt-get install -y libindi-dev indi-bin build-essential swig pkg-config
pip install pyindi-client
# macOS
brew install libindi
pip install pyindi-client
Both fail with compilation errors as shown above.
Additional Context
- This is a SWIG/C++ binding maintenance issue, not a libindi issue
- The SWIG wrapper is the critical dependency for Python bindings
- Users cannot work around this at the application level
- This blocks any new INDI Python projects on modern systems
I'm trying to get the pyindi client running on my Mac and raspberry Pi, but I keep running into a SWIG issue, where the client is not compatible with the latests libindi (1.9.9) version.
My understanding of using C++ with python is minimal so II asked Claude to generate a summary of the issue:
Summary
The pre-generated SWIG wrapper in
pyindi-clientv2.2.0 is incompatible withlibindiv1.9.9, causing compilation errors on modern systems (Linux Debian Bookworm, Ubuntu 24.04, and macOS with current Homebrew versions).Environment
Error Details
Linux (GCC)
The SWIG-generated C++ wrapper (
indiclientpython_wrap.cxx) contains template syntax errors when compiled against libindi v1.9.9:The wrapper file has ~150+ similar template instantiation errors.
macOS (Clang)
Additional linker errors with
-bundleand-dynamiclibflags:Root Cause
The file
indiclientpython_wrap.cxxis pre-generated by SWIG from the.iinterface file. The generated code assumes specific libindi template signatures that changed between v1.9.3 and v1.9.9. Specifically:INDI::WidgetView<T>template syntax in v1.9.9 is incompatible with the wrapper's generated codeImpact
pyindi-clienton any modern Linux distribution (Debian Bookworm, Ubuntu 24.04+)Solutions
Regenerate the SWIG wrapper using current SWIG against libindi v1.9.9
.iinterface file if needed for v1.9.9 APIindiclientpython_wrap.cxxOR release
pyindi-clientv2.3+ with pre-generated wrappers for libindi v1.9.9+OR update build documentation to specify which exact libindi version is compatible with v2.2.0
Workarounds
Currently there are NO working workarounds for modern systems:
Steps to Reproduce
Both fail with compilation errors as shown above.
Additional Context