Skip to content

Fails to compile on recent RPi OS #1

@ali1234

Description

@ali1234

After installing libkms++-dev, libfmt-dev and libdrm-dev, attempting to "pip install", the compile fails with this error:

(dpms) al@voron:~ $ pip install rpi-kms
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting rpi-kms
  Using cached rpi_kms-0.1a1.tar.gz (3.4 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [126 lines of output]
      + meson setup /tmp/pip-install-fgdwshox/rpi-kms_1460e53fba7a4ab086b568bfba52c3ba /tmp/pip-install-fgdwshox/rpi-kms_1460e53fba7a4ab086b568bfba52c3ba/.mesonpy-pg0bz81f -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Drevision=b91affd --native-file=/tmp/pip-install-fgdwshox/rpi-kms_1460e53fba7a4ab086b568bfba52c3ba/.mesonpy-pg0bz81f/meson-python-native-file.ini
      The Meson build system
      Version: 1.9.1
      Source dir: /tmp/pip-install-fgdwshox/rpi-kms_1460e53fba7a4ab086b568bfba52c3ba
      Build dir: /tmp/pip-install-fgdwshox/rpi-kms_1460e53fba7a4ab086b568bfba52c3ba/.mesonpy-pg0bz81f
      Build type: native build
      Project name: pykms
      Project version: 0.0.0
      C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (Debian 12.2.0-14+deb12u1) 12.2.0")
      C++ linker for the host machine: c++ ld.bfd 2.40
      Host machine cpu family: aarch64
      Host machine cpu: aarch64
      Message: Cloning from: https://github.com/tomba/kmsxx.git, revision b91affd
      Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
      Run-time dependency kms++ found: YES 0.0.0
      Run-time dependency kms++util found: YES 0.0.0
      Run-time dependency fmt found: YES 9.1.0
      Did not find CMake 'cmake'
      Found CMake: NO
      Run-time dependency libdrm_omap found: NO (tried pkgconfig and cmake)
      Program python found: YES (/home/al/dpms/bin/python3)
      Message: Using python version 3.11.2 from /home/al/dpms/bin/python3
      Run-time dependency python found: YES 3.11
      pybind11-config found: YES (/tmp/pip-build-env-fxcccjle/overlay/bin/pybind11-config) 3.0.1
      Run-time dependency pybind11 found: YES 3.0.1
      Build targets in project: 1
      
      pykms 0.0.0
      
        User defined options
          Native files: /tmp/pip-install-fgdwshox/rpi-kms_1460e53fba7a4ab086b568bfba52c3ba/.mesonpy-pg0bz81f/meson-python-native-file.ini
          b_ndebug    : if-release
          b_vscrt     : md
          buildtype   : release
          revision    : b91affd
      
      Found ninja-1.13.0.git.kitware.jobserver-pipe-1 at /tmp/pip-build-env-fxcccjle/normal/bin/ninja
      + /tmp/pip-build-env-fxcccjle/normal/bin/ninja
      [1/4] Compiling C++ object pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykms.cpp.o
      FAILED: [code=1] pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykms.cpp.o
      c++ -Ipykms.cpython-311-aarch64-linux-gnu.so.p -I. -I.. -I/usr/include/libdrm -I/usr/include/python3.11 -I/usr/include/aarch64-linux-gnu/python3.11 -I/tmp/pip-build-env-fxcccjle/overlay/lib/python3.11/site-packages/pybind11/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O3 -DHAS_KMSXXUTIL -fPIC -fvisibility=hidden -DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT -MD -MQ pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykms.cpp.o -MF pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykms.cpp.o.d -o pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykms.cpp.o -c ../kmsxx/py/pykms/pykms.cpp
      In file included from /usr/include/kms++/framebuffer.h:6,
                       from /usr/include/kms++/kms++.h:8,
                       from ../kmsxx/py/pykms/pykms.cpp:3:
      /usr/include/kms++/pixelformats.h:133:19: error: explicitly defaulted function ‘constexpr kms::PixelFormatPlaneInfo::PixelFormatPlaneInfo()’ cannot be declared ‘constexpr’ because the implicit declaration is not ‘constexpr’:
        133 |         constexpr PixelFormatPlaneInfo() = default;
            |                   ^~~~~~~~~~~~~~~~~~~~
      /usr/include/kms++/pixelformats.h:147:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::bytes_per_block’
        147 |         uint8_t bytes_per_block;
            |                 ^~~~~~~~~~~~~~~
      /usr/include/kms++/pixelformats.h:148:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::pixels_per_block’
        148 |         uint8_t pixels_per_block;
            |                 ^~~~~~~~~~~~~~~~
      /usr/include/kms++/pixelformats.h:149:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::hsub’
        149 |         uint8_t hsub;
            |                 ^~~~
      /usr/include/kms++/pixelformats.h:150:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::vsub’
        150 |         uint8_t vsub;
            |                 ^~~~
      [2/4] Compiling C++ object pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsutil.cpp.o
      FAILED: [code=1] pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsutil.cpp.o
      c++ -Ipykms.cpython-311-aarch64-linux-gnu.so.p -I. -I.. -I/usr/include/libdrm -I/usr/include/python3.11 -I/usr/include/aarch64-linux-gnu/python3.11 -I/tmp/pip-build-env-fxcccjle/overlay/lib/python3.11/site-packages/pybind11/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O3 -DHAS_KMSXXUTIL -fPIC -fvisibility=hidden -DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT -MD -MQ pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsutil.cpp.o -MF pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsutil.cpp.o.d -o pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsutil.cpp.o -c ../kmsxx/py/pykms/pykmsutil.cpp
      In file included from /usr/include/kms++/framebuffer.h:6,
                       from /usr/include/kms++/kms++.h:8,
                       from ../kmsxx/py/pykms/pykmsutil.cpp:3:
      /usr/include/kms++/pixelformats.h:133:19: error: explicitly defaulted function ‘constexpr kms::PixelFormatPlaneInfo::PixelFormatPlaneInfo()’ cannot be declared ‘constexpr’ because the implicit declaration is not ‘constexpr’:
        133 |         constexpr PixelFormatPlaneInfo() = default;
            |                   ^~~~~~~~~~~~~~~~~~~~
      /usr/include/kms++/pixelformats.h:147:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::bytes_per_block’
        147 |         uint8_t bytes_per_block;
            |                 ^~~~~~~~~~~~~~~
      /usr/include/kms++/pixelformats.h:148:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::pixels_per_block’
        148 |         uint8_t pixels_per_block;
            |                 ^~~~~~~~~~~~~~~~
      /usr/include/kms++/pixelformats.h:149:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::hsub’
        149 |         uint8_t hsub;
            |                 ^~~~
      /usr/include/kms++/pixelformats.h:150:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::vsub’
        150 |         uint8_t vsub;
            |                 ^~~~
      ../kmsxx/py/pykms/pykmsutil.cpp: In lambda function:
      ../kmsxx/py/pykms/pykmsutil.cpp:49:96: error: invalid initialization of reference of type ‘const kms::TestPatternOptions&’ from expression of type ‘kms::YUVType’
         49 |                 "draw_test_pattern", [](Framebuffer& fb, YUVType yuvt) { draw_test_pattern(fb, yuvt); },
            |                                                                                                ^~~~
      In file included from ../kmsxx/py/pykms/pykmsutil.cpp:4:
      /usr/include/kms++util/kms++util.h:42:68: note: in passing argument 2 of ‘void kms::draw_test_pattern(IFramebuffer&, const TestPatternOptions&)’
         42 | void draw_test_pattern(IFramebuffer& fb, const TestPatternOptions& options = {});
            |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      [3/4] Compiling C++ object pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsbase.cpp.o
      FAILED: [code=1] pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsbase.cpp.o
      c++ -Ipykms.cpython-311-aarch64-linux-gnu.so.p -I. -I.. -I/usr/include/libdrm -I/usr/include/python3.11 -I/usr/include/aarch64-linux-gnu/python3.11 -I/tmp/pip-build-env-fxcccjle/overlay/lib/python3.11/site-packages/pybind11/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O3 -DHAS_KMSXXUTIL -fPIC -fvisibility=hidden -DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT -MD -MQ pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsbase.cpp.o -MF pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsbase.cpp.o.d -o pykms.cpython-311-aarch64-linux-gnu.so.p/kmsxx_py_pykms_pykmsbase.cpp.o -c ../kmsxx/py/pykms/pykmsbase.cpp
      In file included from /usr/include/kms++/framebuffer.h:6,
                       from /usr/include/kms++/kms++.h:8,
                       from ../kmsxx/py/pykms/pykmsbase.cpp:3:
      /usr/include/kms++/pixelformats.h:133:19: error: explicitly defaulted function ‘constexpr kms::PixelFormatPlaneInfo::PixelFormatPlaneInfo()’ cannot be declared ‘constexpr’ because the implicit declaration is not ‘constexpr’:
        133 |         constexpr PixelFormatPlaneInfo() = default;
            |                   ^~~~~~~~~~~~~~~~~~~~
      /usr/include/kms++/pixelformats.h:147:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::bytes_per_block’
        147 |         uint8_t bytes_per_block;
            |                 ^~~~~~~~~~~~~~~
      /usr/include/kms++/pixelformats.h:148:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::pixels_per_block’
        148 |         uint8_t pixels_per_block;
            |                 ^~~~~~~~~~~~~~~~
      /usr/include/kms++/pixelformats.h:149:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::hsub’
        149 |         uint8_t hsub;
            |                 ^~~~
      /usr/include/kms++/pixelformats.h:150:17: note: defaulted default constructor does not initialize ‘uint8_t kms::PixelFormatPlaneInfo::vsub’
        150 |         uint8_t vsub;
            |                 ^~~~
      ../kmsxx/py/pykms/pykmsbase.cpp: In function ‘void init_pykmsbase(pybind11::module&)’:
      ../kmsxx/py/pykms/pykmsbase.cpp:245:41: error: ‘FourCCToPixelFormat’ was not declared in this scope
        245 |         m.def("fourcc_to_pixelformat", &FourCCToPixelFormat);
            |                                         ^~~~~~~~~~~~~~~~~~~
      ../kmsxx/py/pykms/pykmsbase.cpp:246:41: error: ‘PixelFormatToFourCC’ was not declared in this scope
        246 |         m.def("pixelformat_to_fourcc", &PixelFormatToFourCC);
            |                                         ^~~~~~~~~~~~~~~~~~~
      ../kmsxx/py/pykms/pykmsbase.cpp:303:64: error: ‘bitspp’ is not a member of ‘kms::PixelFormatPlaneInfo’
        303 |                 .def_readonly("bitspp", &PixelFormatPlaneInfo::bitspp)
            |                                                                ^~~~~~
      ../kmsxx/py/pykms/pykmsbase.cpp:304:62: error: ‘xsub’ is not a member of ‘kms::PixelFormatPlaneInfo’
        304 |                 .def_readonly("xsub", &PixelFormatPlaneInfo::xsub)
            |                                                              ^~~~
      ../kmsxx/py/pykms/pykmsbase.cpp:305:62: error: ‘ysub’ is not a member of ‘kms::PixelFormatPlaneInfo’
        305 |                 .def_readonly("ysub", &PixelFormatPlaneInfo::ysub);
            |                                                              ^~~~
      ninja: build stopped: subcommand failed.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions