Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when installing via pip on CoreElec (aarch64) #198

Open
kamulchik opened this issue Apr 15, 2024 · 16 comments
Open

Error when installing via pip on CoreElec (aarch64) #198

kamulchik opened this issue Apr 15, 2024 · 16 comments

Comments

@kamulchik
Copy link

kamulchik commented Apr 15, 2024

Python version:
Python 3.10.7

Binutils info:

opkg info binutils
Package: binutils
Version: 2.41-1
Depends: libc, libssp, librt, libpthread, objdump, ar
Status: unknown ok not-installed
Section: devel
Architecture: aarch64-3.10
Size: 1233607
Filename: binutils_2.41-1_aarch64-3.10.ipk
Description: The Binutils package contains a linker, an assembler, and other tools for handling object files

Package: binutils
Version: 2.40-1a
Depends: libc, libssp, librt, libpthread, objdump, ar
Status: install user installed
Architecture: aarch64-3.10
Installed-Time: 1698595382

Error when trying pip install python-rtmidi

`Collecting python-rtmidi
  Downloading python_rtmidi-1.5.8.tar.gz (368 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 368.1/368.1 kB 3.2 MB/s eta 0:00:00
  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
  ╰─> [18 lines of output]
      + meson setup /storage/.opt/tmp/pip-install-yvyd3lo8/python-rtmidi_0bc20ce838854aaf80393171e4ea1328 /storage/.opt/tmp/pip-install-yvyd3lo8/python-rtmidi_0bc20ce838854aaf80393171e4ea1328/.mesonpy-stqatoz_ -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dwheel=true -Dverbose=false -Dbuildtype=plain --native-file=/storage/.opt/tmp/pip-install-yvyd3lo8/python-rtmidi_0bc20ce838854aaf80393171e4ea1328/.mesonpy-stqatoz_/meson-python-native-file.ini
      The Meson build system
      Version: 1.4.0
      Source dir: /storage/.opt/tmp/pip-install-yvyd3lo8/python-rtmidi_0bc20ce838854aaf80393171e4ea1328
      Build dir: /storage/.opt/tmp/pip-install-yvyd3lo8/python-rtmidi_0bc20ce838854aaf80393171e4ea1328/.mesonpy-stqatoz_
      Build type: native build
      Project name: python-rtmidi
      Project version: 1.5.8
      ../meson.build:1:0: ERROR: Unable to detect linker for compiler c++ -Wl,--version
      stdout:
      stderr: collect2 version 8.4.0
      /opt/bin/ld -plugin /storage/.opt/bin/../lib/gcc/aarch64-openwrt-linux-gnu/8.4.0/liblto_plugin.so -plugin-opt=/storage/.opt/bin/../lib/gcc/aarch64-openwrt-linux-gnu/8.4.0/lto-wrapper -plugin-opt=-fresolution=/opt/tmp/ccRSvR6e.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -dynamic-linker /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux /storage/.opt/bin/../lib/gcc/aarch64-openwrt-linux-gnu/8.4.0/crt1.o /storage/.opt/bin/../lib/gcc/aarch64-openwrt-linux-gnu/8.4.0/crti.o /storage/.opt/bin/../lib/gcc/aarch64-openwrt-linux-gnu/8.4.0/crtbegin.o -L/storage/.opt/bin/../lib/gcc/aarch64-openwrt-linux-gnu/8.4.0 -L/storage/.opt/bin/../lib/gcc -L/storage/.opt/bin/../lib/gcc/aarch64-openwrt-linux-gnu/8.4.0/../../.. --version -lstdc++ -lm -rpath=/opt/lib --dynamic-linker=/opt/lib/ld-linux-aarch64.so.1 -lgcc_s -lc -lgcc_s /storage/.opt/bin/../lib/gcc/aarch64-openwrt-linux-gnu/8.4.0/crtend.o /storage/.opt/bin/../lib/gcc/aarch64-openwrt-linux-gnu/8.4.0/crtn.o
      /opt/bin/ld: error while loading shared libraries: libbfd-2.40.so: cannot open shared object file: No such file or directory
      collect2: error: ld returned 127 exit status


      A full log can be found at /storage/.opt/tmp/pip-install-yvyd3lo8/python-rtmidi_0bc20ce838854aaf80393171e4ea1328/.mesonpy-stqatoz_/meson-logs/meson-log.txt
      [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.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.`

@SpotlightKid
Copy link
Owner

This seems to be a problem with you compiler installation. What is the output of c++ -Wl,--version?

@kamulchik
Copy link
Author

I am so sorry. Yes, it is compiler depends problem. Resolved.

@SpotlightKid
Copy link
Owner

No problem. Glad you could get it working.

@kamulchik
Copy link
Author

No problem. Glad you could get it working.

Not yet. I resolve a problem compiler installation. But can't install python-rtmidi. I have opkg packet manager, and i not have a package libasound2-dev or jack. But i have libasound.so.2. And i have a alsactl.
Path:
find / -name "libasound*"
/storage/.opt/lib/libasound.so.2.0.0
/storage/.opt/lib/libasound.so.2
/usr/lib/libasound.so
/usr/lib/libasound.so.2
/usr/lib/libasound.so.2.0.0

find / -name "alsactl"
/storage/.opt/sbin/alsactl
/usr/sbin/alsactl

Any workaround for install python-rtmidi. Current ERROR:

 The Meson build system
      Version: 1.4.0
      Source dir: /storage/.opt/tmp/pip-install-ulrymfrh/python-rtmidi_48551eea4ac547c49751fab94fe43eda
      Build dir: /storage/.opt/tmp/pip-install-ulrymfrh/python-rtmidi_48551eea4ac547c49751fab94fe43eda/.mesonpy-jx9dyk5p
      Build type: native build
      Project name: python-rtmidi
      Project version: 1.5.8
      C++ compiler for the host machine: c++ (gcc 8.4.0 "c++ (OpenWrt GCC 8.4.0) 8.4.0")
      C++ linker for the host machine: c++ ld.bfd 2.41
      Host machine cpu family: aarch64
      Host machine cpu: aarch64
      Found pkg-config: YES (/opt/bin/pkg-config) 0.29.2
      Found CMake: /opt/bin/cmake (3.28.1)
      Run-time dependency jack found: NO (tried pkgconfig and cmake)
      Run-time dependency jack found: NO (tried pkgconfig and cmake)
      ../meson.build:24: WARNING: No version of JACK found, which is recent enough (jack2>=1.9.11 or jack1>=0.125.0)
      Run-time dependency alsa found: NO (tried pkgconfig and cmake)

      ../meson.build:66:15: ERROR: Dependency "alsa" not found, tried pkgconfig and cmake
@SpotlightKid SpotlightKid reopened this Apr 15, 2024
@SpotlightKid
Copy link
Owner

You need not only the ALSA libraries, but also the header files, which are usually installed in /usr/include/alsa adn included via /usr/include/asoundlib.h.

In don't know which package on your distro (openwrt?) provides these files. Maybe alsa-lib?

@kamulchik
Copy link
Author

You need not only the ALSA libraries, but also the header files, which are usually installed in /usr/include/alsa adn included via /usr/include/asoundlib.h.

In don't know which package on your distro (openwrt?) provides these files. Maybe alsa-lib?

Distro: CoreElec.
find / -name "asound*"
/proc/asound
/storage/.opt/include/sound/asound.h
/storage/.opt/include/sound/asound_fm.h
/storage/.opt/var/lock/asound.state.lock
/storage/.opt/var/lib/alsa/asound.state

opkg install alsa-lib
Package alsa-lib (1.2.9-1) installed in root is up to date.

@SpotlightKid
Copy link
Owner

Nope, these are not the droids...err...headers we're looking for.

@SpotlightKid
Copy link
Owner

It seems the header files are not included in the alsa-lib package:

https://github.com/openwrt/packages/blob/openwrt-22.03/libs/alsa-lib/Makefile#L71

So, if you want to compile python-rtmidi on this system, you need to find way to provide these headers and an alsa.pc pkgconfig file in a location where pkgconfig can find it, which returns the correct cflags and ldflags for the alsa lib.

@kamulchik
Copy link
Author

@SpotlightKid i built alsa libs from sources and copy to directory files to "include" dir such as asoundlib.h, asoundef.h etc... I got a new error. Please, tell me what i can investigation for this error:

      The Meson build system
      Version: 1.4.0
      Source dir: /storage/.opt/tmp/pip-install-ch7rxvyw/python-rtmidi_519048ea503a43a9806511eb3a383d87
      Build dir: /storage/.opt/tmp/pip-install-ch7rxvyw/python-rtmidi_519048ea503a43a9806511eb3a383d87/.mesonpy-_fdhi9hs
      Build type: native build
      Project name: python-rtmidi
      Project version: 1.5.8
      C++ compiler for the host machine: c++ (gcc 8.4.0 "c++ (OpenWrt GCC 8.4.0) 8.4.0")
      C++ linker for the host machine: c++ ld.bfd 2.41
      Host machine cpu family: aarch64
      Host machine cpu: aarch64
      Found pkg-config: YES (/opt/bin/pkg-config) 0.29.2
      Found CMake: /opt/bin/cmake (3.28.1)
      Run-time dependency jack found: NO (tried pkgconfig and cmake)
      Run-time dependency jack found: NO (tried pkgconfig and cmake)
      ../meson.build:24: WARNING: No version of JACK found, which is recent enough (jack2>=1.9.11 or jack1>=0.125.0)
      Run-time dependency alsa found: YES 1.2.9
      Run-time dependency threads found: YES
      Has header "semaphore.h" : YES
      Program python3 found: YES (/opt/bin/python3)
      Program cython found: YES (/storage/.opt/tmp/pip-build-env-rkzmieo_/overlay/bin/cython)
      Run-time dependency python found: YES 3.11
      Configuring version.py using configuration
      Build targets in project: 1

Exact:

      python-rtmidi 1.5.8

        Configuration
          Host machine system     : linux
          Python version          : 3.11
          Debug messages (verbose): false
          Build for wheel         : true
          JACK support            : false
          ALSA support            : true
          CoreMIDI support        : false
          Window MM support       : false

        User defined options
          Native files            : /storage/.opt/tmp/pip-install-ch7rxvyw/python-rtmidi_519048ea503a43a9806511eb3a383d87/.mesonpy-_fdhi9hs/meson-python-native-file.ini
          buildtype               : plain
          b_ndebug                : if-release
          b_vscrt                 : md
          verbose                 : false
          wheel                   : true

      Found ninja-1.11.1.git.kitware.jobserver-1 at /storage/.opt/tmp/pip-build-env-rkzmieo_/overlay/bin/ninja
      + /storage/.opt/tmp/pip-build-env-rkzmieo_/overlay/bin/ninja
      [1/3] Compiling C++ object rtmidi/_rtmidi.cpython-311-aarch64-linux-gnu.so.p/.._src_rtmidi_RtMidi.cpp.o
      [2/3] Compiling C++ object rtmidi/_rtmidi.cpython-311-aarch64-linux-gnu.so.p/.._src__rtmidi.cpp.o
      FAILED: rtmidi/_rtmidi.cpython-311-aarch64-linux-gnu.so.p/.._src__rtmidi.cpp.o
      c++ -Irtmidi/_rtmidi.cpython-311-aarch64-linux-gnu.so.p -Irtmidi -I../rtmidi -Isrc -I../src -I../src/rtmidi -I/opt/include/python3.11 -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++11 -fPIC -pthread -D__LINUX_ALSA__ -D__RTMIDI_SILENCE_WARNINGS__ -MD -MQ rtmidi/_rtmidi.cpython-311-aarch64-linux-gnu.so.p/.._src__rtmidi.cpp.o -MF rtmidi/_rtmidi.cpython-311-aarch64-linux-gnu.so.p/.._src__rtmidi.cpp.o.d -o rtmidi/_rtmidi.cpython-311-aarch64-linux-gnu.so.p/.._src__rtmidi.cpp.o -c ../src/_rtmidi.cpp
      In file included from /opt/include/python3.11/Python.h:38,
                       from ../src/_rtmidi.cpp:16:
      ../src/_rtmidi.cpp: In function 'PyObject* __pyx_pf_7_rtmidi_2get_api_display_name(PyObject*, PyObject*)':
      /opt/include/python3.11/pyport.h:132:27: error: 'SSIZE_MAX' was not declared in this scope
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:5572:80: note: in expansion of macro 'PY_SSIZE_T_MAX'
         __pyx_t_2 = __Pyx_decode_cpp_string(RtMidi::getApiDisplayName(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
                                                                                      ^~~~~~~~~~~~~~
      /opt/include/python3.11/pyport.h:132:27: note: suggested alternative: 'SIZE_MAX'
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:5572:80: note: in expansion of macro 'PY_SSIZE_T_MAX'
         __pyx_t_2 = __Pyx_decode_cpp_string(RtMidi::getApiDisplayName(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
                                                                                      ^~~~~~~~~~~~~~
      ../src/_rtmidi.cpp: In function 'PyObject* __pyx_pf_7_rtmidi_4get_api_name(PyObject*, PyObject*)':
      /opt/include/python3.11/pyport.h:132:27: error: 'SSIZE_MAX' was not declared in this scope
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:5721:73: note: in expansion of macro 'PY_SSIZE_T_MAX'
         __pyx_t_2 = __Pyx_decode_cpp_string(RtMidi::getApiName(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
                                                                               ^~~~~~~~~~~~~~
      /opt/include/python3.11/pyport.h:132:27: note: suggested alternative: 'SIZE_MAX'
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:5721:73: note: in expansion of macro 'PY_SSIZE_T_MAX'
         __pyx_t_2 = __Pyx_decode_cpp_string(RtMidi::getApiName(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
                                                                               ^~~~~~~~~~~~~~
      ../src/_rtmidi.cpp: In function 'PyObject* __pyx_pf_7_rtmidi_10get_rtmidi_version(PyObject*)':
      /opt/include/python3.11/pyport.h:132:27: error: 'SSIZE_MAX' was not declared in this scope
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:6061:64: note: in expansion of macro 'PY_SSIZE_T_MAX'
         __pyx_t_1 = __Pyx_decode_cpp_string(RtMidi::getVersion(), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error)
                                                                      ^~~~~~~~~~~~~~
      /opt/include/python3.11/pyport.h:132:27: note: suggested alternative: 'SIZE_MAX'
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:6061:64: note: in expansion of macro 'PY_SSIZE_T_MAX'
         __pyx_t_1 = __Pyx_decode_cpp_string(RtMidi::getVersion(), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error)
                                                                      ^~~~~~~~~~~~~~
      ../src/_rtmidi.cpp: In function 'PyObject* __pyx_f_7_rtmidi___pyx_unpickle_MidiBase__set_state(__pyx_obj_7_rtmidi_MidiBase*, PyObject*)':
      /opt/include/python3.11/pyport.h:132:27: error: 'SSIZE_MAX' was not declared in this scope
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:1453:43: note: in definition of macro 'likely'
         #define likely(x)   __builtin_expect(!!(x), 1)
                                                 ^
      ../src/_rtmidi.cpp:1229:28: note: in expansion of macro 'PY_SSIZE_T_MAX'
                 likely(v < (type)PY_SSIZE_T_MAX ||\
                                  ^~~~~~~~~~~~~~
      ../src/_rtmidi.cpp:2091:6: note: in expansion of macro '__Pyx_fits_Py_ssize_t'
           (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
            ^~~~~~~~~~~~~~~~~~~~~
      ../src/_rtmidi.cpp:14540:15: note: in expansion of macro '__Pyx_GetItemInt_Tuple'
         __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
                     ^~~~~~~~~~~~~~~~~~~~~~
      /opt/include/python3.11/pyport.h:132:27: note: suggested alternative: 'SIZE_MAX'
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:1453:43: note: in definition of macro 'likely'
         #define likely(x)   __builtin_expect(!!(x), 1)
                                                 ^
      ../src/_rtmidi.cpp:1229:28: note: in expansion of macro 'PY_SSIZE_T_MAX'
                 likely(v < (type)PY_SSIZE_T_MAX ||\
                                  ^~~~~~~~~~~~~~
      ../src/_rtmidi.cpp:2091:6: note: in expansion of macro '__Pyx_fits_Py_ssize_t'
           (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
            ^~~~~~~~~~~~~~~~~~~~~
      ../src/_rtmidi.cpp:14540:15: note: in expansion of macro '__Pyx_GetItemInt_Tuple'
         __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
                     ^~~~~~~~~~~~~~~~~~~~~~
      ../src/_rtmidi.cpp: In function 'PyObject* __Pyx_PyUnicode_Join(PyObject*, Py_ssize_t, Py_ssize_t, Py_UCS4)':
      /opt/include/python3.11/pyport.h:132:27: error: 'SSIZE_MAX' was not declared in this scope
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:1454:43: note: in definition of macro 'unlikely'
         #define unlikely(x) __builtin_expect(!!(x), 0)
                                                 ^
      ../src/_rtmidi.cpp:19049:23: note: in expansion of macro 'PY_SSIZE_T_MAX'
               if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
                             ^~~~~~~~~~~~~~
      /opt/include/python3.11/pyport.h:132:27: note: suggested alternative: 'SIZE_MAX'
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:1454:43: note: in definition of macro 'unlikely'
         #define unlikely(x) __builtin_expect(!!(x), 0)
                                                 ^
      ../src/_rtmidi.cpp:19049:23: note: in expansion of macro 'PY_SSIZE_T_MAX'
               if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
                             ^~~~~~~~~~~~~~
      ../src/_rtmidi.cpp: In function 'Py_ssize_t __Pyx_ssize_strlen(const char*)':
      /opt/include/python3.11/pyport.h:132:27: error: 'SSIZE_MAX' was not declared in this scope
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:1454:43: note: in definition of macro 'unlikely'
         #define unlikely(x) __builtin_expect(!!(x), 0)
                                                 ^
      ../src/_rtmidi.cpp:24451:33: note: in expansion of macro 'PY_SSIZE_T_MAX'
           if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
                                       ^~~~~~~~~~~~~~
      /opt/include/python3.11/pyport.h:132:27: note: suggested alternative: 'SIZE_MAX'
       #   define PY_SSIZE_T_MAX SSIZE_MAX
                                 ^~~~~~~~~
      ../src/_rtmidi.cpp:1454:43: note: in definition of macro 'unlikely'
         #define unlikely(x) __builtin_expect(!!(x), 0)
                                                 ^
      ../src/_rtmidi.cpp:24451:33: note: in expansion of macro 'PY_SSIZE_T_MAX'
           if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
                                       ^~~~~~~~~~~~~~
      ninja: build stopped: subcommand failed.

P.s. i now, that this hardest method for install rtmidi, but i don't know other...

@SpotlightKid
Copy link
Owner

SpotlightKid commented Apr 15, 2024

You also need the Python header files, so Python.h etc. in the directory returned by pkgconfig --cflags python3.

I thought that meson would detect this when checking for Python's presence, but obviously it doesn't and I should have included a more thorough check that the Python headers are present. I will add this in future python-rtmidi versions.

I think your distro is not really meant for building software directly on the device. In the long run, you're probably better off setting up a cross-compilation build environment on your PC.

@kamulchik
Copy link
Author

kamulchik commented Apr 15, 2024

You also need the Python header files, so Python.h etc. in the directory returned by pkgconfig --cflags python3.

How i can check it? Because directory have a Python header files:

CoreELEC:~ # pkg-config --cflags python3
-I/opt/include/python3.11
ls -la /opt/include/python3.11/Py*
-rw-r--r--    1 root     root          2854 Feb 22 21:13 /opt/include/python3.11/Python.h
CoreELEC:~ # ls -la /opt/include/python3.11/py*
-rw-r--r--    1 root     root          2471 Feb 22 21:13 /opt/include/python3.11/py_curses.h
-rw-r--r--    1 root     root          5115 Feb 22 21:13 /opt/include/python3.11/pybuffer.h
-rw-r--r--    1 root     root          1725 Feb 22 21:13 /opt/include/python3.11/pycapsule.h
-rw-r--r--    1 root     root         55428 Feb 22 21:13 /opt/include/python3.11/pyconfig.h
-rw-r--r--    1 root     root          2413 Feb 22 21:13 /opt/include/python3.11/pydtrace.h
-rw-r--r--    1 root     root         12782 Feb 22 21:13 /opt/include/python3.11/pyerrors.h
-rw-r--r--    1 root     root          2450 Feb 22 21:13 /opt/include/python3.11/pyexpat.h
-rw-r--r--    1 root     root           551 Feb 22 21:13 /opt/include/python3.11/pyframe.h
-rw-r--r--    1 root     root          4154 Feb 22 21:13 /opt/include/python3.11/pyhash.h
-rw-r--r--    1 root     root          2249 Feb 22 21:13 /opt/include/python3.11/pylifecycle.h
-rw-r--r--    1 root     root          2989 Feb 22 21:13 /opt/include/python3.11/pymacconfig.h
-rw-r--r--    1 root     root          6064 Feb 22 21:13 /opt/include/python3.11/pymacro.h
-rw-r--r--    1 root     root          1979 Feb 22 21:13 /opt/include/python3.11/pymath.h
-rw-r--r--    1 root     root          3890 Feb 22 21:13 /opt/include/python3.11/pymem.h
-rw-r--r--    1 root     root         24452 Feb 22 21:13 /opt/include/python3.11/pyport.h
-rw-r--r--    1 root     root          4635 Feb 22 21:13 /opt/include/python3.11/pystate.h
-rw-r--r--    1 root     root           436 Feb 22 21:13 /opt/include/python3.11/pystrcmp.h
-rw-r--r--    1 root     root          1557 Feb 22 21:13 /opt/include/python3.11/pystrtod.h
-rw-r--r--    1 root     root          1189 Feb 22 21:13 /opt/include/python3.11/pythonrun.h
-rw-r--r--    1 root     root          4833 Feb 22 21:13 /opt/include/python3.11/pythread.h
-rw-r--r--    1 root     root           851 Feb 22 21:13 /opt/include/python3.11/pytypedefs.h
@SpotlightKid
Copy link
Owner

Sorry, my assessment was a bit hasty. It seems that your system has the Python headers installed after all.

So it is probably a problem with the C++ code generated by Cython.

I'm not sure if it is using the generated C++ code from the source distribution or if it is generating it on your system.

Are you compiling from the source distribution (e.g. by using pip install) or from the git repo?

@kamulchik
Copy link
Author

Sorry, my assessment was a bit hasty. It seems that your system has the Python headers installed after all.

So it is probably a problem with the C++ code generated by Cython.

I'm not sure if it is using the generated C++ code from the source distribution or if it is generating it on your system.

Are you compiling from the source distribution (e.g. by using pip install) or from the git repo?

From PyPi, like a manual. https://spotlightkid.github.io/python-rtmidi/installation.html Section "From PyPI"

@SpotlightKid
Copy link
Owner

SpotlightKid commented Apr 15, 2024

Can you try installing from the git repo as described here?

git clone --recursive https://github.com/SpotlightKid/python-rtmidi.git
cd python-rtmidi
[sudo] python -m pip install build installer
python -m build --wheel
[sudo] python -m installer dist/*.whl
@SpotlightKid
Copy link
Owner

@kamulchik Any luck compiling python-rtmidi on CoreElec yet?

@SpotlightKid SpotlightKid changed the title Can't install for ARM Apr 16, 2024
@kamulchik
Copy link
Author

kamulchik commented Apr 17, 2024

Any luck compiling python-rtmidi on CoreElec yet

I think your distro is not really meant for building software directly on the device. In the long run, you're probably better off setting up a cross-compilation build environment on your PC.

You are right. So I lost a lot of time for tries. At now, i have beautiful error:
module 'venv' has no attribute 'EnvBuilder'. When envvuilder installed : ^)
I need more time....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants