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

Issue installing required package/software "ray_casting" #8

Open
troiwill opened this issue May 27, 2021 · 3 comments
Open

Issue installing required package/software "ray_casting" #8

troiwill opened this issue May 27, 2021 · 3 comments

Comments

@troiwill
Copy link

I followed the instructions to install ray_casting software. But there is an issue when running make -j8.

First, the make process fails because the file <catch2/catch.hpp> does not exist (this file is referenced in the test raycasting CPP file). I noticed that there is a file called <catch2/catch_all.hpp> instead. Therefore, I changed the <catch2/catch.hpp> to <catch2/catch_all.hpp>, which seemed to resolve the issue.

Now, there is the following issue once I re-run make -j8:

[ 75%] Linking CXX executable test_ray_tracing
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/test_ray_tracing.dir/build.make:85: test_ray_tracing] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/test_ray_tracing.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Can someone help in resolving this problem?

@outlier750
Copy link

Hi @troiwill
by any chance did you find a solution? It seems that we are many people to have this problem (acschaefer/ray_tracing#5 )

FYI @gege3107

@troiwill
Copy link
Author

I did solve the issue some time ago. But I do not remember the exact steps. Hopefully, these steps help you get further @gege3107:

  • Create a python virtual environment via virtualenv or conda. I do not remember the Python version used. But the environment should have the following requirements:
cmake
tk
numpy
matplotlib
open3d-python
progressbar2
pyquaternion
transforms3d
scipy
scikit-image
networkx
psutil
  • Clone the ray_tracing repository, add change the following lines in the CMakeLists.txt file:
# This should point to the python virtual environment you just created (specifically the python executable).
set(PYTHON_EXECUTABLE /usr/bin/python)

# Comment these lines.
add_executable(test_ray_tracing cpp/test_ray_tracing.cpp)
target_link_libraries(test_ray_tracing Catch2::Catch2)

# Comment these lines as well.
enable_testing()
add_test(
    NAME test_cpp_implementation
    COMMAND test_ray_tracing)
add_test(
    NAME test_python_implementation
    COMMAND python -m pytest ${CMAKE_SOURCE_DIR}/python/test_raytracing.py)

In the cpp/test_ray_tracing.cpp file, use #include <catch2/catch_all.hpp> instead of #include <catch2/catch.hpp>.

This might be most, if not all, of what you need to compile.

@genevieve-le-houx
Copy link

I still have the issue

Error copying file "/home/gee/polex/ray_tracing/build/ray_tracing_python.so" to "/home/gee/polex/ray_tracing/python/raytracing/ray_tracing_python.so".

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

3 participants