Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

[Solved] Zlib not found when compiling Kodi

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
thegrind
n00b
n00b
Posts: 60
Joined: Sun Sep 22, 2024 2:56 am

[Solved] Zlib not found when compiling Kodi

  • Quote

Post by thegrind » Fri Jun 20, 2025 11:23 pm

I wanted to upgrade to Kodi 22 so I tried to emerge from the Gentoo repo but it failed saying Zlib not found even though it is installed and it is the latest version. I then tried the kodi-overlay for Gentoo on Github and it gave me the same error. Finally, I just did a git pull from xbmc and did cmake and got the same Zlib error. Does anyone know how to fix this?I looked at the logs and it is looking in the /usr/lib64 and /usr/include where one has the so file and the other has the .h file.
Last edited by thegrind on Sat Jun 21, 2025 10:45 pm, edited 1 time in total.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jun 21, 2025 12:06 am

When the ebuild failed, Portage should have directed you to post certain information. We stand a better chance of helping you if you post the information that it told you to share. You may need to use a pastebin for the larger logs.
Top
thegrind
n00b
n00b
Posts: 60
Joined: Sun Sep 22, 2024 2:56 am

  • Quote

Post by thegrind » Sat Jun 21, 2025 1:29 am

Here is the log from when I tried to compile kodi.

https://pastebin.com/DYhG3Ui4
Top
thegrind
n00b
n00b
Posts: 60
Joined: Sun Sep 22, 2024 2:56 am

  • Quote

Post by thegrind » Sat Jun 21, 2025 3:32 am

Okay, I added this to the compile Kodi from git cmake line -DZLIB_LIBRARY=/usr/lib64/libz.so and it didn't give me the Zib error.

The problem is that I don't know how to fix this when I do an emerge. Export?
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jun 21, 2025 2:41 pm

That pastebin link does not appear to be the build.log, nor to contain any of the standard Portage troubleshooting output. It looks like one part of a manual build, outside of Portage.

The ebuild should produce a working program without you needing to export anything. If it does not, then either something is wrong with your system or there is a bug in the ebuild. In either case, we can try to help you isolate the problem. To start, please provide the standard Portage troubleshooting output. Also, show the output of namei -l /{usr/,}lib{,64}.
Top
thegrind
n00b
n00b
Posts: 60
Joined: Sun Sep 22, 2024 2:56 am

  • Quote

Post by thegrind » Sat Jun 21, 2025 4:38 pm

Here is the build log. I tried exporting the Clfag and adding it to the emerge command neither worked.

https://pastebin.com/X4giXL22

Code: Select all

f: /usr/lib
drwxr-xr-x root root /
drwxr-xr-x root root usr
drwxr-xr-x root root lib
f: /usr/lib64
drwxr-xr-x root root /
drwxr-xr-x root root usr
drwxr-xr-x root root lib64
f: /lib
drwxr-xr-x root root /
lrwxrwxrwx root root lib -> usr/lib
drwxr-xr-x root root   usr
drwxr-xr-x root root   lib
f: /lib64
drwxr-xr-x root root /
lrwxrwxrwx root root lib64 -> usr/lib64
drwxr-xr-x root root   usr
drwxr-xr-x root root   lib64
Top
Ridrok
Tux's lil' helper
Tux's lil' helper
Posts: 127
Joined: Sun Jan 26, 2014 3:17 pm
Location: France

  • Quote

Post by Ridrok » Sat Jun 21, 2025 4:46 pm

I had the same problem
In /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake it go to line 603 in this condition

Code: Select all

if(NOT VERSION_OK)
So maybe gentoo zlib is too old.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jun 21, 2025 5:23 pm

Gentoo packages, and OP has, zlib 1.3.1, which is the newest available according to https://zlib.net/[b][/b]. According to the build log, it failed to find the associated library.

OP appears to be on an aarch64 system. This may or may not be related.
Top
Ridrok
Tux's lil' helper
Tux's lil' helper
Posts: 127
Joined: Sun Jan 26, 2014 3:17 pm
Location: France

  • Quote

Post by Ridrok » Sat Jun 21, 2025 5:27 pm

Yes I checked, but can the problem be related to this newest commit
https://github.com/madler/zlib/commit/d ... 8cf3646638
Maybe having it may also fix kodi
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jun 21, 2025 6:15 pm

The commit message for that commit is Repair MinGW cmake build. The body of the commit is solely for the benefit of Windows users. OP is using Linux on aarch64, which is not Windows.
Top
rzsn
n00b
n00b
Posts: 2
Joined: Sat Jun 21, 2025 8:56 pm

Solution: zlib as static

  • Quote

Post by rzsn » Sat Jun 21, 2025 9:02 pm

I met this issue as well (x86-64)

So I run this:

Code: Select all

# USE=static-libs emerge -av1 sys-libs/zlib

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 2.84 s (backtrack: 0/20).

[ebuild   R    ] sys-libs/zlib-1.3.1-r1:0/1::gentoo  USE="static-libs* -minizip -verify-sig" ABI_X86="(64) -32 (-x32)" 0 KiB
and then kodi-9999 went to compile phase without the cmake failure.

Will add the use flag to zlib therefore through portage. I advise to request such flag in kodi-9999 dependencies.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jun 21, 2025 10:41 pm

Static libraries are almost never the right answer. This may suffice as a workaround, but the build should be fixed to work with dynamic libraries.
Top
thegrind
n00b
n00b
Posts: 60
Joined: Sun Sep 22, 2024 2:56 am

  • Quote

Post by thegrind » Sat Jun 21, 2025 10:45 pm

It turned out to be an easy fix. I just went to the /var/db/repo and then went to the repo I am using which in my case is kodi-overlay. I then just went to the kodi-9999 ebuild file and just searched for cmake and where it lists the flags I just added -DZLIB_LIBRARY=/usr/lib64/libz.so to the list and kodi merged without issue.

I didn't see this problem with the kodi-pvr-iptvsimple emerge as this didn't have any issues.

Kodi 22 is really nice. Well worth the effort.
Top
sam_
Developer
Developer
User avatar
Posts: 2814
Joined: Fri Aug 14, 2020 12:33 am

  • Quote

Post by sam_ » Sat Jun 28, 2025 8:16 am

It's a shame that none of the people who hit this filed a bug (someone else did on IRC too). Oh well.

Anyway, the real issue was introduced by https://github.com/xbmc/xbmc/pull/26797 and is fixed by https://github.com/xbmc/xbmc/pull/26886[b][/b]. It only affected the live ebuild.
Top
Post Reply

14 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy