thelfer / MFrontGenericInterfaceSupport

This project aims at providing support for MFront generic behaviours. This project can be embedded in open-source and propriary sofware
35 stars 34 forks source link

Installation error: Can't import mgis.behaviour #131

Closed JoepStorm closed 2 months ago

JoepStorm commented 2 months ago

I've installed MFront and MGis as follows (commands from inside the folder): Downloaded TFEL-4.2.0 -> cmake . -> sudo make -> sudo make install Downloaded MFrontGIS-2.2 -> cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/ -Denable-c-bindings=ON -Denable-fortran-bindings=OFF -Denable-python-bindings=ON -Denable-website=ON -DPython_ADDITIONAL_VERSIONS=3.10 -DPYTHON_EXECUTABLE=/usr/bin/python -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.10.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.10 -> sudo make -> sudo make install Added to .bashrc: export PYTHONPATH=/usr/local/lib/python3.10/site-packages/

These happen without any sign that something went wrong.

However, I believe something is wrong with the installation, as I get the following:

>>> import mgis.behaviour
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python3.10/site-packages/mgis/behaviour.so: undefined symbol: _ZN4mgis9behaviour25executeInitializeFunctionERNS_10ThreadPoolERNS0_19MaterialDataManagerESt17basic_string_viewIcSt11char_traitsIcEESt4spanIKdLm18446744073709551615EE

@thelfer do you know if this is an issue related to how I'm installing it?

thelfer commented 2 months ago

Hi @JoepStorm, Sorry for being slow to answer. I will try to have a look at your conda problem soon. I never add this issue. Could you tell me what system you are using ?

JoepStorm commented 2 months ago

No problem, I appreciate your work supporting this! I'm using Ubuntu 22.04.4 LTS

thelfer commented 2 months ago

I just tried to compile the master version of TFEL and MGIS after upgrading Ubuntu 22.04 LTS. Everything works fine. I tested 4.2 and MGIS on Ubuntu 22.04 LTS before the release, I am sure it works as expected. Strange..

thelfer commented 2 months ago

I used the following script (you must unzip it). You may want to comment the part relative to tfel-plot and tfel-editor install.zip

By default, everything is installed locally in $HOME/codes. To use mgis, you just have to do:

$ source $HOME/codes/mgis/master/install/env.sh
$ python3
>>> import mgis
JoepStorm commented 2 months ago

That works, I can now install the mgis modules. Thank you very much!