Testing framework hits errors in building/finding 'capabilities' #31523
-
Check these boxes if you have followed the posting rules.
Issue or question about MOOSEOn building a MOOSE app (doesn't seem to matter which one) and executing the ./run_tests function, the testing framework seems to hit an error with building/importing 'capabilities'. This occurs on a fresh build attempt in CI on ubuntu-latest as well as on a fresh install on Debian 12. (Optional) code in question / simulation log / errors./run_tests
Building and linking /home/runner/moose/framework/contrib/capabilities/capabilities.so...
INFO: Building capabilities with "make capabilities" in /home/runner/moose/test
ERROR: Failed to import capabilities after building
Traceback (most recent call last):
File "/home/runner/moose/python/pycapabilities/__init__.py", line 13, in <module>
import capabilities
ModuleNotFoundError: No module named 'capabilities'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/moose/python/pycapabilities/__init__.py", line 18, in <module>
import capabilities
ImportError: /home/runner/moose/framework/contrib/capabilities/capabilities.so: undefined symbol: _ZN7libMesh8demangleB5cxx11EPKc
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/work/proteus/proteus/./run_tests", line 12, in <module>
TestHarness.buildAndRun(sys.argv, 'proteus', MOOSE_DIR)
File "/home/runner/moose/python/TestHarness/TestHarness.py", line 251, in buildAndRun
harness = TestHarness.build(argv, app_name, moose_dir, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/moose/python/TestHarness/TestHarness.py", line 247, in build
return TestHarness(argv, moose_dir, moose_python_dir, test_root)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/moose/python/TestHarness/TestHarness.py", line 337, in __init__
import pycapabilities
File "/home/runner/moose/python/pycapabilities/__init__.py", line 28, in <module>
import capabilities
ImportError: /home/runner/moose/framework/contrib/capabilities/capabilities.so: undefined symbol: _ZN7libMesh8demangleB5cxx11EPKc
Error: Process completed with exit code 1.Encountering Errors? Please include diagnostic outputNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
|
Hello you have to install that Python package. |
Beta Was this translation helpful? Give feedback.
-
|
I met the similar error. [/home/wang/projects/moose/framework/moose.mk:243: /home/wang/projects/moose/framework/c
ontrib/capabilities/capabilities.so] Error 1
make: *** Waiting for unfinished jobs....
make[1]: Entering directory '/home/wang/projects/moose/framework/contrib/hit'
Building hit for python with python3-config
mpicxx -std=c++17 -I/home/wang/miniforge/envs/moose/wasp/include -Iinclude -g -fvisibility-inlines
-hidden -fmessage-length=0 -fPIC -fstack-protector-strong -fno-plt -ffunction-sections -pipe -
isystem /home/wang/miniforge/envs/moose/include -std=c++17 src/hit/main.cc src/hit/parse.cc src/h
it/lex.cc src/hit/braceexpr.cc -o hit -Wl,-rpath,/home/wang/miniforge/envs/moose/wasp/lib -L/home/
wang/miniforge/envs/moose/wasp/lib -lwaspcore -lwaspddi -lwaspexpr -lwasphalite -lwasphit -lwasphi
ve -lwaspjson -lwasplsp -lwaspplot -lwaspsiren -lwaspsonFinally, I found the reason is the zsh config file. In the .zshrc file, If you are using oh-my-zsh, please set the |
Beta Was this translation helpful? Give feedback.
Ok the issue is that somebody put the libmesh libraries and link flags before the capability src files in the compilation/link line and on systems where the compiler/linker defaults to
--as-needed,libmesh_foo.sowill get dropped from the library link. I'll put up a fix shortly