microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.75k stars 6.29k forks source link

PCL build failure #21327

Closed Jaime02 closed 2 years ago

Jaime02 commented 2 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install pcl

Failure logs

-- Building x86-windows-dbg
-- Building x86-windows-rel
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:155 (message):
    Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Release --target install -- -v -j17
    Working Directory: C:/Users/jaime/Desktop/vcpkg/buildtrees/pcl/x86-windows-rel
    See logs for more information:
      C:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\install-x86-windows-rel-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:102 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:41 (vcpkg_cmake_build)
  ports/pcl/portfile.cmake:60 (vcpkg_cmake_install)
  scripts/ports.cmake:142 (include)

Error: Building package pcl:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `git pull` and `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  package: pcl[core]:x86-windows -> 1.12.0
  vcpkg version: 2021-11-02-af04ebf6274fd6f7a941bff4662b3955c64f6f42
  vcpkg-tool version: de88cc55c 2021-11-10 (15 hours ago)

This are the last lines of the log:

[282/432] C:\PROGRA~1\MICROS~4\2022\Preview\VC\Tools\MSVC\1431~1.308\bin\Hostx64\x86\cl.exe   /TP -DBOOST_LIB_DIAGNOSTIC -DPCLAPI_EXPORTS -DUNICODE -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\x86-windows-rel\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\common\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\search\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\kdtree\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\octree\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\qhull\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\vtk\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\surface\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\surface -IC:\Users\jaime\Desktop\vcpkg\installed\x86-windows\include\eigen3 -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\recognition\include\pcl\recognition\3rdparty -IC:\Users\jaime\Desktop\vcpkg\installed\x86-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /FS -openmp -DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB /MD /O2 /Oi /Gy /DNDEBUG /Z7    -DBOOST_ALL_NO_LIB -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX -DPCL_ONLY_CORE_POINT_TYPES  -D__SSE4_2__ -D__SSE4_1__ -D__SSSE3__ -D__SSE3__ -D__SSE2__ -D__SSE__ /bigobj -openmp -std:c++14 /showIncludes /Fosurface\CMakeFiles\pcl_surface.dir\src\surfel_smoothing.cpp.obj /Fdsurface\CMakeFiles\pcl_surface.dir\ /FS -c C:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\surface\src\surfel_smoothing.cpp
[283/432] C:\PROGRA~1\MICROS~4\2022\Preview\VC\Tools\MSVC\1431~1.308\bin\Hostx64\x86\cl.exe   /TP -DBOOST_LIB_DIAGNOSTIC -DPCLAPI_EXPORTS -DUNICODE -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\x86-windows-rel\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\common\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\search\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\kdtree\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\octree\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\qhull\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\vtk\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\surface\include -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\surface -IC:\Users\jaime\Desktop\vcpkg\installed\x86-windows\include\eigen3 -IC:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\recognition\include\pcl\recognition\3rdparty -IC:\Users\jaime\Desktop\vcpkg\installed\x86-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /FS -openmp -DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB /MD /O2 /Oi /Gy /DNDEBUG /Z7    -DBOOST_ALL_NO_LIB -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX -DPCL_ONLY_CORE_POINT_TYPES  -D__SSE4_2__ -D__SSE4_1__ -D__SSSE3__ -D__SSE3__ -D__SSE2__ -D__SSE__ /bigobj -openmp -std:c++14 /showIncludes /Fosurface\CMakeFiles\pcl_surface.dir\src\mls.cpp.obj /Fdsurface\CMakeFiles\pcl_surface.dir\ /FS -c C:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\src\89d532cf08-fd49a85837.clean\surface\src\mls.cpp
ninja: build stopped: subcommand failed.

Additional context It seems like PCL library has a terrible installer

JonLiu1993 commented 2 years ago

@Jaime02 ,Thanks for posting this issue, could you please git pull the vcpkg and try again, I can install pcl successfully in my local machine:

-- Performing post-build validation done
Installing package pcl[core]:x86-windows...
Elapsed time for package pcl:x86-windows: 16.01 min

Total elapsed time: 27.17 min

The package pcl provides CMake targets:

    find_package(Modules CONFIG REQUIRED)
    target_link_libraries(main PRIVATE GLEW::GLEW FLANN::FLANN libusb::libusb)
Jaime02 commented 2 years ago

@JonLiu1993 thanks for answering. There is a warning in the building set up which says this:

-- Configuring x86-windows
CMake Warning at installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:485 (message):
  The following variables are not used in CMakeLists.txt:

      PCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32

  Please recheck them and remove the unnecessary options from the
  `vcpkg_cmake_configure` call.

  If these options should still be passed for whatever reason, please use the
  `MAYBE_UNUSED_VARIABLES` argument.
Call Stack (most recent call first):
  ports/pcl/portfile.cmake:42 (vcpkg_cmake_configure)
  scripts/ports.cmake:142 (include)

Do you think it can be the issue? I have already pulled git pull and run vcpkg.exe install pcl and same error happens

JonLiu1993 commented 2 years ago

@Jaime02 , CMake Warning we will deal when we fix other issue, can you install pcl successfully?

Jaime02 commented 2 years ago

@Jaime02 , CMake Warning we will deal when we fix other issue, can you install pcl successfully?

No

ydntlk commented 2 years ago

I guess it's exactly the same issue as #19561.

@Jaime02 I suggest searching for "failed" or "opennurbs_lookup" in your install-x86-windows-rel-out.log file to see if they're the same issue.

@JonLiu1993 I encountered the same problem when I installed PCL with VS2022 (i.e. "v143"). Then I created a new triplet using VS2019 (by setting VCPKG_PLATFORM_TOOLSET to v142) and rebuilt PCL and succeeded.

So I guess it's a bug of Visual C++ 2022 compiler, but there is no progress according issue #19561.

JackBoosY commented 2 years ago

Please provide full log C:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\install-x86-windows-rel-out.log.

Jaime02 commented 2 years ago

Please provide full log C:\Users\jaime\Desktop\vcpkg\buildtrees\pcl\install-x86-windows-rel-out.log.

As @ydntlk said, It was a bug due to using VS2022, I've downgraded to VS2019 and I have successfully installed the library, thanks for your attention! đŸ’–

(I close this because I guess this has to be fixed by the pcl developers)