From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8C08D1F670 for ; Sun, 17 Oct 2021 18:13:33 +0000 (UTC) Received: from localhost ([::1]:59108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcAf2-0007wM-Mi for normalperson@yhbt.net; Sun, 17 Oct 2021 14:13:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcAen-0007uq-Hl for bug-gnulib@gnu.org; Sun, 17 Oct 2021 14:13:13 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:43618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcAel-0008Q8-DY for bug-gnulib@gnu.org; Sun, 17 Oct 2021 14:13:13 -0400 Received: by mail-wr1-x42f.google.com with SMTP id r7so36987277wrc.10 for ; Sun, 17 Oct 2021 11:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=XozXclBSFi3E1A1EvdJ4OU2iFUJz8dm8oFKuoQ7rO3A=; b=Po+mSt7YiGUMyvWEpB4ASr/W5E31pzRfGIVHn2ohAbUwoyHkEOdkcRdPLq2pQdI2Hm EKAKiNGyNiAwxpOaljNofqz/qeK5QR/aewwcsM+s95145HLy2bTMzjC5gHCc/9OTXyQX UGD/7QAwyYOnbivCTJ94N/2EbF/4sWjB2OT3c10O5YdRn8OlxCmfc8dKl373ohTOnCDD 1lIBVEQx3jtT8WLnPjBOkOWUQRef7mZ7+y34EYYgrl2dRR+58tZCgHXdGthu5gZj75C2 LSoJohWYARiwL9rNfJQODEzXCO9M4DkI36EhuK6xaXUCG9/6OCEHFSeY7xhnyqkN/rqP sB1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=XozXclBSFi3E1A1EvdJ4OU2iFUJz8dm8oFKuoQ7rO3A=; b=R6xYhT64vXz9I9uKJr+4Hv981Tt3zA3bPlG1bEV9lv2kO9M15ogmmWY+WwPLWB//1I lgf1ALBmk421TbjY7dNLS/PxNz/DaRq9M3JnlAfKOJRcT5yeGJKKSIAqlSKi1Do23oQ0 mvtt5K/FgbupK+wRs3zIQsxY7Ir6GQeBaOmXjOu1L4iGKnV9CovvVQUF6rpH5kpofL5R 3AaQT9udU+vgNxhBffAKxSDbAn7dXHk717I3N3D6jxZnoYHE3MPsNPkOq3eOte5zwkzq kSXNScPZ/QCwmvIiHMEF0Lf1JesmuPo48ItvzqAfDwa9kwe/F2t2bqRNI7/ALVBdFEvD wBNA== X-Gm-Message-State: AOAM531G1WHL8f55D0h/Wh2CDQHSvZ23Qdi+O/6pOhEnWGx3R8ieMDl0 ywVnIDe0F+lwZMwDcBmJVew= X-Google-Smtp-Source: ABdhPJwlxs70POIQT7RnMWA+dHI6oIJJzTAyQQYVLkauLUH5oFTV1HeZd8PHssMEJZfsQns8Audn2w== X-Received: by 2002:a05:6000:11:: with SMTP id h17mr30154524wrx.278.1634494389208; Sun, 17 Oct 2021 11:13:09 -0700 (PDT) Received: from nz.home (host81-129-83-159.range81-129.btcentralplus.com. [81.129.83.159]) by smtp.gmail.com with ESMTPSA id l124sm16745441wml.8.2021.10.17.11.13.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 11:13:08 -0700 (PDT) Received: by nz.home (Postfix, from userid 1000) id 1445D8273100; Sun, 17 Oct 2021 19:13:08 +0100 (BST) Date: Sun, 17 Oct 2021 19:13:08 +0100 From: Sergei Trofimovich To: Bruno Haible , bug-gnulib@gnu.org Subject: Re: gnulib does not always detect need for iconv() hack on musl Message-ID: References: <3670291.xsyPL9o34G@omega> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3670291.xsyPL9o34G@omega> Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=slyich@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On Sun, Oct 17, 2021 at 07:18:51PM +0200, Bruno Haible wrote: > Hello Sergei, > > Sergei Trofimovich wrote: > > The following fails bison-3.8.2 tests: > > $ ./configure && make && make check > > The following succeeds: > > $ ./configure --host=x86_64-unknown-linux-musl && make && make check > > > > The failure happens due to unexpected '*' output in report logs instead > > of '%empty' on 'ASCII' locales. > > > > These unexpected '*' pop back again because gnulib relies on '--host=' > > parameter for './configure' to detect musl target (for lack of better > > signal?): > > > > https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/musl.m4#n16 > > > > case "$host_os" in > > *-musl*) AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.]) ;; > > > > https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/unicodeio.c#n151 > > > > /* FreeBSD iconv(), NetBSD iconv(), and Solaris 11 iconv() insert > > a '?' if they cannot convert. */ > > # if !defined _LIBICONV_VERSION > > || (res > 0 && outptr - outbuf == 1 && *outbuf == '?') > > # endif > > /* musl libc iconv() inserts a '*' if it cannot convert. */ > > # if !defined _LIBICONV_VERSION && MUSL_LIBC > > || (res > 0 && outptr - outbuf == 1 && *outbuf == '*') > > # endif > > ) > > return failure (code, NULL, callback_arg); > > > > What do you think of enabling the workaround regardless of MUSL_LIBC > > define? > > The MUSL_LIBC symbol is supposed to be set on musl platforms; this is > what musl.m4 is for. The difference between your two invocations is that > in the first case, it used a $host triple inferred by config.guess, > while in the second case, it used the $host that you specified on the > command line. > > When I try your two commands (just the configure step), the first one > prints > checking for host system type... x86_64-pc-linux-musl > while the second one prints > checking for host system type... x86_64-unknown-linux-musl > > The next steps of the investigation are: In the first case, > - What did the "checking for host system type..." line look like? > - Which of the environment variables CC_FOR_BUILD, HOST_CC, CC, > CONFIG_SITE did you have defined, and to which values? Aha, 'config.guess' clearly detects wrong libc here: checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu I did not realize 'config.guess' has the code to detect libc but it clearly does. I'll dig from there and complain elsewhere. Thank you! -- Sergei