mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.89k stars 1.19k forks source link

pbrt-v3 failed to build due to error MSB8066 using MSVC for ARM64EC target on Windows #325

Open spacelg opened 1 year ago

spacelg commented 1 year ago

Hi All,

pbrt-v3 failed to build due to error error MSB8066: Custom build for 'F:\gitP\mmp\pbrt-v3\build_arm64ec\CMakeFiles\c541becc1f2c5fefb64230479ede90f9\eLut.h.rule;F:\gitP\mmp\pbrt-v3\build_arm64ec\CMakeFiles\c541becc1f2c5fefb64230479ede90f9\toFloat.h.rule' exited with code -1073741819. using MSVC for ARM64EC target on Windows. Could you please help look at this issue?

Repro steps:

  1. git clone https://github.com/mmp/pbrt-v3 F:\gitP\mmp\pbrt-v3
  2. mkdir build_arm64ec && cd build_arm64ec
  3. cmake -G "Visual Studio 16 2019" -A ARM64EC -DCMAKE_SYSTEM_VERSION=10.0.22618.0 -DCMAKE_BUILD_TYPE=Release ..
  4. msbuild /m /p:Platform=ARM64EC /p:Configuration=Release PBRT-V3.sln /t:Rebuild

Build log: build_arm64ec_2.log

Expected result: build successfully.

Actural result: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'F:\gitP\mmp\pbrt-v3\build_arm64ec\CMakeFiles\c541becc1f2c5fefb64230479ede90f9\eLut.h.rule;F:\gitP\mmp\pbrt-v3\build_arm64ec\CMakeFiles\c541becc1f2c5fefb64230479ede90f9\toFloat.h.rule' exited with code -1073741819. [F:\gitP\mmp\pbrt-v3\build_arm64ec\src\ext\openexr\IlmBase\Half\Half.vcxproj]

mmp commented 1 year ago

The issue seems to be in the third-party OpenEXR library. You might try updating it to a more recent release (the version used in pbrt-v3 dates to 2018, so I could imagine OpenEXR's Windows + ARM64 support has improved since then.)