pbrt-v4 icon indicating copy to clipboard operation
pbrt-v4 copied to clipboard

Failed to configure CMake

Open pJotoro opened this issue 6 months ago • 1 comments

  • Windows specifications: Edition Windows 11 Home Version 24H2 Installed on ‎5/‎18/‎2025 OS build 26100.4061 Experience Windows Feature Experience Pack 1000.26100.84.0

  • Commit: On branch master Your branch is up to date with 'origin/master'. nothing to commit, working tree clean

  • Generator: Visual Studio 17 2022.

  • CMake version: 4.0.2

  • CMake log:

The CXX compiler identification is MSVC 19.44.35207.1
The C compiler identification is MSVC 19.44.35207.1
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
Detecting C compile features
Detecting C compile features - done
Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.49.0.windows.1")
OpenEXR at commit: f723c3940fff287c0a26b425b90a8e764823bfd4
OpenVDB at commit: 414bed84c2fc22e188eac7b611aa85c7edd7a5a9
Ptex at commit: 054047d02b9e06e690420b407114d2872435b953
double-conversion at commit: cc1f75a114aca8d2af69f73a5a959aecbab0e87a
filesystem at commit: c5f9de30142453eb3c6fe991e82dfc2583373116
glfw at commit: 7b6aead9fb88b3623e3b3725ebb42670cbe4c579
libdeflate at commit: 1fd0bea6ca2073c68493632dafc4b1ddda1bcbc3
lodepng at commit: 8c6a9e30576f07bf470ad6f09458a2dcd7a6a84a
qoi at commit: 028c75fd26e5e0758c7c711216c00404994c1ad3
stb at commit: af1a5bc352164740c1cc1354942b1c6b72eacb8a
utf8proc at commit: 2484e2ed5e1d9c19edcccf392a7d9920ad90dfaf
zlib at commit: 54d591eabf9fe0e84c725638f8d5d8d202a093fa
Performing Test CMAKE_HAVE_LIBC_PTHREAD
Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
Looking for pthread_create in pthreads
Looking for pthread_create in pthreads - not found
Looking for pthread_create in pthread
Looking for pthread_create in pthread - not found
Found Threads: TRUE
Found OpenGL: opengl32
CMake Deprecation Warning at src/ext/libdeflate/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


The ASM compiler identification is MSVC
Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
CMake Warning (dev) at src/ext/libdeflate/CMakeLists.txt:12 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'BUILD_SHARED_LIBS'.
This warning is for project developers.  Use -Wno-dev to suppress it.

Performing Test DEFLATE_LINT_WALL
Performing Test DEFLATE_LINT_WALL - Success
Performing Test DEFLATE_LINT_WUNDEF
Performing Test DEFLATE_LINT_WUNDEF - Failed
Performing Test DEFLATE_LINT_PEDANTIC
Performing Test DEFLATE_LINT_PEDANTIC - Failed
Performing Test DEFLATE_LINT_DECLARATION_AFTER_STATEMENT
Performing Test DEFLATE_LINT_DECLARATION_AFTER_STATEMENT - Failed
Performing Test DEFLATE_LINT_MISSING_PROTOTYPES
Performing Test DEFLATE_LINT_MISSING_PROTOTYPES - Failed
Performing Test DEFLATE_LINT_STRICT_PROTOTYPES
Performing Test DEFLATE_LINT_STRICT_PROTOTYPES - Failed
Performing Test DEFLATE_LINT_VLA
Performing Test DEFLATE_LINT_VLA - Failed
Performing Test DEFLATE_LINT_IMPLICIT_FALLTHROUGH
Performing Test DEFLATE_LINT_IMPLICIT_FALLTHROUGH - Failed
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
CMake Error at src/ext/zlib/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


Configuring incomplete, errors occurred!

pJotoro avatar Jun 06 '25 08:06 pJotoro

Try set of workarounds (they solve zlib issue as side effect of initial setup) at https://github.com/mmp/pbrt-v4/issues/495

k-badz avatar Jun 08 '25 13:06 k-badz

@pJotoro I fixed this issue here: https://github.com/mmp/pbrt-v4/pull/506/commits/3f989e6396337dc7b72bf6ea6cd558cb16b5a5d9 Cheers...!

pbrt4bounty avatar Jul 20 '25 21:07 pbrt4bounty

@pJotoro I fixed this issue here: 3f989e6我在这里修复了这个问题: 3f989e6 Cheers...! 干杯!

Under Windows, it still cannot compile properly. The command used is as follows: cmake -B build/debug -D CMAKE_BUILD_TYPE=Debug

xiaomx32 avatar Jul 21 '25 11:07 xiaomx32

@xiaomx32 You meant after apply the changes from my commit?? I never test in Debug mode build..

pbrt4bounty avatar Jul 21 '25 13:07 pbrt4bounty

This should be fixed now in top-of-tree.

mmp avatar Oct 22 '25 19:10 mmp