According to rikyoz/bit7z there is a major version change at 23.01 that completely breaks backwards compatability. In order to get linux distros happy with this we'll have to turn on the flag BIT7Z_USE_LEGACY_IUNKNOWN when we encounter a 7z shared library with a lower version then 23.01.
On Linux and macOS, 7-zip v23.01 introduced breaking changes to the IUnknown interface. If you build bit7z for such a version of 7-zip (the default), it will not support using the shared libraries from previous versions of 7-zip (or from p7zip). Conversely, bit7z made for earlier versions of 7-zip or for p7zip is incompatible with the shared libraries from 7-zip v23.01 and later.
You can build the shared libraries of 7-zip v23.01 in a backward-compatible mode by defining the macro Z7_USE_VIRTUAL_DESTRUCTOR_IN_IUNKNOWN. If this is your case, you can build bit7z for v23.01 using the option BIT7Z_USE_LEGACY_IUNKNOWN (in this case, bit7z will be compatible also with previous versions of 7-zip/p7zip).
According to rikyoz/bit7z there is a major version change at 23.01 that completely breaks backwards compatability. In order to get linux distros happy with this we'll have to turn on the flag
BIT7Z_USE_LEGACY_IUNKNOWN
when we encounter a 7z shared library with a lower version then 23.01.