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

Fails to build with newest zlib #764

Open
GeckoEidechse opened this issue Jan 24, 2024 · 5 comments
Open

Fails to build with newest zlib #764

GeckoEidechse opened this issue Jan 24, 2024 · 5 comments
Labels
build system Build system and script changes

Comments

@GeckoEidechse
Copy link

Since the following commit on zlib (madler/zlib@2e3d86c), mini-zip fails building for us.

Truncated output from CI logs:
https://github.com/R2Northstar/NorthstarLauncher/actions/runs/7634172734/job/20797658775#step:4:337

 -- Looking for fseeko
-- Looking for fseeko - not found
-- Fetching zlib https://github.com/madler/zlib master
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Renaming
--     D:/a/NorthstarLauncher/NorthstarLauncher/primedev/thirdparty/minizip/third_party/zlib/zconf.h
-- to 'zconf.h.included' because this file is included with zlib
-- but CMake generates it automatically in the build directory.
-- The following features have been enabled:

 * MZ_COMPAT, Enables compatibility layer
 * MZ_ZLIB, Enables ZLIB compression
 * MZ_FETCH_LIBS, Enables fetching third-party libraries if not found

-- The following features have been disabled:

 * MZ_BZIP2, Enables BZIP2 compression
 * MZ_LZMA, Enables LZMA & XZ compression
 * MZ_ZSTD, Enables ZSTD compression
 * MZ_LIBCOMP, Enables Apple compression
 * MZ_FORCE_FETCH_LIBS, Enables fetching third-party libraries always
 * MZ_PKCRYPT, Enables PKWARE traditional encryption
 * MZ_WZAES, Enables WinZIP AES encryption
 * MZ_OPENSSL, Enables OpenSSL for encryption
 * MZ_LIBBSD, Builds with libbsd crypto random
 * MZ_ICONV, Enables iconv string encoding conversion library
 * MZ_COMPRESS_ONLY, Only support compression
 * MZ_DECOMPRESS_ONLY, Only support decompression
 * MZ_FILE32_API, Builds using posix 32-bit file api
 * MZ_BUILD_TESTS, Builds minizip test executable
 * MZ_BUILD_UNIT_TESTS, Builds minizip unit test project
 * MZ_BUILD_FUZZ_TESTS, Builds minizip fuzzer executables
 * MZ_CODE_COVERAGE, Builds with code coverage flags

-- Configuring done (77.4s)
CMake Error in primedev/thirdparty/minizip/third_party/zlib/CMakeLists.txt:
  Target "zlibstatic" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "D:/a/NorthstarLauncher/NorthstarLauncher/_deps/zlib-build"

  which is prefixed in the build directory.


CMake Error in primedev/thirdparty/minizip/third_party/zlib/CMakeLists.txt:
  Target "zlibstatic" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "D:/a/NorthstarLauncher/NorthstarLauncher/primedev/thirdparty/minizip/third_party/zlib"

  which is prefixed in the build directory.


-- Generating done (0.4s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
@ASpoonPlaysGames
Copy link

When setting the tag to v1.3 (https://github.com/madler/zlib/tree/v1.3) other issues arise, potentially related to the fact that we submodule minizip?

1> [CMake] -- NS: Building to C:/Users/Spoon/NorthstarLauncher/build/game
1> [CMake] -- curl version=[7.81.0-DEV]
1> [CMake] -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
1> [CMake] -- Enabled features: SSL IPv6 unixsockets AsynchDNS Largefile SSPI alt-svc HSTS SPNEGO Kerberos NTLM
1> [CMake] -- Enabled protocols: HTTP HTTPS
1> [CMake] -- Enabled SSL backends: Schannel
1> [CMake] -- Using CMake version 3.25.1-msvc1
1> [CMake] -- Fetching zlib https://github.com/madler/zlib v1.3
1> [CMake] HEAD is now at 09155ea zlib 1.3
1> [CMake] Index was not unstashed.
1> [CMake] The stash entry is kept in case you need it again.
1> [CMake] The stash entry is kept in case you need it again.
1> [CMake] CMake Error at C:/Users/Spoon/NorthstarLauncher/build/_deps/zlib-subbuild/zlib-populate-prefix/tmp/zlib-populate-gitupdate.cmake:264 (message):
1> [CMake]   
1> [CMake] 
1> [CMake]   Failed to unstash changes in: 'C:/Users/Spoon/Desktop/Northstar
1> [CMake]   Things/Northstar Github
1> [CMake]   Fork/NorthstarLauncher/primedev/thirdparty/minizip/third_party/zlib'.
1> [CMake] 
1> [CMake]   You will have to resolve the conflicts manually
1> [CMake] 
1> [CMake] 
1> [CMake] [0/7] Performing update step for 'zlib-populate'
1> [CMake] FAILED: zlib-populate-prefix/src/zlib-populate-stamp/zlib-populate-update C:/Users/Spoon/NorthstarLauncher/build/_deps/zlib-subbuild/zlib-populate-prefix/src/zlib-populate-stamp/zlib-populate-update 
1> [CMake] cmd.exe /C "cd /D "C:\Users\Spoon\Desktop\Northstar Things\Northstar Github Fork\NorthstarLauncher\primedev\thirdparty\minizip\third_party\zlib" && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -P "C:/Users/Spoon/NorthstarLauncher/build/_deps/zlib-subbuild/zlib-populate-prefix/tmp/zlib-populate-gitupdate.cmake""
1> [CMake] ninja: build stopped: subcommand failed.

@ASpoonPlaysGames
Copy link

Corresponding issue on zlib repo: madler/zlib#915

@ekantik1
Copy link

madler/zlib#915 is closed as the changes made to develop branch. how to pick up the change here to fix this issue?

@NorbertEff
Copy link

I was able to compile with the tag set to develop as a workaround.

@nmoinvaz nmoinvaz added the build system Build system and script changes label Feb 17, 2024
@nmoinvaz
Copy link
Member

nmoinvaz commented Feb 17, 2024

It is an error in zlib's current CMake in their master branch. You can delete your temporary build files and try using:

cmake -S . -B build -DZLIB_TAG=develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Build system and script changes
Projects
None yet
Development

No branches or pull requests

5 participants