Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 788886 - media-gfx/openvdb-7.1.0-r1 USE=numpy: Could NOT find NumPy (Required is at least version "1.12.1")
Summary: media-gfx/openvdb-7.1.0-r1 USE=numpy: Could NOT find NumPy (Required is at le...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Adrian
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2021-05-08 10:01 UTC by Alessandro Barbieri
Modified: 2021-10-31 02:26 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge_info (emerge_info,41.07 KB, text/plain)
2021-05-08 10:01 UTC, Alessandro Barbieri
Details
openvdb-7.1.0-r1:20210508-082801.log (openvdb-7.1.0-r1:20210508-082801.log,7.84 KB, text/plain)
2021-05-08 10:01 UTC, Alessandro Barbieri
Details
openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch (openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch,1005 bytes, patch)
2021-10-28 09:46 UTC, Bernd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2021-05-08 10:01:40 UTC
This package fails to compile on an unstable system. Attached relevant logs and emerge --info
Comment 1 Alessandro Barbieri 2021-05-08 10:01:53 UTC
Created attachment 706611 [details]
emerge_info

emerge --info
Comment 2 Alessandro Barbieri 2021-05-08 10:01:55 UTC
Created attachment 706614 [details]
openvdb-7.1.0-r1:20210508-082801.log

build log
Comment 3 Alessandro Barbieri 2021-05-08 10:04:22 UTC
I can reproduce it in my test chroot
Comment 4 Bernd 2021-10-28 09:46:40 UTC
Created attachment 747030 [details, diff]
openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch

The same happened for me yesterday on my machine with 8.0.1-r1. Although the -DPython_EXECUTABLE=/usr/bin/python3.9 artifact is passed, their algorithms pick up the latest installed python version, which is 3.10 in my case.

However, the cmake documentation tells "To ensure consistent versions between components Interpreter, Compiler, Development (or one of its sub-components) and NumPy, specify all components at the same time"[1], which is not true for their find_package call to NumPy which tells to look only for the NumPy component.

So adding the patch and additionally adding a line -DPython_INCLUDE_DIR="$(python_get_includedir)" to the ebuild solves this for me. Why the latter is needed, I couldn't find out, but without specifying this additional artifact the patch alone doesn't work. Also specifying only the artifact without the patch didn't work. Both seem to be needed.

[1] https://cmake.org/cmake/help/v3.21/module/FindPython.html
Comment 5 Bernd 2021-10-28 10:41:12 UTC
For 7.1.0 the situation is a little different. They use the old Find_Python{Interp,Libs} modules and a custom FindNumPy.cmake module when looking for python and numpy.

Here additionally passing -DPython_INCLUDE_DIR and -DPython_LIBRARY helps to solve the issue.
Comment 6 Larry the Git Cow gentoo-dev 2021-10-31 02:19:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09efbdab3e99c0ae7c984dbffd0dc388aaa05d92

commit 09efbdab3e99c0ae7c984dbffd0dc388aaa05d92
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2021-10-28 10:44:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-31 02:18:27 +0000

    media-gfx/openvdb: patch to find numpy
    
    - additionally pass -DPython_INCLUDE_DIR and -DPython_LIBRARY to help
            find numpy
    - remove flag-o-matic inherit, which isn't needed according to pkgcheck
    - change the negation of the utils USE flag use for building the utilities
            if the USE flag is set
    
    Closes: https://bugs.gentoo.org/788886
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Closes: https://github.com/gentoo/gentoo/pull/22738
    Signed-off-by: Sam James <sam@gentoo.org>

 media-gfx/openvdb/openvdb-7.1.0-r3.ebuild | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b44368f21076a1620b2bf87d0d358a41552fff05

commit b44368f21076a1620b2bf87d0d358a41552fff05
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2021-10-28 10:14:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-31 02:18:26 +0000

    media-gfx/openvdb: patch to find numpy
    
    - adds consistency in the find_package call for NumPy by adding the
            same components like in the find_package call for Python
    - additionally pass -DPython_INCLUDE_DIR to cmake
    - add an option for python unittests when USE=test is set
    - remove flag-o-matic inherit, which isn't needed according to pkgcheck
    - change the negation on the utils USE flag to build the utilities if
            the USE flag is set.
    
    Bug: https://bugs.gentoo.org/788886
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Signed-off-by: Sam James <sam@gentoo.org>

 ...dd-consistency-for-NumPy-find_package-call.patch | 21 +++++++++++++++++++++
 media-gfx/openvdb/openvdb-8.0.1-r2.ebuild           | 11 +++++++----
 2 files changed, 28 insertions(+), 4 deletions(-)