Yikai-Liao / symusic

A cross platform note level midi decoding library with lightening speed, based on minimidi.
https://yikai-liao.github.io/symusic/
MIT License
108 stars 8 forks source link

nanobind v2.0.0 breaks building compatibility #40

Open Phynon opened 1 month ago

Phynon commented 1 month ago

Describe the Bug As stated in title, after nanobind releases its v2.0.0 just last week, symusic will no more be built successfully under default settings.

To Reproduce Head into pyproject.toml, fix version specifier to "==2.0.0" for nanobind, and run pip wheel ./symusic to build wheel for symusic. It is expected to fail at symusic/py_src/bind_vector_copy.h:67:66, raising error: ‘iterable_type_id’ is not a member of ‘nanobind::detail’; did you mean ‘iterable_check’? and other similar errors complaining missing members and missing overrides for functions.

No error is reported and everything is fine with nanobind releases v1.8.x and v1.9.x.

Expected Behavior A successful build.

Possible Root of Cause and Solution Since v2.0.0, iterable_type_id surely has not resided in nanobind::detail namespace. In this case, one may expect to suffer a build failure as pip would gladly like to choose the latest nanobind v2.0.0 as build dependency, which satisfies the version specifier (>=1.8.0) in pyproject.toml of symusic.

This might not be a pain for systems equipped with GNU libc modern enough to install wheels directly from pypi. However, for those who have to build symusic from source, it is important to get aware of this inconsistency that pip hides under its sleeves.

System Info

Yikai-Liao commented 1 month ago

I have updated symusic in main branch to fit the nanobind 2.0.0. But I'm not sure if the large number of recent changes can be released as v0.5.0.

So I'm going to release a v0.4.8 first, which differs from v0.4.7 only by fixing the version of nanobind to 1.9.2

Yikai-Liao commented 1 month ago

By the way, what is your purpose of using symusic on this machine (Linux 4.9.151)? I am curious about it.

Because we originally developed symusic to provide fast reading of midi files during training in the field of deep learning. I haven't seen a machine running deep learning using such an old version of the Linux kernel.

If you could tell me your application scenario, I might be able to better consider the future direction of the symusic library.

Phynon commented 1 month ago

I appreciate your rapid response and warmhearted consideration.

what is your purpose of using symusic on this machine (Linux 4.9.151)?

I'm using symusic for deep learning tasks as you could expect. Such tasks can be performed on a machine running linux 4.9, the oldest kernel version that is still under long-term maintenence. Actually I have to work on systems of various versions due to some administrative reasons; most of them are up-to-date, but it would probably be off topic if I add too much flesh to this.