[Buildroot] [PATCH v2 1/2] package/python-pybind: fix upgrade to version 2.6.1

Arnout Vandecappelle arnout at mind.be
Fri Jan 7 21:55:24 UTC 2022



On 08/12/2021 12:19, Andreas Naumann wrote:
[snip]
> By chance I was playing with such a package just yesterday: zxing-cpp. Not the 
> version buildroot uses (from github glassechidna), but the nu-book one which 
> claims to be faster. (And is the one where the python bindings in the PyPi 
> package zxing-cpp originate from).
> 
> Until recently they shipped their own pybind11 version, which throws an error 
> when included in a cmake project in a crosscompile environment. This is a known 
> problem, https://github.com/pybind/pybind11/issues/2139 but non of the proposed 
> fixes has been merged yet.
> 
> However, the unreleased master version of zxing-cpp hast been changed so it can 
> be configured to use the a system pybind11. So I tried to include the br 
> packaged one (2.6.1 as well as 2.8.1). They both built on my system (no problem 
> with the hardcoded host cmake here) but I needed to change three things:
> 1. Add PYTHON_PYBIND_INSTALL_STAGING = YES
> 2. Set ZXING_CPP_CONF_OPTS += 
> -Dpybind11_DIR=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/pybind11/share/cmake/pybind11 
> 
> 3. Apply one of the proposed fixes for the pybind11 crosscompile problem (to 
> tools/pybind11Tools.cmake)
> 
> So this patch here seems to help my (and possibly others) because 1. is already 
> included. If interested, I could send a patch for 3.

  I applied a slightly different approach to master [1]. If you'd like to give 
that one a go, we'd welcome an updated zxing-cpp package!

  Regards,
  Arnout

[1] 
https://git.buildroot.org/buildroot/commit/?id=a19b822239c36cb40a632899bb5c3e848a5fc81e

[snip]



More information about the buildroot mailing list