NetBSD Problem Report #57070

From john@daisy.zia.io  Sun Oct 23 21:45:29 2022
Return-Path: <john@daisy.zia.io>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1252E1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 23 Oct 2022 21:45:29 +0000 (UTC)
Message-Id: <202210232145.29NLjJ8P010819@daisy.zia.io>
Date: Sun, 23 Oct 2022 21:45:19 GMT
From: john@ziaspace.com
Reply-To: john@ziaspace.com
To: gnats-bugs@NetBSD.org
Subject: multimedia/handbrake doesn't build
X-Send-Pr-Version: 3.95

>Number:         57070
>Category:       pkg
>Synopsis:       multimedia/handbrake doesn't build on NetBSD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 23 21:50:00 +0000 2022
>Closed-Date:    Sun Apr 09 18:24:39 +0000 2023
>Last-Modified:  Sun Apr 09 18:24:39 +0000 2023
>Originator:     John Klos
>Release:        NetBSD 9.2_STABLE
>Organization:

>Environment:


System: NetBSD daisy.zia.io 9.2_STABLE NetBSD 9.2_STABLE (DAISY) #0: Sun Mar 13 01:23:07 UTC 2022 john@daisy.zia.io:/usr/obj-amd64/sys/arch/amd64/compile/DAISY amd64
Architecture: x86_64
Machine: amd64
>Description:

On NetBSD 9.2/amd64 with pkgsrc from today (23-Oct-2022), multimedia/handbrake fails:
...
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing libtool commands
touch gtk/.stamp.configure
*** Error code 2

Stop.
make[1]: stopped in /usr/pkgsrc/multimedia/handbrake
*** Error code 1

with options -gtk3, it fails differently:
...
../libhb/lang.c:291:35: warning: array subscript has type 'char' [-Wchar-subscripts]
  291 |     code_string[2] = tolower( code[2] );
      |                                   ^
../libhb/hb.c:18:10: fatal error: turbojpeg.h: No such file or directory
   18 | #include <turbojpeg.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
gmake: *** [../libhb/module.rules:12: libhb/hb.o] Error 1
gmake: *** Waiting for unfinished jobs....
*** Error code 2

Stop.
make[1]: stopped in /usr/pkgsrc/multimedia/handbrake
*** Error code 1

>How-To-Repeat:

>Fix:


>Release-Note:

>Audit-Trail:
From: Iain Hibbert <plunky@ogmig.net>
To: john@ziaspace.com
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/57070 multimedia/handbrake doesn't build
Date: Sat, 8 Apr 2023 12:44:50 +0100 (BST)

 Hello

 This failure is because handbrake requires libjpeg-turbo and the 
 jpeg.buildlink3.mk file does not select it correctly:

 % cd /usr/pkgsrc/multimedia/handbrake
 % make -V '${JPEG_DEFAULT}' -V '${JPEG_ACCEPTED}' -V '${JPEG_TYPE}'
 jpeg
 libjpeg-turbo
 jpeg
 %

 This I guessed was because the tiff buildlink3.mk file has already 
 included jpeg.buildlink3.mk before JPEG_ACCEPTED is set. However, setting 
 that explicitly still does not work:

 % make JPEG_ACCEPTED=libjpeg-turbo -V '${JPEG_DEFAULT}' -V '${JPEG_ACCEPTED}' -V '${JPEG_TYPE}'
 jpeg
 libjpeg-turbo
 none
 %

 So there are cascading failures here which I did not follow as I see that 
 it cannot work anyway, as graphics/jpeg and graphics/libjpeg-turbo are 
 conflicting, so in fact a package cannot really define JPEG_ACCEPTED until 
 the conflict is overcome.

 (multimedia/handbrake is the only package which defines JPEG_ACCEPTED)

 Adding JPEG_DEFAULT=libjpeg-turbo to /etc/mk.conf will allow handbrake to 
 build successfully. However, you may need to rebuild all your packages in 
 that case.

 I have not looked in detail but see that handbrake internally has a 
 libjpeg-turbo module, which is possibly built as static and linked right 
 in, perhaps that would be a better solution

 regards,
 iain

From: "Iain Hibbert" <plunky@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57070 CVS commit: pkgsrc/multimedia/handbrake
Date: Sun, 9 Apr 2023 08:57:20 +0000

 Module Name:	pkgsrc
 Committed By:	plunky
 Date:		Sun Apr  9 08:57:19 UTC 2023

 Modified Files:
 	pkgsrc/multimedia/handbrake: Makefile distinfo
 	pkgsrc/multimedia/handbrake/patches: patch-make-include-main.defs

 Log Message:
 fix build

 HandBrake requires libjpeg-turbo, and as this conflicts with the default libjpeg
 which is used by gtk3, remove the jpeg dependency and provide libjpeg-turbo
 directly, which will be linked statically.

 fixes PR#57070


 To generate a diff of this commit:
 cvs rdiff -u -r1.90 -r1.91 pkgsrc/multimedia/handbrake/Makefile
 cvs rdiff -u -r1.17 -r1.18 pkgsrc/multimedia/handbrake/distinfo
 cvs rdiff -u -r1.3 -r1.4 \
     pkgsrc/multimedia/handbrake/patches/patch-make-include-main.defs

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: plunky@NetBSD.org
State-Changed-When: Sun, 09 Apr 2023 18:24:39 +0000
State-Changed-Why:
fixed the issue


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.