• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    zlib installed but not found while building

    Scheduled Pinned Locked Moved Technical Help
    3 Posts 2 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by

      I get this error while running cmake .. -DBUILD_WITH_QT6=ON

      -- Configuring done
      CMake Error at src/CMakeLists.txt:1068 (add_library):
        Target "strawberry_lib" links to target "ZLIB::ZLIB" but the target was not
        found.  Perhaps a find_package() call is missing for an IMPORTED target, or
        an ALIAS target is missing?
      
      
      CMake Error at src/CMakeLists.txt:1265 (add_executable):
        Target "strawberry" links to target "ZLIB::ZLIB" but the target was not
        found.  Perhaps a find_package() call is missing for an IMPORTED target, or
        an ALIAS target is missing?
      
      
      CMake Error at ext/libstrawberry-tagreader/CMakeLists.txt:35 (add_library):
        Target "libstrawberry-tagreader" links to target "ZLIB::ZLIB" but the
        target was not found.  Perhaps a find_package() call is missing for an
        IMPORTED target, or an ALIAS target is missing?
      
      
      CMake Error at ext/strawberry-tagreader/CMakeLists.txt:20 (add_executable):
        Target "strawberry-tagreader" links to target "ZLIB::ZLIB" but the target
        was not found.  Perhaps a find_package() call is missing for an IMPORTED
        target, or an ALIAS target is missing?
      
      
      -- Generating done
      CMake Generate step failed.  Build files cannot be regenerated correctly.
      

      I have zlib and all the other requirements installed. Does anybody know how to solve this error? Thanks

      jonasJ 1 Reply Last reply
      Reply Quote 0
      • jonasJ
        jonas @Guest
        last edited by jonas

        @berry
        This seem like a bug with your systems cmake files. Something is adding zlib::zlib, but the target isn't set. Protobuf is probably what's linking to zlib.
        Try adding find_package(ZLIB REQUIRED), or manually adding Protobuf_LIBRARIES to the cmake command as a workaround.

        ? 1 Reply Last reply
        Reply Quote 0
        • ?
          A Former User @jonas
          last edited by [[global:former-user]]

          @jonas Thanks, that worked!

          This seem like a bug with your systems cmake files.

          I'm not sure how that happened. I'm using unmodified src code.

          1 Reply Last reply
          Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          Powered by NodeBB | Contributors