hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.67k stars 1.17k forks source link

Failed to build python binding #1281

Closed Yadro closed 3 years ago

Yadro commented 3 years ago

I've installed dependencies sudo apt-get update && sudo apt-get install python3-dev python3-pillow -y and tried to execute make build-python PYTHON=$(which python3), but it was failed with the following error:

led-matrix-c.cc:26:84: error: expected ‘,’ before ‘)’ token
 static_assert(sizeof(rgb_matrix::RGBMatrix::Options) == sizeof(RGBLedMatrixOptions));
                                                                                    ^
led-matrix-c.cc:26:84: error: expected string-literal before ‘)’ token
led-matrix-c.cc:27:81: error: expected ‘,’ before ‘)’ token
 static_assert(sizeof(rgb_matrix::RuntimeOptions) == sizeof(RGBLedRuntimeOptions));
                                                                                 ^
led-matrix-c.cc:27:81: error: expected string-literal before ‘)’ token

If I add a string as the second parameter, everything is fine:

- static_assert(sizeof(rgb_matrix::RGBMatrix::Options) == sizeof(RGBLedMatrixOptions));
+ static_assert(sizeof(rgb_matrix::RGBMatrix::Options) == sizeof(RGBLedMatrixOptions), "");
hzeller commented 3 years ago

Thanks, fixed. older versions of C++ require the extra string.