Bug 247941 - cad/freecad: Fails to run: Shared object "libopenblasp-r0.3.7.so" not found, required by "_multiarray_umath.so"
Summary: cad/freecad: Fails to run: Shared object "libopenblasp-r0.3.7.so" not found, ...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Christoph Moench-Tegeder
URL:
Keywords: needs-qa, regression
Depends on:
Blocks:
 
Reported: 2020-07-12 23:57 UTC by a.parseg
Modified: 2020-07-13 15:18 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback? (sunpoet)
koobs: maintainer-feedback? (cmt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description a.parseg 2020-07-12 23:57:27 UTC
Running FreeCAD, when trying to call up the Path workbench, an error notification appears and the workbench is not shown/is empty. 

FreeCAD itself continues to run. 

Further attempts at accessing the workbench within the same session will not repeat the warning, but the workbench will remain emtpy.

The error is reported as such:

---8<---
Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.7 from "/usr/local/bin/FreeCAD",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.3" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: Shared object "libopenblasp-r0.3.7.so" not found, required by "_multiarray_umath.so"

Traceback (most recent call last):
  File "<string>", line 74, in Initialize
  File "/usr/local/FreeCAD/Mod/Path/PathCommands.py", line 30, in <module>
    from PathScripts.PathUtils import loopdetect
  File "/usr/local/FreeCAD/Mod/Path/PathScripts/PathUtils.py", line 33, in <module>
    import numpy
  File "/home/alexisp/.local/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/home/alexisp/.local/lib/python3.7/site-packages/numpy/core/__init__.py", line 54, in <module>
    raise ImportError(msg)
--->8---

Note the "original error" with libopenblasp-r0.3.7.so not found.

System is running 12.1-RELEASE-p5 GENERIC amd64.

Issue initially noticed with "latest" packages as of 2020-07-12, so FreeCAD 0.18.4_9 and py37-numpy 1.16.6,1.

Tried recompiling cad/FreeCAD from ports, then recompiling math/py-numpy as well, both with default options, to no effect.

The library itself is present on the system with a more recent version:
package openblas-0.3.9_2,1, file /usr/local/lib/libopenblasp-r0.3.9.so
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-07-13 03:44:00 UTC
^Triage: numpy updated in ports r535462 via bug 246395, request feedback from committer
Comment 2 Christoph Moench-Tegeder freebsd_committer 2020-07-13 11:23:17 UTC
(In reply to a.parseg from comment #0)

There's something fishy going on: the error message mentions 'Python and numpy version "1.18.3"', but ports only has numpy 1.16.6 (as you mentioned yourself). Additionally, _multiarray_umath.so from ports' numpy has no (obvious) dependency against libopenblasp, and I cannot reproduce that error. That makes me think that the error is not from ports' numpy but from some private installation.
So we're back at point 1 from the error message: "Check ... that you have no directories ... that can interfere with the Python and numpy".
math/openblas was updated from 0.3.7 to 0.3.9 in ports r534154 on May 6th, and openblas 0.3.7 came with ports r523749 in January. Upstream numpy released 1.18.3 on April 19th and 1.18.4 on May 3rd. That locates your "private" numpy (if it exists) installation date to the end of April or first days of May - perhaps you can remember your changes in that timeframe or find(1) the files.
Comment 3 Christoph Moench-Tegeder freebsd_committer 2020-07-13 11:26:29 UTC
(In reply to Christoph Moench-Tegeder from comment #2)

Of course: the error message has all the details we need:
  /home/alexisp/.local/lib/python3.7/site-packages/numpy/__init__.py

There's your local numpy, that's the broken one.
Comment 4 Christoph Moench-Tegeder freebsd_committer 2020-07-13 11:30:30 UTC
Closing as this is not a ports issue.
Comment 5 Po-Chuan Hsieh freebsd_committer 2020-07-13 15:18:19 UTC
Remove bug 246395 from "See Also" as it is unrelated.