Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 797700 - media-gfx/freecad-0.19.2-r2 ModuleNotFoundError: No module named 'mpi4py'
Summary: media-gfx/freecad-0.19.2-r2 ModuleNotFoundError: No module named 'mpi4py'
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Bernd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-23 02:18 UTC by Alessandro Barbieri
Modified: 2022-12-21 07:31 UTC (History)
6 users (show)

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


Attachments
emerge_info (emerge_info,34.99 KB, text/plain)
2021-06-23 02:18 UTC, Alessandro Barbieri
Details
freecad-0.19.2-r2:20210623-011716.log (freecad-0.19.2-r2:20210623-011716.log,13.00 KB, text/plain)
2021-06-23 02:18 UTC, Alessandro Barbieri
Details
mypatches.txt (mypatches.txt,1.71 KB, text/plain)
2021-07-11 11:15 UTC, Alessandro Barbieri
Details
freecad-0.19.2-r3:20210714-081702.log (freecad-0.19.2-r3:20210714-081702.log,12.98 KB, text/plain)
2021-07-14 08:21 UTC, Alessandro Barbieri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2021-06-23 02:18:37 UTC
This package fails to build on an unstable system. Attached relevant logs and emerge --info
Comment 1 Alessandro Barbieri 2021-06-23 02:18:50 UTC
Created attachment 717798 [details]
emerge_info

emerge --info
Comment 2 Alessandro Barbieri 2021-06-23 02:18:51 UTC
Created attachment 717801 [details]
freecad-0.19.2-r2:20210623-011716.log

build log
Comment 3 Bernd 2021-06-23 10:24:21 UTC
This is probably due to using the general find_package call in [1] with vtk-9. The path which looks for specific components[2] doesn't work with vtk-9 any more, because the VTK_MODULES_ENABLED variable is no longer in use, but there is a VTK_AVAILABLE_COMPONENTS exported instead in vtk-config.cmake.

I had this on my list when doing the latest bump, but then avoided the patch, because I couldn't find any issues, when the alternate path with the general find_package call without components was used.

Thanks for the report. I'm going to test my assumption and report upstream, if I find it's correct.
Comment 5 Marco Scardovi (scardracs) 2021-06-24 00:34:14 UTC
*** Bug 798063 has been marked as a duplicate of this bug. ***
Comment 6 Bernd 2021-06-24 08:59:37 UTC
While trying to reproduce this, I came about bug #794031.
I wonder, how you managed to get this far as to be able to emerge freecad with opencascade-7.5.1 while using vtk-9.
Comment 7 Bernd 2021-07-11 10:18:28 UTC
It this still happening with current versions (occ-7.5.2, vtk-9.0.1, freecad-0.19.2-r3)? I can not reproduce this in my test environment.

Although the assumptions in my comment #3 seem to be true, vtk-9 is still being correctly detected with the general find_package command, i.e. without specified components and with mpi4py *not* being installed.

To me it looks, like already said in comment #6, that you have patched opencascade-7.5.1 yourself with the patch from bug #794031, because your report dates a day before support for vtk-9 has been merged into the tree, and thus were using a non-official and untested combination of packages. If so, please refrain from doing so in the future and verify failures in an environment which uses official package versions only.

I'm closing this and ask you to test again with current versions. Feel free to re-open the bug if the issue persists.
Comment 8 Alessandro Barbieri 2021-07-11 10:32:05 UTC
(In reply to Bernd from comment #7)
> To me it looks, like already said in comment #6, that you have patched
> opencascade-7.5.1 yourself with the patch from bug #794031

nope, look at the build log, no user patches applied
Comment 9 Bernd 2021-07-11 10:53:23 UTC
For the issue from comment #3, I opened a topic in the forum: https://forum.freecadweb.org/viewtopic.php?f=4&t=60068
Comment 10 Bernd 2021-07-11 10:53:40 UTC
(In reply to Alessandro Barbieri from comment #8)
> (In reply to Bernd from comment #7)
> > To me it looks, like already said in comment #6, that you have patched
> > opencascade-7.5.1 yourself with the patch from bug #794031
> 
> nope, look at the build log, no user patches applied

A user patch on opencascade-7.5.1, not freecad.
Comment 11 Alessandro Barbieri 2021-07-11 11:15:24 UTC
Created attachment 723250 [details]
mypatches.txt

my patches
Comment 12 Bernd 2021-07-11 11:31:10 UTC
Please, please, don't waste our time by posting your patches. I'm not accusing you of any mistake, and you don't need to defend yourself. I am not attacking you, but only wondering how you were able to build opencascade-7.5.1 against vtk-9 without the patch from bug #794031 being applied. According to that bug, this shouldn't have been possible.

But this isn't a bug about OCCT, but about FreeCAD. So, please test, whether the issue still persists or can stay as resolved.
Comment 13 Alessandro Barbieri 2021-07-14 08:21:50 UTC
Created attachment 723805 [details]
freecad-0.19.2-r3:20210714-081702.log

build log
Comment 14 Alessandro Barbieri 2021-07-14 08:27:04 UTC
I still have the failure. Should I reopen?

-- Found Python3: /usr/bin/python3.10 (found version "3.10.0") found components: Interpreter 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'mpi4py'
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find mpi4py (missing: mpi4py_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/lib64/cmake/vtk-9.0/Findmpi4py.cmake:28 (find_package_handle_standard_args)
  /usr/lib64/cmake/vtk-9.0/VTK-vtk-module-find-packages.cmake:303 (find_package)
  /usr/lib64/cmake/vtk-9.0/vtk-config.cmake:131 (include)
  cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake:45 (find_package)
  CMakeLists.txt:53 (SetupSalomeSMESH)

I suspect it's searching mpi4py with the python3.10 implementation but mpi4py is only installed with python3.8 and Python3.9
Comment 15 Bernd 2021-07-14 19:16:40 UTC
(In reply to Alessandro Barbieri from comment #14)
> 
> I suspect it's searching mpi4py with the python3.10 implementation but
> mpi4py is only installed with python3.8 and Python3.9

I agree. VTK only sets the python major version when searching for an available python interpreter in vtk-config.cmake. Do you have python3.10 set as default python interpreter?
Comment 16 Alessandro Barbieri 2021-07-15 16:57:04 UTC
> Do you have python3.10 set
> as default python interpreter?

My python preferences (eselect python edit) currently are:

pypy3
python3.9
python3.8
Comment 17 Thomas Scheiblauer 2021-10-08 17:07:54 UTC
I renamed /usr/bin/python3.10 before emerging freecad and was able to build it without a problem. Renamed it back afterwards.
I know this is just a naive workaround, but cmake is obviously looking for the latest python binary regardless of what is set as system python using eselect because my system python is 3.9.
Comment 18 Bernd 2021-10-21 06:08:22 UTC
The error happened today for me when I was preparing a bump for opencascade-7.5.3, although it didn't result in a failed configure phase. The error, however, was emitted by usr/lib64/cmake/vtk-9.0/vtkm/cmake/FindMPI.cmake:1695 (find_package_handle_standard_args), so from a different module inside vtk.

Looking at that file, I'm wondering how it would even test for mpi4py, because the main loop only checks for ${LANG} C, CXX and Fortran as far as I can see.
Comment 19 Bernd 2022-12-21 07:31:05 UTC
0.19 is no longer in tree, so this has become obsolete. If the issue persists with 0.20, feel free to re-open.