Bug 204488

Summary: multimedia/qt5-multimedia : package build fails with ALSA option
Product: Ports & Packages Reporter: Henrik Hudson <ports>
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed FIXED    
Severity: Affects Only Me CC: shurd
Priority: --- Keywords: needs-patch, needs-qa, regression
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
poudriere build log
none
Fixes Alsa version test.
none
Fix Alsa version checking none

Description Henrik Hudson 2015-11-12 07:00:36 UTC
Created attachment 163033 [details]
poudriere build log

Try to build multimedia/qt5-multimedia and it's been breaking for the last few days.

I'm building via poudriere.

options are:
AUDIOPLUGIN = yes  (was no; still failed)
GSTREAMER = yes
OPENAL = no

ALSA - selected plugin


The error log throws:
===========================================================================
=======================<phase: package        >============================
===>  Building package for qt5-multimedia-5.4.1_1
pkg-static: Unable to access file /wrkdirs/usr/ports/multimedia/qt5-multimedia/work/stage/usr/local/lib/cmake/Qt5Multimedia/Qt5Multimedia_QAlsaPlugin.cmake: No
 such file or directory                                                                                                                                        pkg-static: Unable to access file /wrkdirs/usr/ports/multimedia/qt5-multimedia/work/stage/usr/local/lib/qt5/plugins/audio/libqtaudio_alsa.so: No such file or d
irectory                                                                                                                                                       *** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/qt5-multimedia


Full log attached. Looks like cmake isn't finding alsa?
Comment 1 Stephen Hurd freebsd_committer freebsd_triage 2015-11-27 12:45:26 UTC
Created attachment 163579 [details]
Fixes Alsa version test.

Was checking for Alsa v1.0.x where x >= 10.

Patch adds support for 1.x.* where x > 0
Comment 2 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-11-27 14:02:55 UTC
Nice catch, but I think the patch also needs to touch some source files: there are several checks for "SND_LIB_MINOR == 0" in the code that also need to be updated.

I've submitted https://codereview.qt-project.org/#/c/142325/ for upstream to take a look at it.
Comment 3 Stephen Hurd freebsd_committer freebsd_triage 2015-11-27 18:37:52 UTC
Created attachment 163588 [details]
Fix Alsa version checking

Change tests for version 1.0.x where x > z to checks for version 1.x.y where x is greater than zero or y is greater than z.

Update old patch.
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-11-30 09:57:50 UTC
A commit references this bug:

Author: rakuco
Date: Mon Nov 30 09:57:08 UTC 2015
New revision: 402657
URL: https://svnweb.freebsd.org/changeset/ports/402657

Log:
  Add upstream patch to fix the build with ALSA 1.1.0.

  Some checks were too strict and assuming SND_LIB_MINOR was always 0. This
  was making ALSA detection fail and preventing the plugins from being built
  when the ALSA option was on.

  Thanks to Stephen Hurd (shurd@) for pointing to the cause of the problem and
  providing an initial version of the patch.

  This does not need to be merged into 2015Q4 because it still contains ALSA
  1.0.29.

  PR:		204488

Changes:
  head/multimedia/qt5-multimedia/files/
  head/multimedia/qt5-multimedia/files/patch-git_3b322323
Comment 5 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-11-30 09:58:32 UTC
Landed and fixed. Thanks everyone!