Bug 260490 - multimedia/kodi missing dependencies
Summary: multimedia/kodi missing dependencies
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Jason W. Bacon
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2021-12-17 11:58 UTC by halfagascan
Modified: 2022-01-29 17:00 UTC (History)
4 users (show)

See Also:
yzrh: maintainer-feedback+


Attachments
Patch to unbreak package build by disabling libdvdcss by default (1.62 KB, patch)
2022-01-27 00:37 UTC, Jason W. Bacon
yzrh: maintainer-approval-
Details | Diff
disable libdvdcss option by default (715 bytes, patch)
2022-01-27 23:13 UTC, yzrh
no flags Details | Diff
Updated patch to unbreak package build by disabling libdvdcss by default (1.47 KB, patch)
2022-01-27 23:53 UTC, Jason W. Bacon
yzrh: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description halfagascan 2021-12-17 11:58:35 UTC
clean install
FreeBSD frebbie 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24
pkg install kodi
startx = kodi does not start.
Missing dependencies:
libbluray, libcec, dav1d, lcms2, libass, libcrossguid
libavcodec, avcodec, ffmpeg,libfmt,libfstrcmp,fstrcmp
liblzo,lzo2,spdlog,sqlite3,taglib,waylandpp,libglvnd
libGLU,libvdpau

pkg install all above = functional kodi.

After stopping kodi, errors about libvdpau not found, pkg install says the latest
is installed.
Comment 1 Bernhard Froehlich freebsd_committer freebsd_triage 2021-12-17 12:34:51 UTC
I can confirm that there are some dependencies missing but it does not look like a kodi problem.

On a more or less clean FreeBSD 13.0:

# pkg install kodi
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: kodi has a missing dependency: libdvdcss
The following 60 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	expat: 2.4.1
	freetype2: 2.11.1
	gettext-runtime: 0.21
	glib: 2.70.2,2
	gmp: 6.2.1
	gnutls: 3.6.16
	indexinfo: 0.3.1
	kodi: 19.3
	libX11: 1.7.2,1
	libXau: 1.0.9
	libXdmcp: 1.1.3
	libXext: 1.3.4,1
	libXfixes: 6.0.0
	libXrandr: 1.5.2
	libXrender: 0.9.10_2
	libcddb: 1.3.2_4
	libcdio: 2.1.0
	libdrm: 2.4.109,1
	libdvdnav: 6.1.1
	libdvdread: 6.1.2
	libepoll-shim: 0.0.20210418
	libevdev: 1.9.1.20200928
	libffi: 3.3_1
	libgcrypt: 1.9.4
	libgpg-error: 1.43
	libgudev: 234
	libiconv: 1.16
	libidn2: 2.3.2
	libinput: 1.19.1_1
	libmicrohttpd: 0.9.73
	libmtdev: 1.1.6_1
	libpciaccess: 0.16
	libpthread-stubs: 0.4
	libtasn1: 4.18.0
	libudev-devd: 0.5.0
	libunistring: 0.9.10_1
	libva: 2.13.0_1
	libvdpau: 1.4
	libwacom: 1.5
	libxcb: 1.14_1
	libxkbcommon: 1.3.1
	libxml2: 2.9.12
	libxslt: 1.1.34_2
	mpdecimal: 2.5.1
	nettle: 3.7.3
	p11-kit: 0.24.0
	pciids: 20211028
	png: 1.6.37_1
	py38-evdev: 1.4.0
	py38-pyudev: 0.22.0
	py38-setuptools: 57.0.0
	py38-six: 1.16.0
	python38: 3.8.12_1
	readline: 8.1.1
	tinyxml: 2.6.2_4
	tpm-emulator: 0.7.4_2
	trousers: 0.3.14_3
	wayland: 1.20.0
	xkeyboard-config: 2.34
	xorgproto: 2021.5


Now let's compare this with the dependencies liste in the kodi port:

LIB_DEPENDS=    libass.so:multimedia/libass \
                libavcodec.so:multimedia/ffmpeg \
                libavfilter.so:multimedia/ffmpeg \
                libavformat.so:multimedia/ffmpeg \
                libavutil.so:multimedia/ffmpeg \
                libcdio.so:sysutils/libcdio \
                libcrossguid.so:devel/libcrossguid \
                libcurl.so:ftp/curl \
                libdav1d.so:multimedia/dav1d \
                libdvdnav.so:multimedia/libdvdnav \
                libdvdread.so:multimedia/libdvdread
                ....

The first dependency libass is already missing, ffmpeg is missing too and many more.

So my conclusion at the moment is that either the package set on the package mirrors is crap or some changes to pkg or poudriere have cause this breakage.
Comment 2 yzrh 2021-12-18 11:24:38 UTC
The problem seems to disappear with new package build.  I guess
the workaround for now is pkg install the missing dependencies and
pkg set -A1.

Does pkg check -da report anything at all?
Comment 3 halfagascan 2021-12-18 11:29:26 UTC
pkg check -da

Checking all packages: 100%
Comment 4 halfagascan 2021-12-18 17:35:40 UTC
ok, another frsh, clean install
After installing freebsd:
pkg check -adn 
no issues
pkg install desktop-installer
completes, no errors
pkg check -adn
no issues
pkg install kodi
kodi installs no errors about missing dep's
pkg check -adn :

Checking all packages: .......... done
kodi has a missing dependency: libdvdcss
kodi has a missing dependency: libcec
kodi has a missing dependency: libbluray
kodi has a missing dependency: libass
kodi has a missing dependency: ffmpeg
kodi has a missing dependency: dav1d
kodi has a missing dependency: e2fsprogs-libuuid
kodi has a missing dependency: waylandpp
kodi has a missing dependency: libGLU
kodi has a missing dependency: lcms2
kodi has a missing dependency: jpeg-turbo
kodi has a missing dependency: gtk-update-icon-cache
kodi has a missing dependency: giflib
kodi has a missing dependency: gdk-pixbuf2
kodi has a missing dependency: spdlog
kodi has a missing dependency: libfmt
kodi has a missing dependency: libcrossguid
kodi has a missing dependency: fstrcmp
kodi has a missing dependency: sqlite3
kodi has a missing dependency: taglib
kodi has a missing dependency: lzo2
kodi has a missing dependency: atk
kodi is missing a required shared library: libavutil.so.56
kodi is missing a required shared library: libjpeg.so.8
kodi is missing a required shared library: libsqlite3.so.0
kodi is missing a required shared library: libspdlog.so.1
kodi is missing a required shared library: libuuid.so.1
kodi is missing a required shared library: libgif.so.7
kodi is missing a required shared library: libdvdcss.so.2
kodi is missing a required shared library: libavfilter.so.7
kodi is missing a required shared library: libwayland-client++.so.0
kodi is missing a required shared library: libbluray.so.2
kodi is missing a required shared library: libswscale.so.5
kodi is missing a required shared library: libcec.so.6
kodi is missing a required shared library: libavformat.so.58
kodi is missing a required shared library: libwayland-egl++.so.0
kodi is missing a required shared library: liblcms2.so.2
kodi is missing a required shared library: libpostproc.so.55
kodi is missing a required shared library: libwayland-cursor++.so.0
kodi is missing a required shared library: libGLU.so.1
kodi is missing a required shared library: libswresample.so.3
kodi is missing a required shared library: libfstrcmp.so.0
kodi is missing a required shared library: liblzo2.so.2
kodi is missing a required shared library: libavcodec.so.58
kodi is missing a required shared library: libcrossguid.so.0
kodi is missing a required shared library: libdav1d.so.5
kodi is missing a required shared library: libfmt.so.8
kodi is missing a required shared library: libtag.so.1
kodi is missing a required shared library: libass.so.9

So something is NOT checking for dependencies.
This is on a different drive, shutdown, uncable, recable, power up.
Then I'll do the "pkg -da kodi".

yzrh,from my perspective, pkg install should just work,and it does, most of the time, and a new user should not have to resort to some unknown command to accomplish adding and using a program, having said that, I'm not sure where the error originates from, pkg install, or pkg install from desktop-installer.
Thanks
Comment 5 halfagascan 2021-12-18 19:17:14 UTC
ok, some good progress
pkg check -da fails, don't remember the exact error, but was the same as in Comment#4. First on the list was libdvdcss, so I started there.
A search on:  https://www.freshports.org/multimedia/libdvdcss/
shows:
PKGNAME: there is no package for this port: _LICENSE_RESTRICTED = delete-package delete-distfiles 
and suggests:
cd /usr/ports/multimedia/libdvdcss/ && make install clean

Did that, and pkg check -da, finds and installs the missing dependencies, startx = a good interface.

I'm still baffled as why the install of kodi completes with no errors about missing dependencies.
Thanks
Comment 6 yzrh 2021-12-18 22:15:22 UTC
Looking at the Makefile of multimedia/libdvdcss, could it
have been `LICENSE=     GPLv2 DMCA'?  Does poudriere build
packages with DMCA now?  Because on one of my system

pkg info | grep libdvdcss
libdvdcss-1.4.2_2              Portable abstraction library for DVD decryption

It does not explain why pkg omitted dependency check.  I suppose
the behaviour is not kodi specific?
Comment 7 halfagascan 2021-12-18 23:57:07 UTC
well, I have no clue, I've just started using freebsd, long time linux user, I've installed kodi on many linux, never a problem, just other problems, that's why I'm switching.
Kinda curious as to why there are very few kodi users on freebsd.
At any rate, maybe a note somewhere would be appropriate, warning about the need for libdvdcss to be installed via make.
Thanks
Comment 8 Graham Perrin freebsd_committer freebsd_triage 2021-12-22 23:29:14 UTC
(In reply to halfagascan from comment #0)

> 13.0-RELEASE-p4

I wonder whether a partial explanation for some of what's in this bug might be found in build histories: 

<https://pkg-status.freebsd.org/builds?type=package&jailname=130amd64> 

Assuming packages from quarterly (not latest): 

<http://beefy14.nyi.freebsd.org/jail.html?mastername=130amd64-quarterly> where the latest was (currently) <http://beefy14.nyi.freebsd.org/build.html?mastername=130amd64-quarterly&build=1507509936f2> with multimedia/libdvdcss second in the list of things that were built …

… and so on. 

----

Here, today: 

root@mowa219-gjp4-8570p-freebsd:~ # pkg install -n kodi
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
poudriere repository is up to date.
All repositories are up to date.
pkg: kodi has a missing dependency: libdvdcss
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        kodi: 19.3 [FreeBSD]
        libmicrohttpd: 0.9.73 [FreeBSD]
        tinyxml: 2.6.2_4 [FreeBSD]

Number of packages to be installed: 3

The process will require 65 MiB more space.
26 MiB to be downloaded.
root@mowa219-gjp4-8570p-freebsd:~ # date 
Wed Dec 22 23:22:33 GMT 2021
root@mowa219-gjp4-8570p-freebsd:~ # pkg -vv | grep -e url -e enabled
    url             : "pkg+http://pkg0.bme.freebsd.org/FreeBSD:14:amd64/latest",
    enabled         : yes,
    url             : "https://alpha.pkgbase.live/current/FreeBSD:14:amd64/latest",
    enabled         : no,
    url             : "file:///usr/local/poudriere/data/packages/main-default",
    enabled         : yes,
root@mowa219-gjp4-8570p-freebsd:~ # uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #116 main-n251146-d109559ddbf: Mon Nov 29 14:34:59 GMT 2021     root@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64 1400043 1400043
root@mowa219-gjp4-8570p-freebsd:~ #
Comment 9 Graham Perrin freebsd_committer freebsd_triage 2021-12-23 08:38:46 UTC
% uname -KU
1400043 1400043
% pkg provides libdvdcss
Name    : dvdvideo-py38-20130117_2
Desc    : Video DVD backup tool
Repo    : FreeBSD
Filename: usr/local/lib/python3.8/site-packages/dvdvideo/libdvdcss.py
          usr/local/lib/python3.8/site-packages/dvdvideo/__pycache__/libdvdcss.cpython-38.pyc
          usr/local/lib/python3.8/site-packages/dvdvideo/__pycache__/libdvdcss.cpython-38.opt-1.pyc
% pkg info -x dvdvideo-py38
pkg: No package(s) matching dvdvideo-py38
% pkg search dvdvideo-py38
dvdvideo-py38-20130117_2       Video DVD backup tool
% sudo pkg install -n sysutils/dvdvideo
grahamperrin's password:
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
poudriere repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        dvdvideo-py38: 20130117_2 [FreeBSD]

Number of packages to be installed: 1

29 KiB to be downloaded.
% 

----

<https://www.freshports.org/sysutils/dvdvideo/#requiredrun>

> There are no ports dependent upon this port
Comment 10 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-26 17:21:38 UTC
(In reply to halfagascan from comment #7)

Is kodi generally usable without libdvdcss?  Maybe that option could be switched to default off as a stop-gap to at least get the package to function.

Ideally, it would be nice if the kodi package could be built without it, but detect it at run-time, so that "pkg install kodi" would work, and libdvdcss can be installed via source after the fact.

I recall when the libdvdcss package went away due to licensing issues.  I had to drop it from desktop-installer as a result.
Comment 11 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-26 17:23:02 UTC
(In reply to Graham Perrin from comment #9)

I think what's needed here is libdvdcss.so.  dvdvideo-py38-20130117_2 appears to only install python bindings.
Comment 12 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-26 20:50:52 UTC
FYI, if someone wants a full installation with libdvdcss support the simple way, they can do the following:

1) Make sure everything is up-to-date

pkg install auto-admin
auto-update-system --defaults

2) Install kodi from source

cd /usr/ports/multimedia/kodi
make -DBATCH install

This will take a while, but should successfully build and install libdvdcss as s dependency.  One could speed it up by installing dependencies using pkg, but you have to make sure your pkg repo and ports tree are in sync before mixing like this.  Installing auto-admin and run auto-update-system will ensure that, provided you're using an architecture and ports branch where it's possible.  that means any branch on amd64 or quarterly on other architectures.  Latest packages are not maintained regularly on other architectures yet, though it will probably happen for aarch64 and riscv in the future.

2) Use auto-update-system to speed up maintenance after that:

auto-mark-install-from-source multimedia/libdvdcss license
auto-mark-install-from-source multimedia/kodi libdvdcss

From here on, running auto-update-system will update everything except libdvdcss and kodi using binary packages, then update the ports tree, them reinstall libdvdcss from source and reinstall kodi from source.

Be sure to mark both libdvdcss and kodi, in that order.  Otherwise, libdvdcss will be get updated and your home-built kodi install will be replaced by the binary package or build against the old libdvdcss.
Comment 13 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-26 20:53:53 UTC
(In reply to Jason W. Bacon from comment #12)

To be clear, auto-update-system will actually update kodi as part of the pkg upgrade run, but will then replace it with a build from source.
Comment 14 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-27 00:37:12 UTC
Created attachment 231372 [details]
Patch to unbreak package build by disabling libdvdcss by default

The attached patch should unbreak the binary package.  I'm not aware of any way to have a binary package with libdvdcss support at this time, though I'm not familiar with Kodi.  Maybe it's possible to enable libdvdcss with a separate plugin port or have it auto-detected and enabled with dlopen()?
Comment 15 yzrh 2022-01-27 23:13:36 UTC
Created attachment 231396 [details]
disable libdvdcss option by default

So the cause is indeed the (non-existence of) binary package of libdvdcss.

The patch disables it by default and also bumps PORTREVISION.
INSTALLS_ICONS has been retired, it is fine to omit it.
Comment 16 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-27 23:43:21 UTC
(In reply to yzrh from comment #15)

Yes, and I'm not sure why the package build succeeds when a default-on dependency is missing.  Seems like something that should be reviewed.

Thanks for the heads-up on INSTALLS_ICONS.  I'll open a PR for portlint to get the warning removed.
Comment 17 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-27 23:53:19 UTC
Created attachment 231398 [details]
Updated patch to unbreak package build by disabling libdvdcss by default

Did you intend to drop the pkg-message from my first proposed patch?  Resubmitting here with your patch + pkg-message.

Also, if you propose an alternative patch, don't forget to check the "Obsoletes" box(es).

If you're good with this one, I'll commit and MFH to 2022Q1.
Comment 18 yzrh 2022-01-28 18:03:48 UTC
Comment on attachment 231398 [details]
Updated patch to unbreak package build by disabling libdvdcss by default

Let's keep pkg-message for those having fun with DVDs.
The patch looks good to me.
Comment 19 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-28 18:47:46 UTC
(In reply to yzrh from comment #18)

Great.  Can you flip maintainer approval to '+' in the patch details?  This is the normal procedure for approving a patch.

Thanks.
Comment 20 yzrh 2022-01-28 20:52:32 UTC
(In reply to Jason W. Bacon from comment #19)

I can't change it for some reason.  Maybe I am not the requestee?
Comment 21 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-29 00:04:54 UTC
(In reply to yzrh from comment #20)

Weird.  I thought it would default to the maintainer, but maybe it's not that smart.  Try it now..
Comment 22 commit-hook freebsd_committer freebsd_triage 2022-01-29 16:46:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=94753e8d69e37978bab386c456020fedd7bb089d

commit 94753e8d69e37978bab386c456020fedd7bb089d
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2022-01-29 16:38:59 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2022-01-29 16:45:05 +0000

    multimedia/kodi: Unbreak package, failing due to missing libdvdcss

    libdvdcss, which is no longer packaged for legal reasons, was a
    default-on OPTION.  Package builds were succeeding, but the binary
    complained of missing libraries.  This update makes libdvdcss
    default-off and adds a pkg-message about building from source for
    those who need it encrypted DVD support.

    PR:             260490
    Reported by:    ravens10@tutanota.com
    MFH:            2022Q1

 multimedia/kodi/Makefile          |  4 ++--
 multimedia/kodi/pkg-message (new) | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
Comment 23 commit-hook freebsd_committer freebsd_triage 2022-01-29 16:59:07 UTC
A commit in branch 2022Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b829b65dc5123ad8f66f954df8df6dbba2cfa28f

commit b829b65dc5123ad8f66f954df8df6dbba2cfa28f
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2022-01-29 16:38:59 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2022-01-29 16:57:57 +0000

    multimedia/kodi: Unbreak package, failing due to missing libdvdcss

    libdvdcss, which is no longer packaged for legal reasons, was a
    default-on OPTION.  Package builds were succeeding, but the binary
    complained of missing libraries.  This update makes libdvdcss
    default-off and adds a pkg-message about building from source for
    those who need it encrypted DVD support.

    PR:             260490
    Reported by:    ravens10@tutanota.com
    MFH:            2022Q1

    (cherry picked from commit 94753e8d69e37978bab386c456020fedd7bb089d)

 multimedia/kodi/Makefile          |  4 ++--
 multimedia/kodi/pkg-message (new) | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
Comment 24 Jason W. Bacon freebsd_committer freebsd_triage 2022-01-29 17:00:03 UTC
Thanks for the report!