Alternate, minimal approach: https://github.com/OpenImageIO/oiio/pull/2145
Pros/cons: This just makes a compile error if the pybind headers (when it reads them in py_oiio.h) don't have a new enough version. That's fairly foolproof, but you don't know that it's the wrong version until most of the way through the build. (Do we care?) The approach of #2144 tried to figure it all out at cmake setup time, before the main build gets underway, which is nicer, but it was a lot more clutter of the build scripts, and it's going to be way more clutter to make it robust in light of the fact that the place where the version numbers were stored changed between pybind11 2.1 and 2.2. Opinions? > On Jan 13, 2019, at 9:34 PM, Larry Gritz <[email protected]> wrote: > > Thanks, this was helpful. Seems that the file that contains the version > numbers *moved* at some point, making this even more complex. I'm going to > test out a different approach... > > > >> On Jan 13, 2019, at 8:26 PM, Steve Hwan <[email protected] >> <mailto:[email protected]>> wrote: >> >> For fun, I went into my local src/cmake/externalpackages.cmake file and >> removed the "detail" in that path in all 4 occurrences and got a different >> error: >> So with that change (removing "detail" from the pybind/common.h path), it >> can now identify the version, and warn that it doesn't meet the minimum. >> But for some reason, it can't build pybind11 anymore, breading with some >> REGEX thing. >> >> CMake Warning at src/cmake/externalpackages.cmake:550 (message): >> pybind11 from /usr/include is too old (2.0), minimum is 2.2.0, downloading >> our own. >> Call Stack (most recent call first): >> CMakeLists.txt:201 (find_or_download_pybind11) >> >> >> -- Building local Pybind11 >> CMake Error at src/cmake/externalpackages.cmake:577 (string): >> string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to >> command. >> Call Stack (most recent call first): >> CMakeLists.txt:201 (find_or_download_pybind11) >> >> >> CMake Error at src/cmake/externalpackages.cmake:579 (string): >> string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to >> command. >> Call Stack (most recent call first): >> CMakeLists.txt:201 (find_or_download_pybind11) >> >> >> CMake Warning at src/cmake/externalpackages.cmake:584 (message): >> pybind11 from >> /mnt/d/Users/svhwan/developer_builds/oiio_2.0.4/oiio/ext/pybind11/include >> is too old (2.0), minimum is 2.2.0. >> Call Stack (most recent call first): >> CMakeLists.txt:201 (find_or_download_pybind11) >> >> >> CMake Error at src/cmake/externalpackages.cmake:590 (message): >> pybind11 is missing! If it's not on your system, you need to install it, or >> build with either -DBUILD_MISSING_DEPS=ON or -DBUILD_PYBIND11_FORCE=ON. Or >> build with -DUSE_PYTHON=OFF. >> Call Stack (most recent call first): >> CMakeLists.txt:201 (find_or_download_pybind11) >> >> >> -- Configuring incomplete, errors occurred! >> >> On Sun, Jan 13, 2019 at 8:08 PM Steve Hwan <[email protected] >> <mailto:svhwan%[email protected]>> wrote: >> I tried to apply the patch, but it looks like it bails out during the config. >> CMake Error at src/cmake/externalpackages.cmake:544 (file): >> file STRINGS file "/usr/include/pybind11/detail/common.h" cannot be read. >> Call Stack (most recent call first): >> CMakeLists.txt:201 (find_or_download_pybind11) >> >> >> CMake Error at src/cmake/externalpackages.cmake:546 (file): >> file STRINGS file "/usr/include/pybind11/detail/common.h" cannot be read. >> Call Stack (most recent call first): >> CMakeLists.txt:201 (find_or_download_pybind11) >> >> >> -- pybind11 4.4, include dir: /usr/include >> >> ... >> Makefile:367: recipe for target 'cmakesetup' failed >> make: *** [cmakesetup] Error 1 >> >> It looks like it's checking >> /usr/include/pybind11/detail/common.h >> but mine doesn't live in "detail" >> svhwan@DESKTOP-QM6M9UR:/usr$ ls /usr/include/pybind11/detail >> ls: cannot access '/usr/include/pybind11/detail': No such file or directory >> svhwan@DESKTOP-QM6M9UR:/usr$ ls /usr/include/pybind11/common.h >> /usr/include/pybind11/common.h >> >> >> >> On Sun, Jan 13, 2019 at 5:13 PM Larry Gritz <[email protected] >> <mailto:[email protected]>> wrote: >> Steve, if you have the time, can you try: >> >> 1. rm -rf ext/pybind11 >> 2. Download and apply this patch: >> https://github.com/OpenImageIO/oiio/pull/2144 >> <https://github.com/OpenImageIO/oiio/pull/2144> >> 3. Verify that (a) the log shows it gave a warning about your system install >> is too old and (b) then downloads the right version and completes the build? >> >> >> >>> On Jan 13, 2019, at 4:21 PM, Larry Gritz <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> Scratch that. v2.2.0 is the earliest tagged release of pybind11 that works >>> with OIIO 2.0+. >>> >>> >>>> On Jan 13, 2019, at 4:18 PM, Larry Gritz <[email protected] >>>> <mailto:[email protected]>> wrote: >>>> >>>> Yeah, looks like pybind11 v2.1.0 is the minimum it needs. I'll put a check >>>> for that in our build scripts. >>>> >>>> -- lg >>>> >>> >>> -- >>> Larry Gritz >>> [email protected] <mailto:[email protected]> >>> >>> >>> >>> >>> _______________________________________________ >>> Oiio-dev mailing list >>> [email protected] <mailto:[email protected]> >>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >> -- >> Larry Gritz >> [email protected] <mailto:[email protected]> >> >> >> >> >> _______________________________________________ >> Oiio-dev mailing list >> [email protected] <mailto:[email protected]> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >> _______________________________________________ >> Oiio-dev mailing list >> [email protected] <mailto:[email protected]> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > -- > Larry Gritz > [email protected] <mailto:[email protected]> > > > > > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected]
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
