Closed BoBoINVICTUS closed 3 weeks ago
Try add message(FATAL_ERROR "PCL_ROOT is ${PCL_ROOT} and ENV PCL_ROOT is $ENV{PCL_ROOT}")
right before the find_package.
Also see if ...\PCL1.14.1\include\pcl-1.14\pcl\pcl_config.h
is present?
Do have PCL_ROOT as a system variable (the installer seems to set it) - what is it set to?
Do have PCL_ROOT as a system variable (the installer seems to set it) - what is it set to?
Do have PCL_ROOT as a system variable (the installer seems to set it) - what is it set to? When I use the code "set(PCL_ROOT "D:/PCL1.14.1")", the output is as follows: The previous error will still occur.
Try add:
message(" Looking for ${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h")
to D:\PCL1.14.1\cmake\PCLConfig.cmake below line 433 - ie just before it looks for the pcl_config.h file.
Seems it doesn't support having it installed on D or there are something about the paths and perhaps character settings, that makes cmake unable to verify that the file does exists.
Try add:
message(" Looking for ${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h")
to D:\PCL1.14.1\cmake\PCLConfig.cmake below line 433 - ie just before it looks for the pcl_config.h file.Seems it doesn't support having it installed on D or there are something about the paths and perhaps character settings, that makes cmake unable to verify that the file does exists.
Do you supply any arguments to the cmake call - it seems that PCL_ROOT is only set to D:\
.
Do you supply any arguments to the cmake call - it seems that PCL_ROOT is only set to
D:\
. I use VSCode to write the program, how do I write the command line, add arguments?
Can you show the full output from vscode in text?
Can you show the full output from vscode in text? [main] Configuring project: 点云配准_代码初稿1.0 [proc] Executing command: D:\cmake-3.24.2-windows-x86_64\bin\cmake.EXE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=D:\MinGw\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=D:\MinGw\bin\g++.exe --no-warn-unused-cli "-SD:/learning/Robotic-learning/机械臂控制书籍/点云配准从入门到精通/点云配准_代码初稿1.0/3.2 ISS关键点提取" -Bd:/learning/Robotic-learning/机械臂控制书籍/点云配准从入门到精通/点云配准_代码初稿1.0/build -G "MinGW Makefiles" [cmake] Not searching for unused variables given on the command line. [cmake] Looking for D://include/pcl-1.14/pcl/pcl_config.h [cmake] CMake Error at D:/PCL1.14.1/cmake/PCLConfig.cmake:59 (message): [cmake] PCL can not be found on this machine [cmake] Call Stack (most recent call first): [cmake] D:/PCL1.14.1/cmake/PCLConfig.cmake:453 (pcl_report_not_found) [cmake] CMakeLists.txt:10 (find_package) [cmake] [cmake] [cmake] -- Configuring incomplete, errors occurred! [cmake] See also "D:/learning/Robotic-learning/机械臂控制书籍/点云配准从入门到精通/点云配准_代码初稿1.0/build/CMakeFiles/CMakeOutput.log". [cmake] See also "D:/learning/Robotic-learning/机械臂控制书籍/点云配准从入门到精通/点云配准_代码初稿1.0/build/CMakeFiles/CMakeError.log". [proc] The command: D:\cmake-3.24.2-windows-x86_64\bin\cmake.EXE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=D:\MinGw\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=D:\MinGw\bin\g++.exe --no-warn-unused-cli "-SD:/learning/Robotic-learning/机械臂控制书籍/点云配准从入门到精通/点云配准_代码初稿1.0/3.2 ISS关键点提取" -Bd:/learning/Robotic-learning/机械臂控制书籍/点云配准从入门到精通/点云配准_代码初稿1.0/build -G "MinGW Makefiles" exited with code: 1
(base) PS D:\learning\Robotic-learning\机械臂控制书籍\点云配准从入门到精通\点云配准_代码初稿1.0\3.2 ISS关键点提取> cmake -D PCL_ROOT=D:/PCL1.14.1 . -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:3 (project): Running
'nmake' '-?'
failed with:
系统找不到指定的文件。
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "D:/learning/Robotic-learning/机械臂控制书籍/点云配准从入门到精通/点云配准_代码初稿1.0/3.2 ISS关键点提取/CMakeFiles/CMakeOutput.log
Mine looks like this:
Executing command: "C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -SC:/dev/iss_keypoints_extract -Bc:/dev/iss_keypoints_extract/build -G "Visual Studio 17 2022" -T host=x64 -A x64
And I just tried with VSCode and it works as well. I don't have MinGW, so that might be the reason.
Mine looks like this: Executing command:
"C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -SC:/dev/iss_keypoints_extract -Bc:/dev/iss_keypoints_extract/build -G "Visual Studio 17 2022" -T host=x64 -A x64
And I just tried with VSCode and it works as well. I don't have MinGW, so that might be the reason. I don't have Visual Studio installed on my computer. Is that why I can't compile?
No, its not. You should be able to do it with MinGW/GCC as well. I'm just not familiar with it or if it has any relevance. Somehow your PCL_ROOT gets changed or not set - can you try run, when you set it in your CmakeLists?
No, its not. You should be able to do it with MinGW/GCC as well. I'm just not familiar with it or if it has any relevance. Somehow your PCL_ROOT gets changed or not set - can you try run, when you set it in your CmakeLists? I set the PCL_ROOT in CMakeLists.txt, but it doesn't work.
No, its not. You should be able to do it with MinGW/GCC as well. I'm just not familiar with it or if it has any relevance. Somehow your PCL_ROOT gets changed or not set - can you try run, when you set it in your CmakeLists?
Maybe my PCL download is wrong? Instead of downloading "PCL-1.14.1-AllInOne-msvc2022-win64.exe", I should have installed it from source?
Do you use ?
Also try open Cmake Cache editor and look if there is a PCL_ROOT variable?
Do you use ?
Also try open Cmake Cache editor and look if there is a PCL_ROOT variable? I used delete cache and reconfigure, but the result is the same as before
There is no PCL_ROOT variable in CmakeCache.txt, but there is a PCL_DIR variable.
I think its this code that fails in the PCLConfig.cmake:
if(WIN32 AND NOT MINGW)
# PCLConfig.cmake is installed to PCL_ROOT/cmake
get_filename_component(PCL_ROOT "${PCL_DIR}" PATH)
if(EXISTS "${PCL_ROOT}/3rdParty")
set(PCL_ALL_IN_ONE_INSTALLER ON)
endif()
else()
# PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y
get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
endif()
Try remove the AND NOT MINGW
I think its this code that fails in the PCLConfig.cmake:
if(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/cmake get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) if(EXISTS "${PCL_ROOT}/3rdParty") set(PCL_ALL_IN_ONE_INSTALLER ON) endif() else() # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) endif()
Try remove the
AND NOT MINGW
When I remove the AND NOT MINGW, I get a new error:
I followed the same approach,remove the AND NOT MINGW
in PCLConfig.cmake:
if(WIN32 AND NOT "${BOOST_DEFINITIONS}" MATCHES "BOOST_ALL_NO_LIB") string(APPEND BOOST_DEFINITIONS -DBOOST_ALL_NO_LIB) endif()
That mistake still hasn't gone away.
Try add set(Boost_DEBUG ON)
in your cmake and clear cache and rerun. Odd that it doesn't find the libraries, when it does find the boostConfig.
Try add
set(Boost_DEBUG ON)
in your cmake and clear cache and rerun. Odd that it doesn't find the libraries, when it does find the boostConfig.
It's the same error, I look at the relevant path, it seems to find it, but it's still an error, I don't understand
Can you post the cmake output?
Which MinGW do you use - then I can try to replicate.
Which MinGW do you use - then I can try to replicate.
The cmake output is as follows:
CMake Warning (dev) at CMakeLists.txt:3 (find_package):
Policy CMP0074 is not set: find_package uses
Environment variable PCL_ROOT is set to:
D:\PCL1.14.1\
For compatibility, CMake is ignoring the variable. This warning is for project developers. Use -Wno-dev to suppress it.
Looking for D:/PCL1.14.1/include/pcl-1.14/pcl/pcl_config.h Could NOT find Boost: missing: system iostreams filesystem serialization (found D:/PCL1.14.1/3rdParty/Boost/lib/cmake/Boost-1.84.0/BoostConfig.cmake (found suitable version "1.84.0", minimum required is "1.65.0")) CMake Error at D:/PCL1.14.1/cmake/PCLConfig.cmake:59 (message): common is required but boost was not found Call Stack (most recent call first): D:/PCL1.14.1/cmake/PCLConfig.cmake:371 (pcl_report_not_found) D:/PCL1.14.1/cmake/PCLConfig.cmake:563 (find_external_library) CMakeLists.txt:3 (find_package)
MinGW version is: gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
Ahh The all-in-one installer is build using Visual studio, but you try to use MinGW, which is not supporting the usage of Visual studio build libraries.
You would need to build all dependencies from source, to make it work properly. Or use Visual studio community edition instead.
You could try to use VCPKG with MinGW - there all dependencies will be build using your local compiler.
Closing as it is not a bug in PCL per se - but a compiler / mixing of tools issue.
Feel free to add comments though 😄
Ahh The all-in-one installer is build using Visual studio, but you try to use MinGW, which is not supporting the usage of Visual studio build libraries.
You would need to build all dependencies from source, to make it work properly. Or use Visual studio community edition instead.
You could try to use VCPKG with MinGW - there all dependencies will be build using your local compiler.
If I want to install PCL from source, are there any installation instructions?
When I run the example program, I get an error:PCL can not be found on this machine,as shown here: My CMakeLists.txt file has the following contents: I tried to set PCL_ROOT and PCL_DIR, but it didn't work. My system is Windows 11 cmake version is 3.24.2 PCL version is 1.14.1 I also set the system environment variables:
Can you tell me what the problem is?