Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 794499 - media-gfx/blender-2.83.12 fatal error: numpy/ndarrayobject.h: No such file or directory
Summary: media-gfx/blender-2.83.12 fatal error: numpy/ndarrayobject.h: No such file or...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Adrian
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-06 01:31 UTC by gangstervano@yandex.ru
Modified: 2021-06-07 21:01 UTC (History)
3 users (show)

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


Attachments
build.log (build.log.xz,36.55 KB, application/x-xz)
2021-06-06 01:31 UTC, gangstervano@yandex.ru
Details
emerge -pv --info blender (emerge.blender.txt,16.30 KB, text/plain)
2021-06-06 01:33 UTC, gangstervano@yandex.ru
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gangstervano@yandex.ru 2021-06-06 01:31:21 UTC
Created attachment 713850 [details]
build.log

Hi,

I can't install blender.

FAILED: extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DNDEBUG -DWITH_OPENGL -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -Iextern/audaspace -I/var/tmp/portage/media-gfx/blender-2.83.12/work/blender-2.83.12/extern/audaspace/include -I/usr/include/python3.8 -I/var/tmp/portage/media-gfx/blender-2.83.12/work/blender-2.83.12/extern/audaspace/PYTHON_NUMPY_PATH-NOTFOUND/numpy/core/include -I/usr/include/SDL2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits  -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith    -Wformat-signedness -Wrestrict -Wuninitialized   -Wimplicit-fallthrough=5 -march=core-avx-i -O2 -pipe -funsigned-char -fuse-ld=gold -fopenmp -std=c++11   -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -msse2  -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-function -Wno-type-limits -Wno-int-in-bool-context -Wno-format -Wno-switch -Wno-implicit-fallthrough -Wno-error=unused-but-set-variable  -Wno-class-memaccess -Wno-comment -Wno-unused-local-typedefs -MD -MT extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o -MF extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o.d -o extern/audaspace/CMakeFiles/audaspace-py.dir/bindings/python/PySound.cpp.o -c /var/tmp/portage/media-gfx/blender-2.83.12/work/blender-2.83.12/extern/audaspace/bindings/python/PySound.cpp
cc1plus: warning: /var/tmp/portage/media-gfx/blender-2.83.12/work/blender-2.83.12/extern/audaspace/PYTHON_NUMPY_PATH-NOTFOUND/numpy/core/include: No such file or directory [-Wmissing-include-dirs]
/var/tmp/portage/media-gfx/blender-2.83.12/work/blender-2.83.12/extern/audaspace/bindings/python/PySound.cpp:70:10: fatal error: numpy/ndarrayobject.h: No such file or directory
   70 | #include <numpy/ndarrayobject.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Comment 1 gangstervano@yandex.ru 2021-06-06 01:33:25 UTC
Created attachment 713853 [details]
emerge -pv --info blender

emerge -pv --info blender
Comment 2 gangstervano@yandex.ru 2021-06-06 11:26:34 UTC
The file exist

ls -l  /usr/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h
-rw-r--r-- 1 root root 10688 мар 17 09:16 /usr/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h
Comment 3 Ionen Wolkens gentoo-dev 2021-06-06 12:23:12 UTC
Cross-linking for reference:
https://forums.gentoo.org/viewtopic-t-1136751.html
Comment 4 Bernd 2021-06-06 13:42:00 UTC
I can not reproduce this.
If I use your USE flag settings, I get the output
`-- numpy found at '/usr/lib/python3.8/site-packages'`

Could you please try `import numpy` in a python3.8 shell and see if that works?
If this works, could you then please post the output of `grep PYTHON <BUILD_DIR>/CMakeCache.txt`? Replace <BUILD_DIR> with the actual build dir.
Thanks!
Comment 5 gangstervano@yandex.ru 2021-06-06 15:02:56 UTC
Please specify what needs to be done? Enter python3. 8 and then >>> import numpy? If so, it didn't help.


  Python package 'numpy' path could not be found in:

  '/usr/lib64/python3.8/site-packages/numpy',
  '/usr/lib64/python3/site-packages/numpy',
  '/usr/lib64/python3.8/dist-packages/numpy',
  '/usr/lib64/python3/dist-packages/numpy',
  '/usr/lib64/python3.8/vendor-packages/numpy',
  '/usr/lib64/python3/vendor-packages/numpy',

grep PYTHON /var/tmp/portage/media-gfx/blender-2.83.12/work/blender-2.83.12_build/CMakeCache.txt

PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.8
PYTHON_INCLUDE_CONFIG_DIR:PATH=/usr/include/python3.8
PYTHON_INCLUDE_DIR:UNINITIALIZED=/usr/include/python3.8
PYTHON_LIBPATH:PATH=/usr/lib64
PYTHON_LIBRARY:UNINITIALIZED=/usr/lib64/libpython3.8.so
PYTHON_LINKFLAGS:STRING=-Xlinker -export-dynamic
PYTHON_NUMPY_INCLUDE_DIRS:PATH=PYTHON_NUMPY_PATH-NOTFOUND/numpy/core/include
PYTHON_NUMPY_PATH:PATH=PYTHON_NUMPY_PATH-NOTFOUND
PYTHON_SITE_PACKAGES:FILEPATH=/usr/lib64/python3.8/site-packages
PYTHON_VERSION:STRING=3.8
WITH_PYTHON:BOOL=ON
WITH_PYTHON_INSTALL:BOOL=OFF
WITH_PYTHON_INSTALL_NUMPY:UNINITIALIZED=OFF
// only enable for development), installs to PYTHON_SITE_PACKAGES
WITH_PYTHON_MODULE:BOOL=OFF
WITH_PYTHON_SAFETY:BOOL=OFF
WITH_PYTHON_SECURITY:BOOL=ON
//ADVANCED property for variable: PYTHON_EXECUTABLE
PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_INCLUDE_CONFIG_DIR
PYTHON_INCLUDE_CONFIG_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_INCLUDE_DIR
PYTHON_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_LIBPATH
PYTHON_LIBPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_LIBRARY
PYTHON_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_LINKFLAGS
PYTHON_LINKFLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_NUMPY_INCLUDE_DIRS
PYTHON_NUMPY_INCLUDE_DIRS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_SITE_PACKAGES
PYTHON_SITE_PACKAGES-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_VERSION
PYTHON_VERSION-ADVANCED:INTERNAL=1
//ADVANCED property for variable: WITH_PYTHON
WITH_PYTHON-ADVANCED:INTERNAL=1
//ADVANCED property for variable: WITH_PYTHON_SAFETY
WITH_PYTHON_SAFETY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: WITH_PYTHON_SECURITY
WITH_PYTHON_SECURITY-ADVANCED:INTERNAL=1

I think that problem is 
PYTHON_NUMPY_INCLUDE_DIRS:PATH=PYTHON_NUMPY_PATH-NOTFOUND/numpy/core/include
?
Comment 6 gangstervano@yandex.ru 2021-06-06 15:57:10 UTC
It helped me:

In 
/var/tmp/portage/media-gfx/blender-2.83.12/work/blender-2.83.12/build_files/cmake/macros.cmake -> function(find_python_package  package) - > find_path(PYTHON_${_upper_package}_PATH

add HINTS  "/usr/lib/python${PYTHON_VERSION}"

It turns out:

  find_path(PYTHON_${_upper_package}_PATH
      NAMES
        ${package}
      HINTS
        "${PYTHON_LIBPATH}/"
        "${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
        "${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
        "/usr/lib/python${PYTHON_VERSION}"
      PATH_SUFFIXES
        site-packages
        dist-packages
        vendor-packages
       NO_DEFAULT_PATH
    )
Comment 7 Bernd 2021-06-07 19:22:23 UTC
(In reply to gangstervano@yandex.ru from comment #5)
> Please specify what needs to be done? Enter python3. 8 and then >>> import
> numpy? If so, it didn't help.

Yes, that's what I meant. Did it give you any message, or just completed without any output?

> grep PYTHON
> /var/tmp/portage/media-gfx/blender-2.83.12/work/blender-2.83.12_build/
> CMakeCache.txt
> 
> PYTHON_LIBPATH:PATH=/usr/lib64
> PYTHON_NUMPY_INCLUDE_DIRS:PATH=PYTHON_NUMPY_PATH-NOTFOUND/numpy/core/include
> PYTHON_NUMPY_PATH:PATH=PYTHON_NUMPY_PATH-NOTFOUND
> PYTHON_SITE_PACKAGES:FILEPATH=/usr/lib64/python3.8/site-packages

Those are the relevant variables. PYTHON_LIBPATH is wrong, it should be /usr/lib, that's why the other three get either wrong (SITE_PACKAGES) or NOTFOUND.

Eventually this variable should be passed from the ebuild.

Could you please test for a file abc.py in /usr/lib64? Try `find /usr/lib64 -name abc.py` and post the output.
Comment 8 gangstervano@yandex.ru 2021-06-07 20:38:30 UTC
> Yes, that's what I meant. Did it give you any message, or just completed 
> without any output?

They just completed without any output.

> Could you please test for a file abc.py in /usr/lib64? Try `find /usr/lib64 
> -name abc.py` and post the output.


Unfortunately, my portage is broken, when trying to roll back the transition to profile 17.1. I had two folders

I had the following folders.


lrwxrwxrwx   1 root root          7 ноя  7  2020 /lib -> lib.new
drwxr-xr-x  15 root root      12288 июн  5 07:37 /lib64
drwxr-xr-x  10 root root       4096 июн  5 06:32 /lib.new

On the forum, I was told that this is an abnormal situation and that apparently this problem was caused by the migration to a new profile.

In the backups that I have saved, this file is not present, but the backup was made after the rollback attempt :(

They are only in the /usr/lib64.

find . -iname 'abc.py'
./usr/lib64/python3.8/importlib/abc.py
./usr/lib64/python3.8/abc.py
./usr/lib64/python3.8/test/test_importlib/abc.py
./usr/lib64/python3.8/collections/abc.py
./usr/lib64/python2.7/abc.py
Comment 9 Bernd 2021-06-07 21:01:46 UTC
Looks like this is the cause of the build failure. The file build_files/cmake/Modules/FindPythonLibsUnix.cmake looks for the file abc.py to get the value of PYTHON_LIBPATH and thus get's a wrong path. 

Your Gentoo is in a serious degraded state, which eventually can lead to other build failures as well. I advise you to fix this ASAP. If you need help, please try the forum or ask on the #gentoo channel on IRC. If the bug persists AFTER you have migrated to 17.1 or successfully rolled back to 17.0, feel free to reopen the bug. I'm gonna close it now to save the resources of the maintainer.