NetBSD Problem Report #54910

From www@netbsd.org  Thu Jan 30 09:24:23 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 663087A16F
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 30 Jan 2020 09:24:23 +0000 (UTC)
Message-Id: <20200130092422.5D6497A1E3@mollari.NetBSD.org>
Date: Thu, 30 Jan 2020 09:24:22 +0000 (UTC)
From: nykula@ukr.net
Reply-To: nykula@ukr.net
To: gnats-bugs@NetBSD.org
Subject: Locale support unnoticed during configure
X-Send-Pr-Version: www-1.0

>Number:         54910
>Category:       pkg
>Synopsis:       Locale support unnoticed during configure
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 30 09:25:00 +0000 2020
>Closed-Date:    Fri Oct 16 00:46:02 +0000 2020
>Last-Modified:  Fri Oct 16 00:46:02 +0000 2020
>Originator:     Denys Nykula
>Release:        current
>Organization:
>Environment:
Linux e11 5.5.0-rc3 #1 SMP Thu Dec 26 01:45:51 UTC 2019 x86_64
>Description:
Musl libc for Linux provides builtin gettext and iconv. Autotools,
checking for these, look for glibc internal definitions and, having
found none, force NLS off regardless of defaults or package options.
This results in .mo files not built, failing PLIST check for flex,
gettext-tools, every gstreamer package, gtk3, libexif, libgpg-error,
libidn, xkeyboard-config etc.
>How-To-Repeat:
On a Linux musl system, cd pkgsrc/x11/gtk3 && bmake install.
>Fix:
Assume locale support during configure

Since nearly no packages in pkgsrc make locale presence configurable, for
any platform, let's dummy out this configure branch and continue the
build assuming the system supports native languages.

diff --git a/mk/configure/gnu-configure.mk b/mk/configure/gnu-configure.mk
index 375100384..08f7fe0fe 100644
--- a/mk/configure/gnu-configure.mk
+++ b/mk/configure/gnu-configure.mk                                     
@@ -187,6 +187,12 @@ _SCRIPT.configure-scripts-osdep=                                   \
        ${CHMOD} +x $$file.override;                                    \
        ${TOUCH} -r $$file $$file.override;                             \
        ${MV} -f $$file.override $$file
+.else
+_SCRIPT.configure-scripts-osdep=                                       \
+       ${AWK} 'sub("USE_NLS=no","true")1' $$file >$$file.override;     \
+       ${CHMOD} +x $$file.override;                                    \
+       ${TOUCH} -r $$file $$file.override;                             \
+       ${MV} -f $$file.override $$file
 .endif

 .PHONY: configure-scripts-osdep

>Release-Note:

>Audit-Trail:
From: Denys Nykula <nykula@ukr.net>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/54910: Locale support unnoticed during configure
Date: Thu, 13 Feb 2020 14:09:03 +0200

 Is the stopper here that nobody has a throwaway musl chroot? Here's how to
 bootstrap one without my workaround, to see this issue. Run as root in a
 x86_64 Linux VM. Host can be a fresh ubuntu, gentoo or arch.

 My goal is to replace every workaround in my world script with a proper
 pkgsrc upstream patch, so that pkgsrc can build a desktop against musl
 out of the box. Nls is the major issue, then if there's interest for
 this platform I can follow with patches for llvm, python, mesa, qt5 etc.

 apt-get install -y git make wget ||emerge git gmake wget ||
   pacman -S --noconfirm git make wget
 ln -s `which gmake` /sbin/make ||ln -s `which make` /sbin/gmake
 wget -O x86_64-linux-musl-native.tgz http://musl.cc/x86_64-linux-musl-native.tgz
 wget -O world raw.githubusercontent.com/nykula/acmd/90f1640/world
 patch -u world <<'EOF'
 @@ -8,0 +9 @@
 +w='wpa*t git mutt gzip mksh gtk3'
 @@ -45 +45,0 @@
 -sed -i "/GIT\|SUB\|CONF\|INST\|bin\|shar\|py/d" /usr/src/*/ninja-*/{M,P}*
 @@ -56 +56 @@
 -do sed -Ei "/\.mo$|glibc|au_r[^3]|upower/d" /usr/src/*/$i/{M,P}*; done
 +do sed -Ei "/glibc|au_r[^3]|upower/d" /usr/src/*/$i/{M,P}*; done
 @@ -72 +71,0 @@
 -root sh -c 'cd /usr/src/t*x; sed -i "s/<(.*)/:/" s*/*; gmake; cp -f t*x /bin/'
 EOF
 bash world

 => Checking file-check results for flex-2.6.4
 ERROR: ************************************************************
 ERROR: The following files are in the PLIST but not in /usr/src/devel/flex/work/.destdir/usr/pkg:
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/ca/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/da/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/de/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/en@boldquot/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/en@quot/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/eo/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/es/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/fi/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/fr/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/ga/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/hr/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/ko/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/nl/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/pl/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/pt_BR/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/ro/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/ru/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/sr/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/sv/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/tr/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/vi/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/zh_CN/LC_MESSAGES/flex.mo
 ERROR:         /usr/src/devel/flex/work/.destdir/usr/pkg/share/locale/zh_TW/LC_MESSAGES/flex.mo
 *** Error code 1

 Stop.
 bmake[7]: stopped in /usr/src/devel/flex
 *** Error code 1

 Stop.
 bmake[6]: stopped in /usr/src/devel/flex
 *** Error code 1

 Stop.
 bmake[5]: stopped in /usr/src/devel/bison
 *** Error code 1

 Stop.
 bmake[4]: stopped in /usr/src/devel/re2c
 *** Error code 1

 Stop.
 bmake[3]: stopped in /usr/src/devel/ninja-build
 *** Error code 1

 Stop.
 bmake[2]: stopped in /usr/src/devel/meson
 *** Error code 1

 Stop.
 bmake[1]: stopped in /usr/src/devel/gdbus-codegen
 *** Error code 1

 Stop.
 bmake: stopped in /usr/src/x11/gtk3

State-Changed-From-To: open->closed
State-Changed-By: mcf@NetBSD.org
State-Changed-When: Fri, 16 Oct 2020 00:46:02 +0000
State-Changed-Why:
Fixed in devel/gettext-lib/builtin.mk r1.49, confirmed by Denys on tech-pkg@


>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.