NetBSD Problem Report #57517
From tsutsui@ceres.dti.ne.jp Mon Jul 10 14:30:27 2023
Return-Path: <tsutsui@ceres.dti.ne.jp>
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 6C78C1A9241
for <gnats-bugs@gnats.NetBSD.org>; Mon, 10 Jul 2023 14:30:27 +0000 (UTC)
Message-Id: <202307101430.36AEUK00027916@ceres.dti.ne.jp>
Date: Mon, 10 Jul 2023 23:30:20 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: pkgsrc-2023Q2 inconsistent freetype2 and fontconfig on NetBSD 9.3
X-Send-Pr-Version: 3.95
>Number: 57517
>Category: pkg
>Synopsis: pkgsrc-2023Q2 inconsistent freetype2 and fontconfig on NetBSD 9.3
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 10 14:35:00 +0000 2023
>Last-Modified: Sun Jul 23 20:00:01 +0000 2023
>Originator: Izumi Tsutsui
>Release: NetBSD 9.3
>Organization:
>Environment:
System: NetBSD optiplex 9.3 NetBSD 9.3 (GENERIC) #0: Thu Aug 4 15:30:37 UTC 2022 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
NetBSD 9.3 has:
- freetype2 2.10.4 and /usr/X11R7/lib/libfreetype.so.19.0
- fontconfig 2.13.1 and /usr/X11R7/lib/libfontconfig.so.2.3
pkgsrc-2023Q2 has:
- freetype2 2.13.0 in pkgsrc/graphics/freetype2/Makefile
and BUILDLINK_API_DEPENDS in buildlink3.mk is also 2.13.0
https://github.com/NetBSD/pkgsrc/commit/5c74c638
- fontconfig 2.14.2 in pkgsrc/fonts/fontconfig/Makefile
and also requires freetypes>=2.13.0 via buildlink3.mk,
but BUILDLINK_API_DEPENDS in buildlink3.mk is 2.11.91
https://github.com/NetBSD/pkgsrc/blob/da7caf4f/fonts/fontconfig/buildlink3.mk#L8
This causes mungled libfreetype2 dependencies, for example,
libcairo.so installed from pkgsrc/graphics/cairo requires:
---
% ldd /usr/pkg/lib/libcairo.so.2.11600.0
/usr/pkg/lib/libcairo.so.2.11600.0:
-lpixman-1.2 => /usr/X11R7/lib/libpixman-1.so.2
-lm.0 => /usr/lib/libm.so.0
-lc.12 => /usr/lib/libc.so.12
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lfontconfig.2 => /usr/X11R7/lib/libfontconfig.so.2
-lexpat.2 => /usr/lib/libexpat.so.2
-lfreetype.19 => /usr/X11R7/lib/libfreetype.so.19
-lz.1 => /usr/lib/libz.so.1
-lbz2.1 => /usr/lib/libbz2.so.1
-lfreetype.6 => /usr/pkg/lib/libfreetype.so.6
-lpng16.16 => /usr/pkg/lib/libpng16.so.16
-lbrotlidec.1 => /usr/pkg/lib/libbrotlidec.so.1
-lbrotlicommon.1 => /usr/pkg/lib/libbrotlicommon.so.1
-lpthread.1 => /usr/lib/libpthread.so.1
-lxcb-shm.0 => /usr/X11R7/lib/libxcb-shm.so.0
-lxcb.2 => /usr/X11R7/lib/libxcb.so.2
-lXau.7 => /usr/X11R7/lib/libXau.so.7
-lXdmcp.7 => /usr/X11R7/lib/libXdmcp.so.7
-lxcb-render.0 => /usr/X11R7/lib/libxcb-render.so.0
-lXrender.2 => /usr/X11R7/lib/libXrender.so.2
-lXext.7 => /usr/X11R7/lib/libXext.so.7
-lX11.7 => /usr/X11R7/lib/libX11.so.7
-lrt.1 => /usr/lib/librt.so.1
%
---
This causes broken rendering of emoji on cairo applications,
at least binaries that pull ruby-cairo:
--- /usr/pkgsrc-2023Q1/graphics/ruby-cairo/work.i386/.extract_makevars.mk 2023-07-
10 23:17:50.040900393 +0900
+++ /usr/pkgsrc-2023Q2/graphics/ruby-cairo/work.i386/.extract_makevars.mk 2023-07-10 23:19:30.906608270 +0900
@@ -7,7 +7,7 @@
BUILDLINK_PREFIX.dl= /usr
BUILDLINK_PREFIX.expat= /usr
BUILDLINK_PREFIX.fontconfig= /usr/X11R7
-BUILDLINK_PREFIX.freetype2= /usr/X11R7
+BUILDLINK_PREFIX.freetype2= /usr/pkg
BUILDLINK_PREFIX.gettext= /usr
BUILDLINK_PREFIX.iconv= /usr
BUILDLINK_PREFIX.libX11= /usr/X11R7
:
>How-To-Repeat:
See above.
>Fix:
No idea.
Bump BUILDLINK_API_DEPENDS in fontconfig/buildlink3.mk to pull
proper pkgsrc version fontconfig for NetBSD 9.3?
(not sure it's acceptable in the release branch)
---
Izumi Tsutsui
>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/57517: inconsistent freetype2 and fontconfig
Date: Sun, 23 Jul 2023 02:50:59 +0000
On Mon, Jul 10, 2023 at 02:35:00PM +0000, Izumi Tsutsui wrote:
> NetBSD 9.3 has:
> - freetype2 2.10.4 and /usr/X11R7/lib/libfreetype.so.19.0
> - fontconfig 2.13.1 and /usr/X11R7/lib/libfontconfig.so.2.3
>
> pkgsrc-2023Q2 has:
> - freetype2 2.13.0 in pkgsrc/graphics/freetype2/Makefile
> and BUILDLINK_API_DEPENDS in buildlink3.mk is also 2.13.0
> https://github.com/NetBSD/pkgsrc/commit/5c74c638
> - fontconfig 2.14.2 in pkgsrc/fonts/fontconfig/Makefile
> and also requires freetypes>=2.13.0 via buildlink3.mk,
> but BUILDLINK_API_DEPENDS in buildlink3.mk is 2.11.91
> https://github.com/NetBSD/pkgsrc/blob/da7caf4f/fonts/fontconfig/buildlink3.mk#L8
>
> This causes mungled libfreetype2 dependencies, for example,
> libcairo.so installed from pkgsrc/graphics/cairo requires:
> [snip]
I see the same thing on oldish current and with pkgsrc HEAD. readelf
-d on libcairo shows
0x0000000000000001 (NEEDED) Shared library: [libfreetype.so.6]
0x0000000000000001 (NEEDED) Shared library: [libfontconfig.so.2]
and I have
libfreetype.so.19 in /usr/X11R7/lib
libfreetype.so.6 in /usr/pkg/lib
libfontconfig.so.2 in /usr/X11R7/lib
libfontconfig.so.1 in /usr/pkg/lib
that is, it's linked against pkgsrc libfreetype, but base
libfontconfig.
The package itself thinks it's using pkgsrc libfontconfig:
% pkg_info -n cairo | grep fontconfig
fontconfig>=2.14.1nb1
which is what's supposed to happen; as soon as we're using pkgsrc
freetype2, everything that depends on it, which means fontconfig, is
forced to USE_BUILTIN=no.
In cairo itself, I get
% make show-var VARNAME=IS_BUILTIN.fontconfig
yes
% make show-var VARNAME=USE_BUILTIN.fontconfig
no
but...
% make show-var VARNAME=BUILDLINK_PREFIX.fontconfig
/usr/X11R7
which is all wrong, and predictably the libraries that are actually
buildlinked are then the wrong ones. How it got that way, IDK, but
that's the problem.
Do you see the same thing? I'd expect so...
--
David A. Holland
dholland@netbsd.org
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: dholland-pbugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: pkg/57517: inconsistent freetype2 and fontconfig
Date: Mon, 24 Jul 2023 04:57:15 +0900
> In cairo itself, I get
>
> % make show-var VARNAME=IS_BUILTIN.fontconfig
> yes
> % make show-var VARNAME=USE_BUILTIN.fontconfig
> no
>
> but...
> % make show-var VARNAME=BUILDLINK_PREFIX.fontconfig
> /usr/X11R7
>
> which is all wrong, and predictably the libraries that are actually
> buildlinked are then the wrong ones. How it got that way, IDK, but
> that's the problem.
>
> Do you see the same thing? I'd expect so...
Here I get:
---
% pwd
/usr/pkgsrc/graphics/ruby-cairo
% cat CVS/Tag
Tpkgsrc-2023Q2
% make show-var VARNAME=IS_BUILTIN.fontconfig
yes
% make show-var VARNAME=USE_BUILTIN.fontconfig
no
% make show-var VARNAME=BUILDLINK_PREFIX.fontconfig
/usr/X11R7
%
---
Same in graphics/cairo.
---
Izumi Tsutsui
(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.