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

pbrt-v4 build on windows 10 cmake generation requires target "zlibstatic" that is not in any export set. #467

Open
AlicKaufmann opened this issue Dec 6, 2024 · 10 comments

Comments

@AlicKaufmann
Copy link

I tried to build pbrt-v4 on windows by following the build instructions. However, when trying to generate (in cmake GUI) with visual studio 2022 and x64 I get the following (although I cloned recursively with the submodules):

Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
The CXX compiler identification is MSVC 19.40.33813.0
The C compiler identification is MSVC 19.40.33813.0
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.40.33807/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/Professional/VC/Tools/MSVC/14.40.33807/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.42.0.windows.2")
OpenEXR at commit: ca757f97033ae7cfcc6130f23c0e9ee86b108b07
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
The ASM compiler identification is MSVC
Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.40.33807/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 Deprecation Warning at src/ext/zlib/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of off64_t
Check size of off64_t - failed
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - not found
Could NOT find Imath (missing: Imath_DIR)
Could NOT find IlmBase (missing: IlmBase_DIR)
Could NOT find OpenEXR (missing: OpenEXR_DIR)
Found ZLIB: zlibstatic
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
Could NOT find OpenEXR (missing: ILMBASE_INCLUDE_PATH OPENEXR_INCLUDE_PATH OPENEXR_IMATH_LIBRARY OPENEXR_ILMIMF_LIBRARY OPENEXR_IEX_LIBRARY OPENEXR_HALF_LIBRARY) (found version "1.6.1")
OpenEXR not found; building it from scratch.
Configure ILMBASE Version: 2.5.3 Lib API: 25.0.2
Looking for include file ucontext.h
Looking for include file ucontext.h - not found
-- WARNING pkg-config generation disabled
Configure OpenEXR Version: 2.5.3 Lib API: 25.0.2
Performing Test OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN
Performing Test OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN - Failed
Performing Test OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
Performing Test OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - Failed
clang-format not found.
Found Doxygen: C:/Program Files/doxygen/bin/doxygen.exe (found version "1.10.0") found components: doxygen dot
CMake Deprecation Warning at src/ext/double-conversion/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at src/ext/utf8proc/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


Including Win32 support
Unable to find -lprofiler
Looking for a CUDA compiler
Looking for a CUDA compiler - NOTFOUND
CUDA not found
Performing Test COMPILER_SUPPORTS_MARCH_NATIVE
Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Failed
Performing Test HAVE_MMAP
Performing Test HAVE_MMAP - Failed
Performing Test HAS_INTRIN_H
Performing Test HAS_INTRIN_H - Success
Performing Test HAVE_DECLSPEC_NOINLINE
Performing Test HAVE_DECLSPEC_NOINLINE - Success
Performing Test HAVE_ATTRIBUTE_NOINLINE
Performing Test HAVE_ATTRIBUTE_NOINLINE - Failed
Performing Test HAVE_PRE_POST_BAR_RESTRICT
Performing Test HAVE_PRE_POST_BAR_RESTRICT - Failed
Performing Test HAVE_PRE_BAR_RESTRICT
Performing Test HAVE_PRE_BAR_RESTRICT - Success
Performing Test HAVE__ALIGNED_MALLOC
Performing Test HAVE__ALIGNED_MALLOC - Success
Performing Test HAVE_POSIX_MEMALIGN
Performing Test HAVE_POSIX_MEMALIGN - Failed
Performing Test INT64_IS_OWN_TYPE
Performing Test INT64_IS_OWN_TYPE - Failed
Configuring done (34.0s)
CMake Error: install(EXPORT "Ptex" ...) includes target "Ptex_static" which requires target "zlibstatic" that is not in any export set.
Generating done (1.6s)
@pbrt4bounty
Copy link
Contributor

Seems a issue due the latest updates of the Ptex version. I solved here, building the included zlib code and placing into a folder that I added to the system path. After this, find_package(zlib) found and use this pre-build lib and solved the issue

@Haiderahandali
Copy link

Same issue here, has it been merged into the main branch? or is the PR still waiting?

@754978334
Copy link

Seems a issue due the latest updates of the Ptex version. I solved here, building the included zlib code and placing into a folder that I added to the system path. After this, find_package(zlib) found and use this pre-build lib and solved the issue

hello! Same issue here, Can you teach me what you have done to fix this in detail.

@pbrt4bounty
Copy link
Contributor

pbrt4bounty commented Dec 18, 2024

I uses a script file for CMake and MSVC under Windows.
make_zlib_deps_main.zip

@754978334
Copy link

I uses a script file for CMake and MSVC under Windows. make_zlib_deps_main.zip

Thanks you a lot! that works for me.

@Heecheol01
Copy link

I uses a script file for CMake and MSVC under Windows. make_zlib_deps_main.zip

Hello! I have a question. Should I run the file you uploaded inside the pbrt-v4 folder or should I run it somewhere else?

@pbrt4bounty
Copy link
Contributor

I have placed in the pbrt-v4 folder

@Heecheol01
Copy link

I have placed in the pbrt-v4 folder

Then, is there anything else I need to do after the execution of the file you gave me?

@pbrt4bounty
Copy link
Contributor

The file is only an example about how I build here Zlib static. You need to edit and introduce your specific paths for the code, the utilities( Cmake, Msvc, CUDA, etc,,) one time the script is sucessful executed and Pbrt compiled, you have the binary files into the build/pbrt4deploy folder

@Heecheol01
Copy link

The file is only an example about how I build here Zlib static. You need to edit and introduce your specific paths for the code, the utilities( Cmake, Msvc, CUDA, etc,,) one time the script is sucessful executed and Pbrt compiled, you have the binary files into the build/pbrt4deploy folder

I see. Thank you so much for your kind explanation!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants