Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Error #1

Open
xfdywy opened this issue May 18, 2022 · 2 comments
Open

Make Error #1

xfdywy opened this issue May 18, 2022 · 2 comments

Comments

@xfdywy
Copy link

xfdywy commented May 18, 2022

Hi, is this project still maintained?

When I try to make the project, it raises an error. Could you please help me?

Ubuntu 18.04.6 LTS.
All dependences are installed.

Thanks!

[ 96%] Linking CXX executable unitTestBufferedLogger
[ 96%] Built target unitTestBufferedLogger
[ 98%] Linking CXX executable unitTestBoundaries
[100%] Linking CXX executable unitTestInterpolation
../lib/libcubismup3d.a(Simulation.cpp.o): In function `cubismup3d::Simulation::setupOperators()':
Simulation.cpp:(.text+0x42d9): undefined reference to `cubismup3d::StructureFunctions::StructureFunctions(cubismup3d::SimulationData&)'
collect2: error: ld returned 1 exit status
tests/CMakeFiles/unitTestBoundaries.dir/build.make:105: recipe for target 'tests/unitTestBoundaries' failed
make[2]: *** [tests/unitTestBoundaries] Error 1
CMakeFiles/Makefile2:242: recipe for target 'tests/CMakeFiles/unitTestBoundaries.dir/all' failed
make[1]: *** [tests/CMakeFiles/unitTestBoundaries.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
../lib/libcubismup3d.a(Simulation.cpp.o): In function `cubismup3d::Simulation::setupOperators()':
Simulation.cpp:(.text+0x42d9): undefined reference to `cubismup3d::StructureFunctions::StructureFunctions(cubismup3d::SimulationData&)'
collect2: error: ld returned 1 exit status
tests/CMakeFiles/unitTestInterpolation.dir/build.make:105: recipe for target 'tests/unitTestInterpolation' failed
make[2]: *** [tests/unitTestInterpolation] Error 1
CMakeFiles/Makefile2:166: recipe for target 'tests/CMakeFiles/unitTestInterpolation.dir/all' failed
make[1]: *** [tests/CMakeFiles/unitTestInterpolation.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

@xfdywy xfdywy changed the title make error Make Error May 18, 2022
@jamesgabbard
Copy link

Same issue, seems like HITfiltering.cpp was left out of the list of source files needed for the library. Fixed by adding

    ${ROOT_FOLDER}/source/operators/HITfiltering.cpp

after line 137 of the top level CMakeLists.txt file.

@xfdywy
Copy link
Author

xfdywy commented Aug 16, 2022

Thank you for your helpful information. I can build it now. But I still cannot run the program since the test procedure is failed.
Both ctest and pytest are failed.

Test project /root/CubismUP_3D/build
    Start 1: TestBoundaries
1/3 Test #1: TestBoundaries ...................***Failed    0.00 sec
    Start 2: TestInterpolation
2/3 Test #2: TestInterpolation ................***Failed    0.00 sec
    Start 3: TestBufferedLogger
3/3 Test #3: TestBufferedLogger ...............   Passed    0.00 sec

33% tests passed, 2 tests failed out of 3

Total Test time (real) =   0.01 sec

The following tests FAILED:
          1 - TestBoundaries (Failed)
          2 - TestInterpolation (Failed)
Errors while running CTest
=================================================================== test session starts ====================================================================
platform linux -- Python 3.9.12, pytest-3.8.0, py-1.11.0, pluggy-1.0.0
rootdir: /root/CubismUP_3D, inifile:
collected 0 items / 1 errors                                                                                                                               

========================================================================== ERRORS ==========================================================================
_____________________________________________________ ERROR collecting tests/python/test_obstacles.py ______________________________________________________
ImportError while importing test module '/root/CubismUP_3D/tests/python/test_obstacles.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../tests/python/test_obstacles.py:5: in <module>
    import cubismup3d as cup
E   ModuleNotFoundError: No module named 'cubismup3d'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================= 1 error in 0.05 seconds ==================================================================

Can you run the code? What should I do after I execute 'make'?

How can I import the library in python as in this line

import cubismup3d as cup

I am not familiar with the c++ and the build procedure. I try to build the program in my docker so that I can use the docker container without rebuild it next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants