GNU bug report logs - #49850
Crosscompiling gzip for musl-based system with clang

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: gzip; Reported by: Caleb Heydon <caleb.heydon@HIDDEN>; Keywords: moreinfo; dated Tue, 3 Aug 2021 21:30:02 UTC; Maintainer for gzip is bug-gzip@HIDDEN.
Added tag(s) moreinfo. Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 49850 <at> debbugs.gnu.org:


Received: (at 49850) by debbugs.gnu.org; 4 Aug 2021 07:07:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 04 03:07:49 2021
Received: from localhost ([127.0.0.1]:42313 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mBB0G-0002Ry-PG
	for submit <at> debbugs.gnu.org; Wed, 04 Aug 2021 03:07:48 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46906)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1mBB0E-0002Rj-Ok
 for 49850 <at> debbugs.gnu.org; Wed, 04 Aug 2021 03:07:47 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 460BE160113;
 Wed,  4 Aug 2021 00:07:40 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id KUt8VLAYkFtC; Wed,  4 Aug 2021 00:07:34 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id BEC5D160117;
 Wed,  4 Aug 2021 00:07:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 9Na1MMYkEUct; Wed,  4 Aug 2021 00:07:34 -0700 (PDT)
Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com
 [172.91.119.151])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9CD09160113;
 Wed,  4 Aug 2021 00:07:34 -0700 (PDT)
Subject: Re: bug#49850: Crosscompiling gzip for musl-based system with clang
To: Caleb Heydon <caleb.heydon@HIDDEN>, 49850 <at> debbugs.gnu.org
References: <CAPoLbvs-5q=bciswabtZTaCNrdP3g8o2ENbb8E-TH1um2pki_g@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <9c4e9126-9f62-bf17-dfd6-bff1cdc5f76f@HIDDEN>
Date: Wed, 4 Aug 2021 00:07:34 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <CAPoLbvs-5q=bciswabtZTaCNrdP3g8o2ENbb8E-TH1um2pki_g@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 49850
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

gzip doesn't do much of anything special when cross-compiling; it's like 
other GNU or Autoconf-using programs. If your cross-compiler doesn't 
output to stderr on error, or outputs to stderr even when there isn't an 
error, that can confuse the process (with gzip and with other programs). 
So you might want to look into that. Otherwise, try putting 'set -x' 
into the relevant parts of the 'configure' shell script and look at the 
debugging output.




Information forwarded to bug-gzip@HIDDEN:
bug#49850; Package gzip. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Aug 2021 21:29:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 03 17:29:43 2021
Received: from localhost ([127.0.0.1]:41673 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mB1yp-0006b6-FH
	for submit <at> debbugs.gnu.org; Tue, 03 Aug 2021 17:29:43 -0400
Received: from lists.gnu.org ([209.51.188.17]:58022)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <caleb.heydon@HIDDEN>) id 1mAxWK-0008BO-BH
 for submit <at> debbugs.gnu.org; Tue, 03 Aug 2021 12:44:00 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60336)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <caleb.heydon@HIDDEN>)
 id 1mAxWK-0004fY-2Z
 for bug-gzip@HIDDEN; Tue, 03 Aug 2021 12:44:00 -0400
Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:43697)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <caleb.heydon@HIDDEN>)
 id 1mAxWH-00067p-KT
 for bug-gzip@HIDDEN; Tue, 03 Aug 2021 12:43:59 -0400
Received: by mail-lf1-x129.google.com with SMTP id b6so17995816lff.10
 for <bug-gzip@HIDDEN>; Tue, 03 Aug 2021 09:43:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=uconn-edu.20150623.gappssmtp.com; s=20150623;
 h=mime-version:from:date:message-id:subject:to;
 bh=3kvfVQC6BMRd3VVwbLOOsqSe5ydDK7NdSxFqS80dCPE=;
 b=mh3Ec0zKZQkdHUULy1TAZQIScRIobHOPhB820QO7hTlx19tLkciw/sxv92TSmFqjAO
 KaOFmEXVaKZGfZauwZE8KpPFnV88gulX3KC4QGTOdCFUWLU/jpUZFKrHhcw0rb/vl0Yl
 U6x/DFz6P+erlQFv3jMPV+zJG5weujWrDDlPPgUt4djOLBUx85na+ljDVY9yo0N9CkWt
 sfxDuze+q7YeC0dZu4QseA74pFPlarmMUlEqyrtgzfF5XUPmEYOZuvY0IQRIhtud+AWa
 nEgU0h9tSsFJfFHRYr4KuBl8P1JFqcyU8n5OJP8LaZ2K3qODST0jL38+F/aev9kW+lmx
 /N6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=3kvfVQC6BMRd3VVwbLOOsqSe5ydDK7NdSxFqS80dCPE=;
 b=E0itRf6n7QidWC5qCueB1JXPvr29IZx43A+fTl6iZWQMppgqTa0gU3zksidvpnWhJG
 bKaEfEmn4B68QVWdTqyEocU6zzAJqa0w7bnOuuCz+ztjG63I+I8BHInOALyekr9UoqnT
 Pwu6RefrHSMSDDe5yi2OVouU56bKhgrK2lWLVRxFIYktHh40H9HryEp803tMvVx1NQSP
 H6c7InlLFd7qms4vlsrAeIpHiW43VOcxrKfhpaImCZFvdBPQnGIXPDXoFZ0f0yfSE9jJ
 ooaemFl+cxfYS2wcQNTLyM7RS98UmGPvrHQ4aNGb9MOo+GK+4mynlg9l8ej3m+LHVSzD
 meEg==
X-Gm-Message-State: AOAM532ekpL7rOYGl/Eni8odsIfhYvXN/wFajUUhplvprtJVzUFZW3SI
 rn1dHpVbz4W5qhzgfE6QSAfiKMnXTkJXrKGGhd1CpBi3Z51h+g==
X-Google-Smtp-Source: ABdhPJyfoJdTEV6eeWXq0c6ZWVbZ2jFbxhJ7Z7u50r39G1X3WsgiUWmwTg2y12kEjAkopuVWMeNQIzBc0wCaflVXbOs=
X-Received: by 2002:a05:6512:4ce:: with SMTP id
 w14mr10644000lfq.564.1628009034635; 
 Tue, 03 Aug 2021 09:43:54 -0700 (PDT)
MIME-Version: 1.0
From: Caleb Heydon <caleb.heydon@HIDDEN>
Date: Tue, 3 Aug 2021 12:43:44 -0400
Message-ID: <CAPoLbvs-5q=bciswabtZTaCNrdP3g8o2ENbb8E-TH1um2pki_g@HIDDEN>
Subject: Crosscompiling gzip for musl-based system with clang
To: bug-gzip@HIDDEN
Content-Type: multipart/alternative; boundary="00000000000033719105c8aa641a"
Received-SPF: pass client-ip=2a00:1450:4864:20::129;
 envelope-from=caleb.heydon@HIDDEN; helo=mail-lf1-x129.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, HTML_MESSAGE=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-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 03 Aug 2021 17:29:41 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--00000000000033719105c8aa641a
Content-Type: text/plain; charset="UTF-8"

Hello,

I have been attempting to crosscompile gzip for a linux system that uses
the musl libc using clang, and I have come across an issue while
attempting to configure gzip.

I set CC="cross-clang", and run ./configure --prefix=/usr --host=x86_64.
cross-clang is just a wrapper script that sets the sysroot for
crosscompiling.  The configuration fails, and I get the following error:

checking how cross-clang reports undeclared, standard C functions...
configure: error: in `/home/user/Desktop/cross-compiling/build/gzip/gzip':
configure: error: cannot detect from compiler exit status or warnings

I have used a similar setup to successfully crosscompile many other pieces
of software, so I am not entirely sure why gzip is not configuring.  Any
suggestions for getting around the issue or suggested software changes
would be greatly appreciated.

Thanks,

Caleb Heydon

--00000000000033719105c8aa641a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br></div><div>I have been attempting to crossc=
ompile gzip for a linux system that uses the musl libc using clang, and I h=
ave come across=C2=A0an issue while attempting=C2=A0to configure gzip.</div=
><div><br></div><div>I set CC=3D&quot;cross-clang&quot;, and run ./configur=
e --prefix=3D/usr --host=3Dx86_64.=C2=A0 cross-clang is just a wrapper scri=
pt that sets the sysroot for crosscompiling.=C2=A0 The configuration fails,=
 and I get the following error:</div><div><br></div><div>checking how cross=
-clang reports undeclared, standard C functions... configure: error: in `/h=
ome/user/Desktop/cross-compiling/build/gzip/gzip&#39;:<br>configure: error:=
 cannot detect from compiler exit status or warnings<br></div><div><br></di=
v><div>I have used a similar setup to successfully=C2=A0crosscompile many o=
ther pieces of software, so I am not entirely sure why gzip is not configur=
ing.=C2=A0 Any suggestions for getting around the issue or suggested softwa=
re changes would be greatly appreciated.</div><div><br></div><div>Thanks,</=
div><div><br></div><div>Caleb Heydon</div></div>

--00000000000033719105c8aa641a--




Acknowledgement sent to Caleb Heydon <caleb.heydon@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gzip@HIDDEN. Full text available.
Report forwarded to bug-gzip@HIDDEN:
bug#49850; Package gzip. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 29 Mar 2022 23:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.