NetBSD Problem Report #56502

From www@netbsd.org  Tue Nov 16 07:19:57 2021
Return-Path: <www@netbsd.org>
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 5FFC71A9239
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 16 Nov 2021 07:19:57 +0000 (UTC)
Message-Id: <20211116071955.E66271A923A@mollari.NetBSD.org>
Date: Tue, 16 Nov 2021 07:19:55 +0000 (UTC)
From: pekdon@gmail.com
Reply-To: pekdon@gmail.com
To: gnats-bugs@NetBSD.org
Subject: ffmpegthumbnailer fails to build due to missing glib symbols
X-Send-Pr-Version: www-1.0

>Number:         56502
>Category:       pkg
>Synopsis:       ffmpegthumbnailer fails to build due to missing glib symbols
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 16 07:20:00 +0000 2021
>Last-Modified:  Sun May 22 23:35:01 +0000 2022
>Originator:     Claes Nästén
>Release:        trunk 2021-11-02
>Organization:
>Environment:
SunOS 5.10 i86pc i386 i86pc

>Description:
ffmpegthumbnailer fails to build on Solaris 10 due to missing symbols referenced by harfbuzz:

[ 77%] Linking C executable ffmpegthumbnailerctest
Undefined                       first referenced
 symbol                             in file
g_unicode_script_to_iso15924        /usr/pkg/lib/libharfbuzz.so.0
g_bytes_unref                       /usr/pkg/lib/libharfbuzz.so.0
g_unichar_compose                   /usr/pkg/lib/libharfbuzz.so.0
g_unichar_get_script                /usr/pkg/lib/libharfbuzz.so.0
g_bytes_ref                         /usr/pkg/lib/libharfbuzz.so.0
g_unichar_decompose                 /usr/pkg/lib/libharfbuzz.so.0
g_bytes_get_data                    /usr/pkg/lib/libharfbuzz.so.0
g_unichar_combining_class           /usr/pkg/lib/libharfbuzz.so.0
g_unicode_script_from_iso15924      /usr/pkg/lib/libharfbuzz.so.0
ld: fatal: symbol referencing errors. No output written to ffmpegthumbnailerctest
collect2: error: ld returned 1 exit status
--- test/ffmpegthumbnailerctest ---
*** [test/ffmpegthumbnailerctest] Error code 1

From my investigations it is caused by ffmpeg4 buildlink3.mk not including libass buildlink3.mk if the option is enabled.
>How-To-Repeat:
Build ffmpegthumbnailer on Solaris 10 with ffmpeg4 options:

ass av1 fontconfig freetype gnutls lame libvpx
libwebp opus speex theora vorbis x11 x264
x265

>Fix:
--- multimedia/ffmpeg4/buildlink3.mk.orig       Mon Nov 15 14:24:04 2021
+++ multimedia/ffmpeg4/buildlink3.mk    Mon Nov 15 14:23:39 2021
@@ -14,6 +14,10 @@

 .include "../../mk/bsd.fast.prefs.mk"

+.if ${PKG_BUILD_OPTIONS.ffmpeg4:Mass}
+.  include "../../multimedia/libass/buildlink3.mk"
+.endif
+
 .if ${PKG_BUILD_OPTIONS.ffmpeg4:Mav1}
 .  include "../../multimedia/libaom/buildlink3.mk"
 .endif

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Fri, 19 Nov 2021 13:33:56 +0000
Responsible-Changed-Why:
This is a SunOS problem.


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56502: ffmpegthumbnailer fails to build due to missing glib
 symbols
Date: Sun, 22 May 2022 23:33:50 +0000

 On Tue, Nov 16, 2021 at 07:20:00AM +0000, pekdon@gmail.com wrote:
  > ffmpegthumbnailer fails to build on Solaris 10 due to missing
  > symbols referenced by harfbuzz:
  >  [... symbols from glib2]
  >
  > From my investigations it is caused by ffmpeg4 buildlink3.mk not
  > including libass buildlink3.mk if the option is enabled.

 That doesn't really make sense. There's nothing else in the buildlink
 tree that leads to either harfbuzz or glib2 besides libass, so in
 order to generate this error it must be linking with harfbuzz.

 When I build it on NetBSD I get a shared lib that depends properly on
 both harfbuzz and glib2.

 Also, unless ffmpeg reexports libass's API (reasonably certain it
 doesn't) it's not correct to include it directly in the bl3.

 Are your sure your harfbuzz library got built correctly? If it didn't,
 it might be missing its own dependency on glib2 and that would (or at
 least could) generate this failure.

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.