mshr build

Issue #86 new
metallic_muffin created an issue

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)

  1. Benjamin Dam Kehlet

    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)

  2. Benjamin Dam Kehlet

    Do you know how the build directory is known to the python CMakeLists.txt? (Do they eg. set MSHR_DIR?)

  3. Benjamin Dam Kehlet

    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.

  4. Log in to comment