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

Error: Building package pcl:x64-windows failed with: BUILD_FAILED #19561

Open
Samer-Docs opened this issue Aug 14, 2021 · 27 comments
Open

Error: Building package pcl:x64-windows failed with: BUILD_FAILED #19561

Samer-Docs opened this issue Aug 14, 2021 · 27 comments
Assignees
Labels
depends:upstream-changes Waiting on a change to the upstream project

Comments

@Samer-Docs
Copy link

Samer-Docs commented Aug 14, 2021

Hello All,
I am trying to install PCL on Windows as explained here: https://pointclouds.org/downloads/
and here: https://github.com/microsoft/vcpkg

But I faced a problem "Error: Building package pcl:x64-windows failed with: BUILD_FAILED" as you can see below.

Host Environment

  • OS: Windows 64-bit operating system, x64-based processor
  • Compiler: revision

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

Failure logs
C:\dev\vcpkg\vcpkg> vcpkg.exe install pcl:x64-windows
Computing installation plan...
The following packages will be built and installed:
pcl[core]:x64-windows -> 1.11.1#4
Detecting compiler hash for triplet x64-windows...
Could not locate cached archive: C:\Users\KaramS\AppData\Local\vcpkg\archives\04\045ba40892938512693aac9e82ee83066eb33202f5ab3fffe342a9aed6ac4845.zip
Starting package 1/1: pcl:x64-windows
Building package pcl[core]:x64-windows...
-- Using C:/dev/vcpkg/vcpkg/downloads/PointCloudLibrary-pcl-d98313133b014553ab1b1b5b112f9aade837d55c.tar.gz
-- Cleaning sources at C:/dev/vcpkg/vcpkg/buildtrees/pcl/src/ade837d55c-9cde649e93.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/dev/vcpkg/vcpkg/downloads/PointCloudLibrary-pcl-d98313133b014553ab1b1b5b112f9aade837d55c.tar.gz
-- Applying patch pcl_utils.patch
-- Applying patch pcl_config.patch
-- Applying patch boost-1.70.patch
-- Applying patch fix-link-libpng.patch
-- Applying patch remove-broken-targets.patch
-- Applying patch fix-check-sse.patch
-- Applying patch realsense2.patch
-- Applying patch add-gcc-version-check.patch
-- Applying patch fix-find-qhull.patch
-- Using source at C:/dev/vcpkg/vcpkg/buildtrees/pcl/src/ade837d55c-9cde649e93.clean
-- Found external ninja('1.10.2').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:155 (message):
Command failed: C:/dev/vcpkg/vcpkg/downloads/tools/cmake-3.21.1-windows/cmake-3.21.1-windows-i386/bin/cmake.exe --build . --config Release --target install -- -v -j13
Working Directory: C:/dev/vcpkg/vcpkg/buildtrees/pcl/x64-windows-rel
See logs for more information:
C:\dev\vcpkg\vcpkg\buildtrees\pcl\install-x64-windows-rel-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:104 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:44 (vcpkg_build_cmake)
ports/pcl/portfile.cmake:62 (vcpkg_install_cmake)
scripts/ports.cmake:141 (include)

Error: Building package pcl:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: pcl:x64-windows
Vcpkg version: 2021-08-12-85ab112d5ee102bc6eac8cdbbfdd173a71374e04

Additionally, attach any relevant sections from the log files above.

@dg0yt
Copy link
Contributor

dg0yt commented Aug 14, 2021

Please add C:\dev\vcpkg\vcpkg\buildtrees\pcl\install-x64-windows-rel-out.log (as an attachement).

@Samer-Docs
Copy link
Author

@dg0yt
Copy link
Contributor

dg0yt commented Aug 14, 2021

C:\dev\vcpkg\vcpkg\buildtrees\pcl\src\ade837d55c-9cde649e93.clean\surface\src\3rdparty\opennurbs\opennurbs_lookup.cpp(670) : fatal error C1001: Internal compiler error.
(compiler file 'd:\a01\_work\3\s\src\vctools\Compiler\Utc\src\p2\main.c', line 217)
 To work around this problem, try simplifying or changing the program near the locations listed above.
If possible please provide a repro here: https://developercommunity.visualstudio.com 
Please choose the Technical Support command on the Visual C++ 
 Help menu, or open the Technical Support help file for more information
  cl!RaiseException()+0x69
  cl!RaiseException()+0x69
  cl!InvokeCompilerPassW()+0xd38f7
  cl!InvokeCompilerPassW()+0x15212f

@Samer-Docs
Copy link
Author

To work around this problem, try simplifying or changing the program near the locations listed above.

I am sorry, but I didn't get the suggested solution. which program? and which locations? could you please provide more details?

@dg0yt
Copy link
Contributor

dg0yt commented Aug 14, 2021

could you please provide more details?

No, I can't: It is an "internal compiler error". I don't even use MSVC. But maybe someone from Microsoft will have an idea.

@Samer-Docs
Copy link
Author

..../opennurbs_lookup.cpp(670) does 670 refer to the line? if yes. I have the following in this line:
image

I tried to comment it out, but it is overwritten when I call "vcpkg.exe install pcl:x64-windows"

@Samer-Docs
Copy link
Author

could you please provide more details?

No, I can't: It is an "internal compiler error". I don't even use MSVC. But maybe someone from Microsoft will have an idea.

"compiler file 'd:\a01_work\3\s\src\vctools\Compiler\Utc\src\p2\main.c', line 217" I didn't find this directory in my computer. I have no file called a01 in D!

@NancyLi1013
Copy link
Contributor

@Samer-Docs

Thanks for posting this issue. Confirmed this is a compiler bug. We have filed a bug https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1348372 to track this issue.

@NancyLi1013 NancyLi1013 added the category:question This issue is a question label Aug 16, 2021
@Samer-Docs
Copy link
Author

@Samer-Docs

Thanks for posting this issue. Confirmed this is a compiler bug. We have filed a bug https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1348372 to track this issue.

Dear Nancy, Thanks for your reply. When I click on the link above, it shows me that I do not have access.

@dg0yt
Copy link
Contributor

dg0yt commented Aug 16, 2021

"compiler file 'd:\a01_work\3\s\src\vctools\Compiler\Utc\src\p2\main.c', line 217" I didn't find this directory in my computer. I have no file called a01 in D!

FTR this is a file from the compiler source code (from the time when the compiler was built), not from your computer.

@NancyLi1013
Copy link
Contributor

@Samer-Docs
Thanks for posting this issue. Confirmed this is a compiler bug. We have filed a bug https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1348372 to track this issue.

Dear Nancy, Thanks for your reply. When I click on the link above, it shows me that I do not have access.

You may try to open it in this way.

  1. Open this link
    https://devdiv.visualstudio.com/DefaultCollection/DevDiv/
  2. Search 1348372 in the search page
  3. Click the search result listed in Work item

Note: Currently, there is no progress about this issue.

@EsMgAl
Copy link

EsMgAl commented Nov 19, 2021

@NancyLi1013 thanks,but how to solve have no access to open the link:
https://devdiv.visualstudio.com/DefaultCollection/DevDiv/

@NancyLi1013
Copy link
Contributor

@NancyLi1013 thanks,but how to solve have no access to open the link: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/

Seems require additional permission to go through this link. There is no any progress about this issue.

But I have no idea how to access this for you.

@EsMgAl
Copy link

EsMgAl commented Nov 20, 2021

@NancyLi1013 oh too bad! it is a huge problem to me。

@LilyWangLL LilyWangLL added depends:upstream-changes Waiting on a change to the upstream project and removed category:question This issue is a question labels Dec 14, 2021
@LilyWangLL LilyWangLL assigned LilyWangLL and unassigned NancyLi1013 Dec 14, 2021
@LilyWangLL LilyWangLL changed the title Error: Building package pcl:x64-windows failed with: BUILD_FAILED Error: Building package pcl:x64-windows failed on Visual Studio Dec 14, 2021
@LilyWangLL LilyWangLL changed the title Error: Building package pcl:x64-windows failed on Visual Studio Error: Building package pcl:x64-windows failed on Visual Studio 2022 Dec 14, 2021
@LilyWangLL LilyWangLL changed the title Error: Building package pcl:x64-windows failed on Visual Studio 2022 Error: Building package pcl:x64-windows failed with: BUILD_FAILED Dec 14, 2021
@lidar-nevermore
Copy link

@NancyLi1013 oh too bad! it is a huge problem to me。

I also got this error when using MSVC2022 and MSVC2015. I finally get through it by changing to MSVC2019

@Ilmu011
Copy link

Ilmu011 commented Dec 19, 2021

I finally get through it by changing to MSVC2019

@lidar-nevermore How exactly did you do this? I tried to make a custom triplet file for pcl specifically targeting MSVC2019 (v142). The vcpkg installation worked, but when I try to compile my program I get dozens of "unresolved external symbol" errors (I made sure everything is running on 64bit, same as the pcl installation)

@Eric-JH
Copy link

Eric-JH commented Jan 4, 2022

Has anybody gotten a solution except installing MSVC2019

@Bardo91
Copy link

Bardo91 commented Jan 13, 2022

I have the same problem with MSVC2022. I solved it by changing the portfile.cmake. I have disabled the usage of opennurbs in the surface module.

Changed

-DBUILD_surface_on_nurbs=ON

to
BUILD_surface_on_nurbs=OFF

By disabling it, the error disappeared. So if you are not using that module you can solve it temporarily.

I hope it helps to someone!

@cyberjaxx
Copy link

Install OpenNurbs from the "official" repository at mcneel/opennurbs
Open opennurbs_public.sln with VisualStudio2022
Build the project opennurbs_public for Release:X64

opennurbs\opennurbs_lookup.cpp(713): fatal error C1001: Internal compiler error.

712 struct ON_SerialNumberMap::SN_ELEMENT* ON_SerialNumberMap::FirstElement() const
713 {

The result is the same error in same spot of code (though line numbers are different due to modifications in the pcl version)

pcl\surface\src\3rdparty\opennurbs\opennurbs_lookup.cpp(670): fatal error C1001: Internal compiler error.

669 struct ON_SerialNumberMap::SN_ELEMENT* ON_SerialNumberMap::FirstElement() const
670 {

Project opennurbs_public for Debug:X64 builds fine.
Project opennurb_public_staticlib builds fine for both Debug:x64 and Release:X64

I have notified McNeel of the issue Building opennurbs_public with VisualStudio2022 results in compiler error

starseeker added a commit to BRL-CAD/brlcad that referenced this issue Feb 15, 2022
Unless I'm missing something, FirstElement is currently unused by both
the openNURBS code itself and our code - disable to avoid a VS2022
compiler bug.

Keep an eye on the following links to see if there is more progress on
this, but in the meantime it looks like we can just dodge the issue
completely:

https://discourse.mcneel.com/t/building-opennurbs-public-with-visualstudio2022-results-in-compiler-error/137817

microsoft/vcpkg#19561
starseeker added a commit to BRL-CAD/brlcad that referenced this issue Mar 8, 2022
Unless I'm missing something, FirstElement is currently unused by both
the openNURBS code itself and our code - disable to avoid a VS2022
compiler bug.

Keep an eye on the following links to see if there is more progress on
this, but in the meantime it looks like we can just dodge the issue
completely:

https://discourse.mcneel.com/t/building-opennurbs-public-with-visualstudio2022-results-in-compiler-error/137817

microsoft/vcpkg#19561
(cherry picked from commit 68d49db)
@krkrman
Copy link

krkrman commented Apr 26, 2022

Have you solved the problem without installing vs 2019?

@Bardo91
Copy link

Bardo91 commented Apr 26, 2022

What error do you have? In my case, it was a problem with NURBS, so I disabled it (See my previous comment).
I use VS2022.

@krkrman
Copy link

krkrman commented Apr 26, 2022

What error do you have? In my case, it was a problem with NURBS, so I disabled it (See my previous comment).
I use VS2022.

I did that and the same error still exists
The error is like the error in the issue

@sidy3d
Copy link
Contributor

sidy3d commented Apr 26, 2022

The workaround for this was submitted a while ago:
https://github.com/microsoft/vcpkg/blob/94c728df6b4c1c186e2ba58952f48ac744f4ef3b/ports/pcl/Workaround-ICE-in-release.patch
Is your vcpkg up to date?

@aghaphd
Copy link

aghaphd commented Nov 6, 2023

I'm facing a similar problem:
PS C:\src\vcpkg> .\vcpkg install pcl:x64-windows
Computing installation plan...
The following packages will be built and installed:
pcl:x64-windows -> 1.13.1#1
Detecting compiler hash for triplet x64-windows...
Restored 0 package(s) from C:\Users\666\AppData\Local\vcpkg\archives in 92.4 us. Use --debug to see more details.
Installing 1/1 pcl:x64-windows...
Building pcl:x64-windows...
-- Using cached PointCloudLibrary-pcl-pcl-1.13.1.tar.gz.
-- Cleaning sources at C:/src/vcpkg/buildtrees/pcl/src/pcl-1.13.1-38090574eb.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/src/vcpkg/downloads/PointCloudLibrary-pcl-pcl-1.13.1.tar.gz
-- Applying patch add-gcc-version-check.patch
-- Applying patch fix-check-sse.patch
-- Applying patch fix-numeric-literals-flag.patch
-- Applying patch pcl_config.patch
-- Applying patch pcl_utils.patch
-- Applying patch install-examples.patch
-- Applying patch no-absolute.patch
-- Applying patch devendor-zlib.patch
-- Using source at C:/src/vcpkg/buildtrees/pcl/src/pcl-1.13.1-38090574eb.clean
-- Configuring x64-windows
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
Command failed: C:/src/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe -v
Working Directory: C:/src/vcpkg/buildtrees/pcl/x64-windows-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
C:\src\vcpkg\buildtrees\pcl\config-x64-windows-dbg-CMakeCache.txt.log
C:\src\vcpkg\buildtrees\pcl\config-x64-windows-rel-CMakeCache.txt.log
C:\src\vcpkg\buildtrees\pcl\config-x64-windows-out.log

Call Stack (most recent call first):
installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:252 (vcpkg_execute_required_process)
ports/pcl/portfile.cmake:42 (vcpkg_cmake_configure)
scripts/ports.cmake:168 (include)

error: building pcl:x64-windows failed with: BUILD_FAILED
Elapsed time to handle pcl:x64-windows: 9.1 s
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+pcl
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[pcl]+Build+error&body=Copy+issue+body+from+C%3A%2Fsrc%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md

Please need some help to solve this problem.

@LilyWangLL
Copy link
Contributor

I'm facing a similar problem: PS C:\src\vcpkg> .\vcpkg install pcl:x64-windows Computing installation plan... The following packages will be built and installed: pcl:x64-windows -> 1.13.1#1 Detecting compiler hash for triplet x64-windows... Restored 0 package(s) from C:\Users\666\AppData\Local\vcpkg\archives in 92.4 us. Use --debug to see more details. Installing 1/1 pcl:x64-windows... Building pcl:x64-windows... -- Using cached PointCloudLibrary-pcl-pcl-1.13.1.tar.gz. -- Cleaning sources at C:/src/vcpkg/buildtrees/pcl/src/pcl-1.13.1-38090574eb.clean. Use --editable to skip cleaning for the packages you specify. -- Extracting source C:/src/vcpkg/downloads/PointCloudLibrary-pcl-pcl-1.13.1.tar.gz -- Applying patch add-gcc-version-check.patch -- Applying patch fix-check-sse.patch -- Applying patch fix-numeric-literals-flag.patch -- Applying patch pcl_config.patch -- Applying patch pcl_utils.patch -- Applying patch install-examples.patch -- Applying patch no-absolute.patch -- Applying patch devendor-zlib.patch -- Using source at C:/src/vcpkg/buildtrees/pcl/src/pcl-1.13.1-38090574eb.clean -- Configuring x64-windows CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message): Command failed: C:/src/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe -v Working Directory: C:/src/vcpkg/buildtrees/pcl/x64-windows-rel/vcpkg-parallel-configure Error code: 1 See logs for more information: C:\src\vcpkg\buildtrees\pcl\config-x64-windows-dbg-CMakeCache.txt.log C:\src\vcpkg\buildtrees\pcl\config-x64-windows-rel-CMakeCache.txt.log C:\src\vcpkg\buildtrees\pcl\config-x64-windows-out.log

Call Stack (most recent call first): installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:252 (vcpkg_execute_required_process) ports/pcl/portfile.cmake:42 (vcpkg_cmake_configure) scripts/ports.cmake:168 (include)

error: building pcl:x64-windows failed with: BUILD_FAILED Elapsed time to handle pcl:x64-windows: 9.1 s Please ensure you're using the latest port files with git pull and vcpkg update. Then check for known issues at: https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+pcl You can submit a new issue at: https://github.com/microsoft/vcpkg/issues/new?title=[pcl]+Build+error&body=Copy+issue+body+from+C%3A%2Fsrc%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md

Please need some help to solve this problem.

Please provide the error logs:

C:\src\vcpkg\buildtrees\pcl\config-x64-windows-dbg-CMakeCache.txt.log
C:\src\vcpkg\buildtrees\pcl\config-x64-windows-rel-CMakeCache.txt.log
C:\src\vcpkg\buildtrees\pcl\config-x64-windows-out.log

@aghaphd
Copy link

aghaphd commented Nov 7, 2023

Hi Lily, I have solved the issue by reinstalling VS2019.

@miladHakimi
Copy link

miladHakimi commented Jan 6, 2024

I had the same issue. I think it happened because the CMAKE_PREFIX_PATH was not properly set. I manually updated it in the <vcpkg_root_dir>\scripts\buildsystems\vcpkg.cmake by adding the following line:
set(CMAKE_PREFIX_PATH "<vcpkg_root_dir>/installed/<triplet>/share")

Although it fixed the problem, I suggest updating the Windows environment variables instead of changing the cmake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends:upstream-changes Waiting on a change to the upstream project
Projects
None yet
Development

No branches or pull requests