luma.led_matrix: Package fails to install via pip

Type of Raspberry Pi

Pi 3B+

Linux Kernel version

Linux raspberrypi 5.10.63-v7+ #1488 SMP Thu Nov 18 16:14:44 GMT 2021 armv7l GNU/Linux

Expected behaviour

Just trying to install the package

Actual behaviour

Basically, ws2812 is failing to install with a whole bunch of warnings and errors

Brace yourself, this is a looong output

pi@raspberrypi:~ $ sudo python3 -m pip install --upgrade luma.led_matrix
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting luma.led_matrix
  Downloading https://www.piwheels.org/simple/luma-led-matrix/luma.led_matrix-1.5.0-py2.py3-none-any.whl (19 kB)
Collecting luma.core>=1.14.0
  Downloading https://www.piwheels.org/simple/luma-core/luma.core-2.3.1-py2.py3-none-any.whl (71 kB)
     |████████████████████████████████| 71 kB 936 kB/s
Collecting ws2812
  Downloading ws2812-1.0.0.tar.gz (58 kB)
     |████████████████████████████████| 58 kB 913 kB/s
  Preparing metadata (setup.py) ... done
Collecting rpi-ws281x
  Downloading https://www.piwheels.org/simple/rpi-ws281x/rpi_ws281x-4.3.1-cp39-cp39-linux_armv7l.whl (117 kB)
     |████████████████████████████████| 117 kB 1.3 MB/s
Requirement already satisfied: smbus2 in /usr/local/lib/python3.9/dist-packages (from luma.core>=1.14.0->luma.led_matrix) (0.4.1)
Requirement already satisfied: RPI.GPIO in /usr/lib/python3/dist-packages (from luma.core>=1.14.0->luma.led_matrix) (0.7.0)
Requirement already satisfied: deprecated in /usr/local/lib/python3.9/dist-packages (from luma.core>=1.14.0->luma.led_matrix) (1.2.13)
Requirement already satisfied: spidev in /usr/lib/python3/dist-packages (from luma.core>=1.14.0->luma.led_matrix) (3.5)
Requirement already satisfied: pyftdi in /usr/local/lib/python3.9/dist-packages (from luma.core>=1.14.0->luma.led_matrix) (0.53.3)
Requirement already satisfied: cbor2 in /usr/local/lib/python3.9/dist-packages (from luma.core>=1.14.0->luma.led_matrix) (5.4.2)
Requirement already satisfied: pillow>=4.0.0 in /usr/lib/python3/dist-packages (from luma.core>=1.14.0->luma.led_matrix) (8.1.2)
Requirement already satisfied: wrapt<2,>=1.10 in /usr/lib/python3/dist-packages (from deprecated->luma.core>=1.14.0->luma.led_matrix) (1.12.1)
Requirement already satisfied: pyserial>=3.0 in /usr/lib/python3/dist-packages (from pyftdi->luma.core>=1.14.0->luma.led_matrix) (3.5b0)
Requirement already satisfied: pyusb!=1.2.0,>=1.0.0 in /usr/local/lib/python3.9/dist-packages (from pyftdi->luma.core>=1.14.0->luma.led_matrix) (1.2.1)
Building wheels for collected packages: ws2812
  Building wheel for ws2812 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ok60wk8h
       cwd: /tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/
  Complete output (151 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.9
  copying ws2812.py -> build/lib.linux-armv7l-3.9
  running build_ext
  creating build/temp.linux-armv7l-3.9
  creating build/temp.linux-armv7l-3.9/lib
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Ilib/ -I/usr/include/python3.9 -c lib/ws2812-RPi.c -o build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o
  In file included from lib/ws2812-RPi.c:1:
  lib/ws2812-RPi.h:95:1: warning: multi-line comment [-Wcomment]
     95 | // |   |   |  \  \___|  |_|  |  / /_/ \  ___/ \___ \
        | ^
  In file included from lib/ws2812-RPi.c:1:
  lib/ws2812-RPi.h:123:1: warning: multi-line comment [-Wcomment]
    123 | //  |    `   \  ___/|  |  |  |   |  \  ___/ \___ \  /  <_\ \/   \     /  / __ \|  | \/\___ \
        | ^
  lib/ws2812-RPi.h:389:1: warning: multi-line comment [-Wcomment]
    389 | // |    |    \_   _____/\______ \    /   _____//  |_ __ ___/ ____\/ ____\
        | ^
  lib/ws2812-RPi.h:436:1: warning: multi-line comment [-Wcomment]
    436 | //  |    |  \_/ __ \| __ \|  |  \/ ___\
        | ^
  lib/ws2812-RPi.h:456:1: warning: multi-line comment [-Wcomment]
    456 | // |   |/    \|  \   __\ /    ~    \__  \\_  __ \/ __ |\ \/ \/ /\__  \\_  __ \_/ __ \
        | ^
  lib/ws2812-RPi.h:470:1: warning: multi-line comment [-Wcomment]
    470 | //  |    |  / |  |_> > /_/ | / __ \|  | \  ___/  |    |___  |        \ |    `   \\___ \
        | ^
  lib/ws2812-RPi.h:481:1: warning: multi-line comment [-Wcomment]
    481 | //  |        \|  |   |  | \  ___/\  \___|  |  \___ \
        | ^
  lib/ws2812-RPi.c: In function ‘reverseWord’:
  lib/ws2812-RPi.c:49:16: warning: variable ‘bit’ set but not used [-Wunused-but-set-variable]
     49 |  unsigned char bit;
        |                ^~~
  lib/ws2812-RPi.c: In function ‘mem_phys_to_virt’:
  lib/ws2812-RPi.c:119:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
    119 |  for (i = 0; i < NUM_PAGES; i++) {
        |                ^
  lib/ws2812-RPi.c: At top level:
  lib/ws2812-RPi.c:147:1: warning: multi-line comment [-Wcomment]
    147 | // |    |    \_   _____/\______ \    /   _____//  |_ __ ___/ ____\/ ____\
        | ^
  lib/ws2812-RPi.c:292:1: warning: multi-line comment [-Wcomment]
    292 | //  |    |  \_/ __ \| __ \|  |  \/ ___\
        | ^
  lib/ws2812-RPi.c:471:1: warning: multi-line comment [-Wcomment]
    471 | // |   |/    \|  \   __\ /    ~    \__  \\_  __ \/ __ |\ \/ \/ /\__  \\_  __ \_/ __ \
        | ^
  lib/ws2812-RPi.c: In function ‘initHardware’:
  lib/ws2812-RPi.c:552:56: warning: comparison of integer expressions of different signedness: ‘__off_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
    552 |  if (lseek(fd, (unsigned long)virtbase >> 9, SEEK_SET) != (unsigned long)virtbase >> 9) {
        |                                                        ^~
  lib/ws2812-RPi.c:557:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
    557 |  for (i = 0; i < NUM_PAGES; i++) {
        |                ^
  lib/ws2812-RPi.c:569:18: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
    569 |   if ((pfn >> 55)&0xfbf != 0x10c) {  // pagemap bits: https://www.kernel.org/doc/Documentation/vm/pagemap.txt
        |                  ^
  lib/ws2812-RPi.c: At top level:
  lib/ws2812-RPi.c:745:1: warning: multi-line comment [-Wcomment]
    745 | //  |    |  / |  |_> > /_/ | / __ \|  | \  ___/  |    |___  |        \ |    `   \\___ \
        | ^
  lib/ws2812-RPi.c: In function ‘show’:
  lib/ws2812-RPi.c:764:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
    764 |  for(i=0; i<numLEDs; i++) {
        |            ^
  lib/ws2812-RPi.c:801:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
    801 |  for(i = 0; i < (cbp->length / 4); i++) {
        |               ^
  lib/ws2812-RPi.c:829:1: warning: "/*" within comment [-Wcomment]
    829 | /**/
        |
  lib/ws2812-RPi.c:762:10: warning: unused variable ‘color’ [-Wunused-variable]
    762 |  Color_t color;
        |          ^~~~~
  lib/ws2812-RPi.c:758:15: warning: unused variable ‘PWMWaveformBitPos’ [-Wunused-variable]
    758 |  unsigned int PWMWaveformBitPos = 0;
        |               ^~~~~~~~~~~~~~~~~
  lib/ws2812-RPi.c:757:15: warning: unused variable ‘LEDBuffeWordPos’ [-Wunused-variable]
    757 |  unsigned int LEDBuffeWordPos = 0;
        |               ^~~~~~~~~~~~~~~
  lib/ws2812-RPi.c: At top level:
  lib/ws2812-RPi.c:839:1: warning: multi-line comment [-Wcomment]
    839 | //  |        \|  |   |  | \  ___/\  \___|  |  \___ \
        | ^
  lib/ws2812-RPi.c: In function ‘theaterChaseRainbow’:
  lib/ws2812-RPi.c:921:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
    921 |    for (i=0; i < numPixels(); i=i+3) {
        |                ^
  lib/ws2812-RPi.c:928:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
    928 |    for (i=0; i < numPixels(); i=i+3) {
        |                ^
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Ilib/ -I/usr/include/python3.9 -c ws2812-RPi_wrap.c -o build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o
  In file included from ws2812-RPi_wrap.c:2967:
  lib/ws2812-RPi.h:95:1: warning: multi-line comment [-Wcomment]
     95 | // |   |   |  \  \___|  |_|  |  / /_/ \  ___/ \___ \
        | ^
  In file included from ws2812-RPi_wrap.c:2967:
  lib/ws2812-RPi.h:123:1: warning: multi-line comment [-Wcomment]
    123 | //  |    `   \  ___/|  |  |  |   |  \  ___/ \___ \  /  <_\ \/   \     /  / __ \|  | \/\___ \
        | ^
  lib/ws2812-RPi.h:389:1: warning: multi-line comment [-Wcomment]
    389 | // |    |    \_   _____/\______ \    /   _____//  |_ __ ___/ ____\/ ____\
        | ^
  lib/ws2812-RPi.h:436:1: warning: multi-line comment [-Wcomment]
    436 | //  |    |  \_/ __ \| __ \|  |  \/ ___\
        | ^
  lib/ws2812-RPi.h:456:1: warning: multi-line comment [-Wcomment]
    456 | // |   |/    \|  \   __\ /    ~    \__  \\_  __ \/ __ |\ \/ \/ /\__  \\_  __ \_/ __ \
        | ^
  lib/ws2812-RPi.h:470:1: warning: multi-line comment [-Wcomment]
    470 | //  |    |  / |  |_> > /_/ | / __ \|  | \  ___/  |    |___  |        \ |    `   \\___ \
        | ^
  lib/ws2812-RPi.h:481:1: warning: multi-line comment [-Wcomment]
    481 | //  |        \|  |   |  | \  ___/\  \___|  |  \___ \
        | ^
  ws2812-RPi_wrap.c: In function ‘PyInit__ws2812’:
  ws2812-RPi_wrap.c:4722:21: warning: variable ‘md’ set but not used [-Wunused-but-set-variable]
   4722 |   PyObject *m, *d, *md;
        |                     ^~
  In file included from ws2812-RPi_wrap.c:2967:
  At top level:
  lib/ws2812-RPi.h:359:31: warning: ‘ctl’ defined but not used [-Wunused-variable]
    359 | static struct control_data_s *ctl;
        |                               ^~~
  lib/ws2812-RPi.h:341:31: warning: ‘gpio_reg’ defined but not used [-Wunused-variable]
    341 | static volatile unsigned int *gpio_reg;  // GPIO pin controller register set
        |                               ^~~~~~~~
  lib/ws2812-RPi.h:340:31: warning: ‘dma_reg’ defined but not used [-Wunused-variable]
    340 | static volatile unsigned int *dma_reg;  // DMA controller register set
        |                               ^~~~~~~
  lib/ws2812-RPi.h:339:31: warning: ‘clk_reg’ defined but not used [-Wunused-variable]
    339 | static volatile unsigned int *clk_reg;  // PWM clock manager register set
        |                               ^~~~~~~
  lib/ws2812-RPi.h:338:31: warning: ‘pwm_reg’ defined but not used [-Wunused-variable]
    338 | static volatile unsigned int *pwm_reg;  // PWM controller register set
        |                               ^~~~~~~
  lib/ws2812-RPi.h:336:17: warning: ‘virtbase’ defined but not used [-Wunused-variable]
    336 | static uint8_t *virtbase;     // Pointer to some virtual memory that will be allocated
        |                 ^~~~~~~~
  arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o -Llib/ -L/usr/lib -o build/lib.linux-armv7l-3.9/_ws2812.cpython-39-arm-linux-gnueabihf.so
  /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:415: multiple definition of `PWMWaveform'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:415: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:410: multiple definition of `LEDBuffer'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:410: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:407: multiple definition of `numLEDs'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:407: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:398: multiple definition of `brightness'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:398: first defined here
  /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:335: multiple definition of `page_map'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:335: first defined here
  collect2: error: ld returned 1 exit status
  error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for ws2812
  Running setup.py clean for ws2812
Failed to build ws2812
Installing collected packages: ws2812, rpi-ws281x, luma.core, luma.led-matrix
    Running setup.py install for ws2812 ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-h416vp5n/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/ws2812
         cwd: /tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/
    Complete output (153 lines):
    running install
    /usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.9
    copying ws2812.py -> build/lib.linux-armv7l-3.9
    running build_ext
    creating build/temp.linux-armv7l-3.9
    creating build/temp.linux-armv7l-3.9/lib
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Ilib/ -I/usr/include/python3.9 -c lib/ws2812-RPi.c -o build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o
    In file included from lib/ws2812-RPi.c:1:
    lib/ws2812-RPi.h:95:1: warning: multi-line comment [-Wcomment]
       95 | // |   |   |  \  \___|  |_|  |  / /_/ \  ___/ \___ \
          | ^
    In file included from lib/ws2812-RPi.c:1:
    lib/ws2812-RPi.h:123:1: warning: multi-line comment [-Wcomment]
      123 | //  |    `   \  ___/|  |  |  |   |  \  ___/ \___ \  /  <_\ \/   \     /  / __ \|  | \/\___ \
          | ^
    lib/ws2812-RPi.h:389:1: warning: multi-line comment [-Wcomment]
      389 | // |    |    \_   _____/\______ \    /   _____//  |_ __ ___/ ____\/ ____\
          | ^
    lib/ws2812-RPi.h:436:1: warning: multi-line comment [-Wcomment]
      436 | //  |    |  \_/ __ \| __ \|  |  \/ ___\
          | ^
    lib/ws2812-RPi.h:456:1: warning: multi-line comment [-Wcomment]
      456 | // |   |/    \|  \   __\ /    ~    \__  \\_  __ \/ __ |\ \/ \/ /\__  \\_  __ \_/ __ \
          | ^
    lib/ws2812-RPi.h:470:1: warning: multi-line comment [-Wcomment]
      470 | //  |    |  / |  |_> > /_/ | / __ \|  | \  ___/  |    |___  |        \ |    `   \\___ \
          | ^
    lib/ws2812-RPi.h:481:1: warning: multi-line comment [-Wcomment]
      481 | //  |        \|  |   |  | \  ___/\  \___|  |  \___ \
          | ^
    lib/ws2812-RPi.c: In function ‘reverseWord’:
    lib/ws2812-RPi.c:49:16: warning: variable ‘bit’ set but not used [-Wunused-but-set-variable]
       49 |  unsigned char bit;
          |                ^~~
    lib/ws2812-RPi.c: In function ‘mem_phys_to_virt’:
    lib/ws2812-RPi.c:119:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      119 |  for (i = 0; i < NUM_PAGES; i++) {
          |                ^
    lib/ws2812-RPi.c: At top level:
    lib/ws2812-RPi.c:147:1: warning: multi-line comment [-Wcomment]
      147 | // |    |    \_   _____/\______ \    /   _____//  |_ __ ___/ ____\/ ____\
          | ^
    lib/ws2812-RPi.c:292:1: warning: multi-line comment [-Wcomment]
      292 | //  |    |  \_/ __ \| __ \|  |  \/ ___\
          | ^
    lib/ws2812-RPi.c:471:1: warning: multi-line comment [-Wcomment]
      471 | // |   |/    \|  \   __\ /    ~    \__  \\_  __ \/ __ |\ \/ \/ /\__  \\_  __ \_/ __ \
          | ^
    lib/ws2812-RPi.c: In function ‘initHardware’:
    lib/ws2812-RPi.c:552:56: warning: comparison of integer expressions of different signedness: ‘__off_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
      552 |  if (lseek(fd, (unsigned long)virtbase >> 9, SEEK_SET) != (unsigned long)virtbase >> 9) {
          |                                                        ^~
    lib/ws2812-RPi.c:557:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      557 |  for (i = 0; i < NUM_PAGES; i++) {
          |                ^
    lib/ws2812-RPi.c:569:18: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
      569 |   if ((pfn >> 55)&0xfbf != 0x10c) {  // pagemap bits: https://www.kernel.org/doc/Documentation/vm/pagemap.txt
          |                  ^
    lib/ws2812-RPi.c: At top level:
    lib/ws2812-RPi.c:745:1: warning: multi-line comment [-Wcomment]
      745 | //  |    |  / |  |_> > /_/ | / __ \|  | \  ___/  |    |___  |        \ |    `   \\___ \
          | ^
    lib/ws2812-RPi.c: In function ‘show’:
    lib/ws2812-RPi.c:764:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      764 |  for(i=0; i<numLEDs; i++) {
          |            ^
    lib/ws2812-RPi.c:801:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      801 |  for(i = 0; i < (cbp->length / 4); i++) {
          |               ^
    lib/ws2812-RPi.c:829:1: warning: "/*" within comment [-Wcomment]
      829 | /**/
          |
    lib/ws2812-RPi.c:762:10: warning: unused variable ‘color’ [-Wunused-variable]
      762 |  Color_t color;
          |          ^~~~~
    lib/ws2812-RPi.c:758:15: warning: unused variable ‘PWMWaveformBitPos’ [-Wunused-variable]
      758 |  unsigned int PWMWaveformBitPos = 0;
          |               ^~~~~~~~~~~~~~~~~
    lib/ws2812-RPi.c:757:15: warning: unused variable ‘LEDBuffeWordPos’ [-Wunused-variable]
      757 |  unsigned int LEDBuffeWordPos = 0;
          |               ^~~~~~~~~~~~~~~
    lib/ws2812-RPi.c: At top level:
    lib/ws2812-RPi.c:839:1: warning: multi-line comment [-Wcomment]
      839 | //  |        \|  |   |  | \  ___/\  \___|  |  \___ \
          | ^
    lib/ws2812-RPi.c: In function ‘theaterChaseRainbow’:
    lib/ws2812-RPi.c:921:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      921 |    for (i=0; i < numPixels(); i=i+3) {
          |                ^
    lib/ws2812-RPi.c:928:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      928 |    for (i=0; i < numPixels(); i=i+3) {
          |                ^
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Ilib/ -I/usr/include/python3.9 -c ws2812-RPi_wrap.c -o build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o
    In file included from ws2812-RPi_wrap.c:2967:
    lib/ws2812-RPi.h:95:1: warning: multi-line comment [-Wcomment]
       95 | // |   |   |  \  \___|  |_|  |  / /_/ \  ___/ \___ \
          | ^
    In file included from ws2812-RPi_wrap.c:2967:
    lib/ws2812-RPi.h:123:1: warning: multi-line comment [-Wcomment]
      123 | //  |    `   \  ___/|  |  |  |   |  \  ___/ \___ \  /  <_\ \/   \     /  / __ \|  | \/\___ \
          | ^
    lib/ws2812-RPi.h:389:1: warning: multi-line comment [-Wcomment]
      389 | // |    |    \_   _____/\______ \    /   _____//  |_ __ ___/ ____\/ ____\
          | ^
    lib/ws2812-RPi.h:436:1: warning: multi-line comment [-Wcomment]
      436 | //  |    |  \_/ __ \| __ \|  |  \/ ___\
          | ^
    lib/ws2812-RPi.h:456:1: warning: multi-line comment [-Wcomment]
      456 | // |   |/    \|  \   __\ /    ~    \__  \\_  __ \/ __ |\ \/ \/ /\__  \\_  __ \_/ __ \
          | ^
    lib/ws2812-RPi.h:470:1: warning: multi-line comment [-Wcomment]
      470 | //  |    |  / |  |_> > /_/ | / __ \|  | \  ___/  |    |___  |        \ |    `   \\___ \
          | ^
    lib/ws2812-RPi.h:481:1: warning: multi-line comment [-Wcomment]
      481 | //  |        \|  |   |  | \  ___/\  \___|  |  \___ \
          | ^
    ws2812-RPi_wrap.c: In function ‘PyInit__ws2812’:
    ws2812-RPi_wrap.c:4722:21: warning: variable ‘md’ set but not used [-Wunused-but-set-variable]
     4722 |   PyObject *m, *d, *md;
          |                     ^~
    In file included from ws2812-RPi_wrap.c:2967:
    At top level:
    lib/ws2812-RPi.h:359:31: warning: ‘ctl’ defined but not used [-Wunused-variable]
      359 | static struct control_data_s *ctl;
          |                               ^~~
    lib/ws2812-RPi.h:341:31: warning: ‘gpio_reg’ defined but not used [-Wunused-variable]
      341 | static volatile unsigned int *gpio_reg;  // GPIO pin controller register set
          |                               ^~~~~~~~
    lib/ws2812-RPi.h:340:31: warning: ‘dma_reg’ defined but not used [-Wunused-variable]
      340 | static volatile unsigned int *dma_reg;  // DMA controller register set
          |                               ^~~~~~~
    lib/ws2812-RPi.h:339:31: warning: ‘clk_reg’ defined but not used [-Wunused-variable]
      339 | static volatile unsigned int *clk_reg;  // PWM clock manager register set
          |                               ^~~~~~~
    lib/ws2812-RPi.h:338:31: warning: ‘pwm_reg’ defined but not used [-Wunused-variable]
      338 | static volatile unsigned int *pwm_reg;  // PWM controller register set
          |                               ^~~~~~~
    lib/ws2812-RPi.h:336:17: warning: ‘virtbase’ defined but not used [-Wunused-variable]
      336 | static uint8_t *virtbase;     // Pointer to some virtual memory that will be allocated
          |                 ^~~~~~~~
    arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o -Llib/ -L/usr/lib -o build/lib.linux-armv7l-3.9/_ws2812.cpython-39-arm-linux-gnueabihf.so
    /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:415: multiple definition of `PWMWaveform'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:415: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:410: multiple definition of `LEDBuffer'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:410: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:407: multiple definition of `numLEDs'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:407: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:398: multiple definition of `brightness'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:398: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/ws2812-RPi_wrap.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:335: multiple definition of `page_map'; build/temp.linux-armv7l-3.9/lib/ws2812-RPi.o:/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/lib/ws2812-RPi.h:335: first defined here
    collect2: error: ld returned 1 exit status
    error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r3ys8oa0/ws2812_25925b960daf458295abdce83ced09f9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-h416vp5n/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/ws2812 Check the logs for full command output.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26 (1 by maintainers)

Most upvoted comments

yeah i did all that, but I first tried matrix_demo.py but that isn’t for my ws2812 “unicorn” 8x8 array. When I ran neopixel_demo.py it worked great, because i already had GPIO18 hooked up to my matrix 😃 IMG_20220109_145400

I’ve been having fun on this all day, I made a smiley face with draw.point function.

Thank you to the devs! My dad pays me in crypto when I do my chores, I’ll give you lunch money for helping me, just send me an address.

v1.6.1 has been released which no longer relies on ws2812

duplicate of #260