Skip to content

[APP BUG]: compile error: Targets not yet defined: ZLIB::ZLIBSTATIC #4257

@delentef

Description

@delentef

Checklist

  • I have searched for a similar issue in this repository and did not find one.
  • I am using an official build obtained from releases or updated one of those builds using its in-app updater.

Describe the Bug

Hello,

I'm on Fedora 43.

I pulled the git version from scratch today to build shadps4, with git clone --recursive https://github.com/shadps4-emu/shadPS4.git but compiling gives me an error:

CMake Error at /usr/lib64/cmake/ZLIB/ZLIB-targets.cmake:42 (message):
  Some (but not all) targets in this export set were already defined.

  Targets Defined: ZLIB::ZLIB

  Targets not yet defined: ZLIB::ZLIBSTATIC

Call Stack (most recent call first):
  /usr/lib64/cmake/ZLIB/zlib-config.cmake:44 (include)
  /usr/share/cmake/Modules/FindPNG.cmake:68 (find_package)
  externals/sdl3_image/CMakeLists.txt:882 (find_package)


-- Configuring incomplete, errors occurred!
gmake: Makefile: No such file or directory
gmake: *** No rule to make target 'Makefile'.  Stop.

even though zlib was detected. I already compiled previous versions of shadps4 a while ago (6 months?).

Reproduction Steps

try to compile with cmake -S . -B build/ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

Expected Behavior

compilation succeeds

Specify OS Version

Linux Fedora 43

CPU

Intel(R) Core(TM) i7-9750H CPU

GPU

nvidia geforce RTX2060M

Amount of RAM in GB

32

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions