bryanibit / LatticePlannerWithFrenet

Achieve planning in frenet coordination with CPP
8 stars 4 forks source link

build error #1

Open feiyuxiaoThu opened 1 year ago

feiyuxiaoThu commented 1 year ago

Dear authors, I have several problems when reproducing your results using your code.

os system: ubuntu 20.04 cmake results okay:

-- The C compiler identification is GNU 11.1.0 -- The CXX compiler identification is GNU 7.5.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.17", minimum required is "2.7") /usr/include/python2.7 -- Configuring done -- Generating done

while the make command meets with errors:

cc1plus: fatal error: CMakeFiles/frenet.dir/src/Frenet_path.cpp.d: No such file or directory compilation terminated. CMakeFiles/frenet.dir/build.make:75: recipe for target 'CMakeFiles/frenet.dir/src/Frenet_path.cpp.o' failed make[2]: *** [CMakeFiles/frenet.dir/src/Frenet_path.cpp.o] Error 1 CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/frenet.dir/all' failed make[1]: *** [CMakeFiles/frenet.dir/all] Error 2 Makefile:90: recipe for target 'all' failed make: *** [all] Error 2

bryanibit commented 1 year ago

I use Ubuntu 20.04.4 LTS. I change 2.7 to 3.8 for python version in CMakeLists.txt. Your compiler shows ambiguous results. You can add CMAKE_BUILD_TYPE to "Debug" in CMakeLists.txt. The following shows mine:

-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr/local (found suitable version "3.4.15", minimum required is "3.3.1") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version "3.8.10", minimum required is "3.8") 
/usr/include/python3.8
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bryan/project/LatticePlannerWithFrenet/build
bryanibit commented 1 year ago

Your cmake .. command shows too few results. No result for OpenCV at least.

feiyuxiaoThu commented 1 year ago

Thanks for your quick reply. My debug info for cmake goes as follows:

cmake .. -D CMAKE_BUILD_TYPE="Debug" -- The C compiler identification is GNU 11.1.0 -- The CXX compiler identification is GNU 7.5.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenCV: /usr/local (found suitable version "3.4.16", minimum required is "3.3.1") -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.17", minimum required is "2.7") /usr/include/python2.7 -- Configuring done -- Generating done -- Build files have been written to: /home/feiyuxiao/Documents/github/LatticePlannerWithFrenet/build

However, when I run make command:

cc1plus: fatal error: 3.d: No such file or directory compilation terminated. CMakeFiles/frenet.dir/build.make:75: recipe for target 'CMakeFiles/frenet.dir/src/Frenet_path.cpp.o' failed make[2]: *** [CMakeFiles/frenet.dir/src/Frenet_path.cpp.o] Error 1 CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/frenet.dir/all' failed make[1]: *** [CMakeFiles/frenet.dir/all] Error 2 Makefile:90: recipe for target 'all' failed make: *** [all] Error 2

feiyuxiaoThu commented 1 year ago

It seems my cmake config is okay, while the code buiding process meets with some errors.

bryanibit commented 1 year ago

Have you solved the build error? Your cmake command shows that OpenCV and others have been found. However, 3.d no such file I can not understand that because the project has no this file. Or you can try build Frenet_path.cpp and cubic_spline.cpp to shared libraries and link two libraries to main.cpp.