- changed title to mshr build
mshr build
I'm having troubles to correctly install mshr in Arch Linux. I've downloaded and installed the package python-mshr-git from the AUR. However, when running a Python code for FEniCS, I get the message "from mshr import * ModuleNotFoundError: No module named 'mshr' ".
After seeking help with the Arch Linux people, I've been told to report the bug here on Bitbucket with the following message: "Please update the python CMakeLists.txt so it can detect the libmshr" from the build directory, so that the python bindings can be built at the same time as mshr."
Comments (5)
-
reporter -
Ok strange. A mshr-config.cmake file is already generatee in the build directory that points to libmshr in the build directory, but maybe something is not working as it should. I'll take a look.
Is there a simple for you to test if it works without going through the Arch repository? (I don't know anything about Arch Linux)
-
Do you know how the build directory is known to the python CMakeLists.txt? (Do they eg. set MSHR_DIR?)
-
reporter Unfortunately I don't know these details. I've been helped and could build (and install) successfully mshr. The fix was to modify the following pkgbuild: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-mshr-git to that one: https://bbs.archlinux.org/viewtopic.php?id=234373 (see post
#5).Does this help to track the bug?
-
Thanks for the link. The PYTHON_EXECUTABLE that they mention looks suspicious. They are right that the library and the python bindings are now built independently, ie. this part now looks correct
cmake .. \ -DCMAKE_INSTALL_PREFIX="${pkg}"/usr \ -DPYTHON_EXECUTABLE="${py_interp}" \ -DCMAKE_SKIP_BUILD_RPATH=TRUE \ -DCMAKE_SKIP_RPATH=TRUE \ -DCMAKE_BUILD_TYPE="Release" make cd ../python export CMAKE_MODULE_PATH="${srcdir}/mshr/build/" python setup.py build
but maybe it should be stated more clearly in the docs. This is also new since the swig based bindings were replaced by the pybind11 based ones.
- Log in to comment