polex
polex copied to clipboard
Issue installing required package/software "ray_casting"
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?
Hi @troiwill by any chance did you find a solution? It seems that we are many people to have this problem (https://github.com/acschaefer/ray_tracing/issues/5 )
FYI @gege3107
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
orconda
. 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 theCMakeLists.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.
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".