Bug 236660 - [patch] multimedia/emby-server: prevent useless optional features from being enabled at configure time
Summary: [patch] multimedia/emby-server: prevent useless optional features from being ...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Steve Wills
URL:
Keywords:
Depends on: 237801
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-20 11:54 UTC by Samy Mahmoudi
Modified: 2019-06-01 06:07 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (alucryd)


Attachments
Patch file generated with svn diff (454 bytes, patch)
2019-03-20 11:54 UTC, Samy Mahmoudi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samy Mahmoudi 2019-03-20 11:54:42 UTC
Created attachment 203002 [details]
Patch file generated with svn diff

LIB_DEPENDS+=libasound.so:audio/alsa-lib
Comment 1 Dries Michiels freebsd_committer freebsd_triage 2019-03-20 13:45:14 UTC
Hi!

How did you notice the “missing” library? 
Did any problem occur because of this?
Comment 2 Samy Mahmoudi 2019-03-20 15:00:09 UTC
(In reply to Dries Michiels from comment #1)

Hi,

> How did you notice the “missing” library?
I have set DEVELOPER=YES in /etc/make.conf which, among other things, makes make to run Q/A tests:

====> Running Q/A tests (stage-qa)
Error: /usr/local/lib/emby-server/bin/ffmpeg is linked to /usr/local/lib/libasound.so.2 from audio/alsa-lib but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libasound.so:audio/alsa-lib

You could also execute "make stage-qa" to run these tests (e.g. without DEVELOPER=YES).

> Did any problem occur because of this?
No problem occured, because I already had audio/alsa-lib installed (because I have chrome/firefox/gimp-app which depends on audio/alsa-lib). But a problem may occur if one try to install emby-server without having audio/alsa-lib.

Moreover, even if no problem occurs now, dependency should be signaled to the FreeBSD port system. After an update of a library, it is sometimes necessary to rebuild all the ports that depends on that library. If such an update of audio/alsa-lib occurs, we would easily get that emby-server needs to be rebuilt.
Comment 3 Dries Michiels freebsd_committer freebsd_triage 2019-03-20 15:08:42 UTC
Interesting that one slipped my QA in Poudriere with the initial patch of updating emby to 4.0.2.0. Thanks.
Comment 4 Samy Mahmoudi 2019-03-20 15:20:09 UTC
I am currently executing a testport in poudriere (without the addition).
Comment 5 Samy Mahmoudi 2019-03-20 15:36:34 UTC
(In reply to Dries Michiels from comment #3)

> Interesting that one slipped my QA in Poudriere with the initial patch of updating emby to 4.0.2.0.
Your comment made me understand the problem: because I had audio/alsa-lib installed, the embedded ffmpeg enabled alsa support at configure time. Consequently, the embedded ffmpeg get built and linked to /usr/local/lib/libasound.so.2 which triggered the warning.
Comment 6 Dries Michiels freebsd_committer freebsd_triage 2019-03-20 18:19:57 UTC
I thought the "--disable-autodetect" fixed that but it appears to only work on system libraries. A solution would be to explicitly set all auto detected options to disable in the configure args. These options can be search in the ffmpeg configure script, options which will try auto detection.
Comment 7 Maxime Gauduin 2019-03-22 08:10:10 UTC
We can also explicitly disable options not suitable for server use, like alsa, pulse and the likes.
Comment 8 Samy Mahmoudi 2019-03-22 10:47:18 UTC
(In reply to Dries Michiels from comment #6)
(In reply to Maxime Gauduin from comment #7)

In those cases, we could start to enumerate options that would be useless in emby-server:

alsa
cdio
libdc1394
libjack
libpulse
libxcb
openal
opengl (I doubt about opengl being able to accelerate encoding)
outdev=xv
sdl2
sndio

Copy-paste, correct and update as you need if that solution is retained.
Comment 9 Dries Michiels freebsd_committer freebsd_triage 2019-05-24 11:33:00 UTC
Hi Swills! Thank you for grabbing this PR, there should be a patch up in phabricator to fix this together with the update to latest version of this port. Would be awesome if you could get that in the tree!

Reference (link to phab review in the PR):
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237801
Comment 10 Kurt Jaeger freebsd_committer freebsd_triage 2019-06-01 06:07:15 UTC
The relevant changes were in PR#237801