GNU bug report logs - #72587
Getting compilation error

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: Daniel Ruf <ruf.shagentur@HIDDEN>; Done: Paul Eggert <eggert@HIDDEN>; Maintainer for gzip is bug-gzip@HIDDEN.
bug closed, send any further explanations to 72587 <at> debbugs.gnu.org and Daniel Ruf <ruf.shagentur@HIDDEN> Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 72587) by debbugs.gnu.org; 12 Aug 2024 09:29:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 12 05:29:19 2024
Received: from localhost ([127.0.0.1]:42433 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sdRMc-0005FZ-W4
	for submit <at> debbugs.gnu.org; Mon, 12 Aug 2024 05:29:19 -0400
Received: from mail-lj1-f176.google.com ([209.85.208.176]:52590)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ruf.shagentur@HIDDEN>) id 1sdRMa-0005FF-21
 for 72587 <at> debbugs.gnu.org; Mon, 12 Aug 2024 05:29:17 -0400
Received: by mail-lj1-f176.google.com with SMTP id
 38308e7fff4ca-2f01e9f53e3so65525861fa.1
 for <72587 <at> debbugs.gnu.org>; Mon, 12 Aug 2024 02:28:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=googlemail.com; s=20230601; t=1723454858; x=1724059658; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=BV7vIcrtP23j5NwxOxxcz306SoMdFYxrP6v9SrR5I8M=;
 b=YA7VZcw/y9kELY90LabIUd7naH6l5LVLcMd9ehGyAjZqHDy9zcMykMDH9G2iFRJHr2
 bFQ/b6wa4rnzF9/dPOXM3fn/78/cS7ukLdR8+JL8f3ocSS5/BgN14f9URk9v1z8UTBMS
 TH/GIUiPJyBB8vAx6FsCvT5UBLBgx3z3CB1IuqX0HYhz3+xjzq8741l4xLy2iLMkkGJ7
 bEExH0oEWf5YhwnFP7tA5WoRyHbWWAA2x800a2pJr6yyb+jukH2qYHwtuEsMccoMTDPH
 Lmp0y4lcCDkjpehiK33pSXJ6H40e5XuxM1rqBB8upZnUuXj9e/IpJoVb9E0NiuKQNRCS
 0qQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1723454858; x=1724059658;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=BV7vIcrtP23j5NwxOxxcz306SoMdFYxrP6v9SrR5I8M=;
 b=mDW4XGLpMRAKCVpGL2r5GUcFxZOZM5ba904TMzBlYZdp6j8/1rulL4o6IjPIYwfHPV
 /XhlAxESFNZSV5LKnsR4J+Nw9koc3zw7gHqtVterF42Fv3lPZeJZFmvsHvestNczD7AI
 hY0T4d6VSIfpF6kRPm7MBglX7huVK1LIIJacRuHMV2OpEQxZKYB5f7GUOX5lgHEqdaju
 dyYq5kje6KdIbBsYAbuNRpUUkwPX4YYoDv0BJB2dD64wYXeJISygYrwBQprTUGdliQY/
 VdzommSqKp5shl+j70IUfB+QfqDiKmy7MP5cSwxdRdXxQNVn7JF9QcFAJqrNcKU2/T0f
 BMAw==
X-Gm-Message-State: AOJu0YyReOQtkw3tonCjCpZsf5suRZ+/x77B0H8KLwEtQaqZQ1NvMY5P
 7dfjRUXfajxBA41TAk6+mOVzLF4Foj8NiRibemiXCklPEyPDGlNy1clpoM7CxHj6RJFTKx9ZElf
 dlBMZeuQSQqClU+qQ2hbaL7kDMPs=
X-Google-Smtp-Source: AGHT+IHywpPFzXbiMJ9sl7DgSaITFPpSbxGa6Tj4Z9VlA8xIgnHJaGJWHnKnR2swic/eZ90W4NArIljNyU1Z6tPjBfs=
X-Received: by 2002:a2e:a586:0:b0:2ef:20ae:d117 with SMTP id
 38308e7fff4ca-2f1a6c4d41dmr78378741fa.10.1723454857290; Mon, 12 Aug 2024
 02:27:37 -0700 (PDT)
MIME-Version: 1.0
References: <CA+_CZ9V7zuBZFD1UC3aGzNnDOWByqaU4s9eE5Hv9ydbM0jgkAA@HIDDEN>
 <821e973a-6bea-409b-9dcf-9da263fe656c@HIDDEN>
In-Reply-To: <821e973a-6bea-409b-9dcf-9da263fe656c@HIDDEN>
From: Daniel Ruf <ruf.shagentur@HIDDEN>
Date: Mon, 12 Aug 2024 11:27:26 +0200
Message-ID: <CA+_CZ9XCzYf5t3r5CKt6bAJhXO4eo_1xGPHT6yxDdunE7rJj2g@HIDDEN>
Subject: Re: bug#72587: Getting compilation error
To: Paul Eggert <eggert@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000008e2d8f061f791abf"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72587
Cc: 72587 <at> debbugs.gnu.org
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: -1.0 (-)

--0000000000008e2d8f061f791abf
Content-Type: text/plain; charset="UTF-8"

Thanks, that was helpful. In the meantime I solved it with
-Wno-bad-function-cast even if I often read, that the warning should not be
ignored.

Paul Eggert <eggert@HIDDEN> schrieb am Mo., 12. Aug. 2024, 10:23:

> On 2024-08-11 17:55, Daniel Ruf via GNU gzip discussion and bug reports.
> wrote:
> > dup2.c:80:11: error: cast from function call of type 'intptr_t' {aka
> 'long
> > long int'} to non-matching type 'void *' [-Werror=bad-function-cast]
> > 80 | if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE)
> > | ^
> > cc1: all warnings being treated as errors
> > make[3]: *** [Makefile:2576: libgzip_a-dup2.o] Error 1
> > make[3]: Leaving directory
> > '/home/runner/work/gzip-windows-build/gzip-windows-build/gzip/lib'
> >
> > What are the correct steps to cross-compile for Windows on Ubuntu 20 LTS?
>
> Don't use -Wbad-function-cast or anything that implies it; or don't use
> -Werror.
>
> I guess you're building from Git rather than from a release? In that
> case more expertise is needed. Try configuring with
> --disable-gcc-warnings, or building with 'WERROR_CFLAGS=', or something
> like that.
>

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

<p dir=3D"ltr">Thanks, that was helpful. In the meantime I solved it with -=
Wno-bad-function-cast even if I often read, that the warning should not be =
ignored.</p>
<br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Paul E=
ggert &lt;<a href=3D"mailto:eggert@HIDDEN">eggert@HIDDEN</a>&gt; =
schrieb am Mo., 12. Aug. 2024, 10:23:<br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x">On 2024-08-11 17:55, Daniel Ruf via GNU gzip discussion and bug reports.=
 <br>
wrote:<br>
&gt; dup2.c:80:11: error: cast from function call of type &#39;intptr_t&#39=
; {aka &#39;long<br>
&gt; long int&#39;} to non-matching type &#39;void *&#39; [-Werror=3Dbad-fu=
nction-cast]<br>
&gt; 80 | if ((HANDLE) _get_osfhandle (fd) =3D=3D INVALID_HANDLE_VALUE)<br>
&gt; | ^<br>
&gt; cc1: all warnings being treated as errors<br>
&gt; make[3]: *** [Makefile:2576: libgzip_a-dup2.o] Error 1<br>
&gt; make[3]: Leaving directory<br>
&gt; &#39;/home/runner/work/gzip-windows-build/gzip-windows-build/gzip/lib&=
#39;<br>
&gt; <br>
&gt; What are the correct steps to cross-compile for Windows on Ubuntu 20 L=
TS?<br>
<br>
Don&#39;t use -Wbad-function-cast or anything that implies it; or don&#39;t=
 use <br>
-Werror.<br>
<br>
I guess you&#39;re building from Git rather than from a release? In that <b=
r>
case more expertise is needed. Try configuring with <br>
--disable-gcc-warnings, or building with &#39;WERROR_CFLAGS=3D&#39;, or som=
ething <br>
like that.<br>
</blockquote></div>

--0000000000008e2d8f061f791abf--




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

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


Received: (at 72587) by debbugs.gnu.org; 12 Aug 2024 08:24:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 12 04:24:23 2024
Received: from localhost ([127.0.0.1]:42376 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sdQLm-00031a-RK
	for submit <at> debbugs.gnu.org; Mon, 12 Aug 2024 04:24:23 -0400
Received: from mail.cs.ucla.edu ([131.179.128.66]:46696)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1sdQLk-00031J-L2
 for 72587 <at> debbugs.gnu.org; Mon, 12 Aug 2024 04:24:21 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 6445E3C011BD8;
 Mon, 12 Aug 2024 01:23:42 -0700 (PDT)
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP
 id TeMPeqax1P4L; Mon, 12 Aug 2024 01:23:42 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 1ABC23C00E413;
 Mon, 12 Aug 2024 01:23:42 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 1ABC23C00E413
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
 s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1723451022;
 bh=G5O79FqhFP6c41riMJWziKlOpW+mpvnEABz2KQN2nv8=;
 h=Message-ID:Date:MIME-Version:To:From;
 b=E+TdSpYcskXF+99auw+ffRzAtAgJskQzTUItcGOjGf+lyuUqp1DwPHf+wTUq0SaOm
 5IXqd7m940LCev8YDFWZ5Ua86bVOCz+CQa2Zg5w9iu+y2mZvyYmkO+Ve2OW3krPNjm
 yqgMFX4CF7G0T8Px6AsBQJsCHbi2si3wUAMJp8HL991T/66gpLoqLOopfqdybvgh8r
 mSfIY5BXRmWZl1xZBqfA/iDTVa1yOTFqcrAgCopN2t8BXJmTLa1VPTFE/X2Ie/EL3P
 an12cdnu+OuYtywKcWFeMPajSLz4xsppQRcp0rpSSMpq4n6P3d2Cart4K4VIA3/NIg
 xbbE9xUPHmrpw==
X-Virus-Scanned: amavis at mail.cs.ucla.edu
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP
 id Y9UGJQlQnLLj; Mon, 12 Aug 2024 01:23:42 -0700 (PDT)
Received: from [192.168.254.12] (unknown [47.154.17.165])
 by mail.cs.ucla.edu (Postfix) with ESMTPSA id F39C63C011BD8;
 Mon, 12 Aug 2024 01:23:41 -0700 (PDT)
Message-ID: <821e973a-6bea-409b-9dcf-9da263fe656c@HIDDEN>
Date: Mon, 12 Aug 2024 01:23:41 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#72587: Getting compilation error
To: Daniel Ruf <ruf.shagentur@HIDDEN>, 72587 <at> debbugs.gnu.org
References: <CA+_CZ9V7zuBZFD1UC3aGzNnDOWByqaU4s9eE5Hv9ydbM0jgkAA@HIDDEN>
Content-Language: en-US
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <CA+_CZ9V7zuBZFD1UC3aGzNnDOWByqaU4s9eE5Hv9ydbM0jgkAA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72587
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: -1.0 (-)

On 2024-08-11 17:55, Daniel Ruf via GNU gzip discussion and bug reports. 
wrote:
> dup2.c:80:11: error: cast from function call of type 'intptr_t' {aka 'long
> long int'} to non-matching type 'void *' [-Werror=bad-function-cast]
> 80 | if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE)
> | ^
> cc1: all warnings being treated as errors
> make[3]: *** [Makefile:2576: libgzip_a-dup2.o] Error 1
> make[3]: Leaving directory
> '/home/runner/work/gzip-windows-build/gzip-windows-build/gzip/lib'
> 
> What are the correct steps to cross-compile for Windows on Ubuntu 20 LTS?

Don't use -Wbad-function-cast or anything that implies it; or don't use 
-Werror.

I guess you're building from Git rather than from a release? In that 
case more expertise is needed. Try configuring with 
--disable-gcc-warnings, or building with 'WERROR_CFLAGS=', or something 
like that.




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

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


Received: (at submit) by debbugs.gnu.org; 12 Aug 2024 05:36:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 12 01:36:58 2024
Received: from localhost ([127.0.0.1]:42275 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sdNjl-0005zo-5P
	for submit <at> debbugs.gnu.org; Mon, 12 Aug 2024 01:36:57 -0400
Received: from lists.gnu.org ([209.51.188.17]:56914)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ruf.shagentur@HIDDEN>) id 1sdJLn-0005bA-Us
 for submit <at> debbugs.gnu.org; Sun, 11 Aug 2024 20:55:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ruf.shagentur@HIDDEN>)
 id 1sdJLI-0002jf-Bi
 for bug-gzip@HIDDEN; Sun, 11 Aug 2024 20:55:24 -0400
Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <ruf.shagentur@HIDDEN>)
 id 1sdJLD-00038Y-BA
 for bug-gzip@HIDDEN; Sun, 11 Aug 2024 20:55:24 -0400
Received: by mail-lf1-x12f.google.com with SMTP id
 2adb3069b0e04-52f024f468bso4401397e87.1
 for <bug-gzip@HIDDEN>; Sun, 11 Aug 2024 17:55:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=googlemail.com; s=20230601; t=1723424117; x=1724028917; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=SSQwdhmJkLHgVYpN92HvE7d6cn3bFEYkO5LU+VT+zJQ=;
 b=ioe7zNcBgrzbkoFeq+O+7ntx33NB76L/TKGKvsQYkBa9TvBOsNLZ/gLuBD6+Q3JiUA
 otP8mOohw82tS6c0TvuL73ENg5su4zw4xC7T9ZngBQeMzUibUo00ElM3E1NY5o0V5SyN
 BsOz7csDnwc+Qe4/J0sPfwvr+sa4JqyCru1fysn7YVcB8I0kpg1fKjhRHfxPGRjJymHL
 4ZaPr+UtUbrDSlq+Nsy+pn4/nFsV9exs/M2lM/U9RbJu5zdTSf4/RCXDQDB6dseT0/tw
 vHpXX/ZOEHQrqtSOwbSC9OazAjO8u/EA78dPhU/h9gpyP1pk2tfvPf64pAQOY0TmxDlJ
 CzFg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1723424117; x=1724028917;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=SSQwdhmJkLHgVYpN92HvE7d6cn3bFEYkO5LU+VT+zJQ=;
 b=pfesnFxXnyOWxTPgUR5nYz0/6zrGvDoA+7V96y6sW7BVCdYeuW52l1hJz0hKkOLCfs
 LpOz10OjYV/+ZG11mZHok4SucBBjoJEP8XSI7ALNIMeZB6YtJ17UIuQjZDuxlzXlzLF6
 +ufFj1SuVJWRqJdLR2LduP1Wx0iAJjywSMQRY/3Ut7rAYwDz7msjTn7XTYREvczLLsyg
 Ikg5++gwEieFJcupqfH595ZDASYMiU0p6iKp464MuBQXsqg7/mILqMY7LB/nl6ffD8nX
 kOhwFfo2NZviQRTBzwNfkoubUHMT9e2jAYZwBA2q3kU+2hGTNbCMOZPPZJcn51IzdBFU
 99rQ==
X-Gm-Message-State: AOJu0YwsLzfxXiag5A1t3NCz/naxyGNDL9N6go7xOQxc4hAkZAjqQcY2
 5DAVfRJzLaifGZtWapKvIBWSzQ4u4387/EJexEcQK9ZVSbD//8QtAT0oFEVZXY4jvETSOZyuZgy
 ZoSx8CWq5aASRUCZUCMwClP5eVbI/Fw==
X-Google-Smtp-Source: AGHT+IGJ44GS1RBTblpUriP0yBTRz+EjUkQSgU7lHESDi0Hz/IWwJbI/QmgUvGoMhSr8CMuVoPgjP/OSFcR2XkhxoOI=
X-Received: by 2002:a05:6512:2205:b0:52e:9c0a:3514 with SMTP id
 2adb3069b0e04-530eea1f208mr5653124e87.44.1723424116487; Sun, 11 Aug 2024
 17:55:16 -0700 (PDT)
MIME-Version: 1.0
From: Daniel Ruf <ruf.shagentur@HIDDEN>
Date: Mon, 12 Aug 2024 02:55:04 +0200
Message-ID: <CA+_CZ9V7zuBZFD1UC3aGzNnDOWByqaU4s9eE5Hv9ydbM0jgkAA@HIDDEN>
Subject: Getting compilation error
To: bug-gzip@HIDDEN
Content-Type: multipart/alternative; boundary="00000000000042be6d061f71f295"
Received-SPF: pass client-ip=2a00:1450:4864:20::12f;
 envelope-from=ruf.shagentur@HIDDEN; helo=mail-lf1-x12f.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,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01,
 T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 12 Aug 2024 01:36:55 -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 (--)

--00000000000042be6d061f71f295
Content-Type: text/plain; charset="UTF-8"

I'm trying to cross-compile on Ubuntu for Windows hosts using ./configure
--quiet --host=x86_64-w64-mingw32

But my build fails:

dup2.c: In function 'ms_windows_dup2':
dup2.c:80:11: error: cast from function call of type 'intptr_t' {aka 'long
long int'} to non-matching type 'void *' [-Werror=bad-function-cast]
80 | if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE)
| ^
cc1: all warnings being treated as errors
make[3]: *** [Makefile:2576: libgzip_a-dup2.o] Error 1
make[3]: Leaving directory
'/home/runner/work/gzip-windows-build/gzip-windows-build/gzip/lib'

What are the correct steps to cross-compile for Windows on Ubuntu 20 LTS?

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

<div dir=3D"auto"><div dir=3D"auto"><div>I&#39;m trying to cross-compile on=
 Ubuntu for Windows hosts using ./configure --quiet --host=3Dx86_64-w64-min=
gw32</div><div dir=3D"auto"><br></div><div dir=3D"auto">But my build fails:=
</div><div dir=3D"auto"><br></div><div dir=3D"auto">dup2.c: In function &#3=
9;ms_windows_dup2&#39;:

  </div>
</div><div dir=3D"auto">
  <div>
    </div></div><div dir=3D"auto"><div>
    dup2.c:80:11: error: cast from function call of type &#39;intptr_t&#39;=
 {aka &#39;long long int&#39;} to non-matching type &#39;void *&#39; [-Werr=
or=3Dbad-function-cast]

  </div>
</div><div dir=3D"auto">
  <div>
    </div></div><div dir=3D"auto"><div>
       80 |       if ((HANDLE) _get_osfhandle (fd) =3D=3D INVALID_HANDLE_VA=
LUE)

  </div>
</div><div dir=3D"auto">
  <div>
    </div></div><div dir=3D"auto"><div>
          |           ^

  </div>
</div><div dir=3D"auto">
  <div>
    </div></div><div dir=3D"auto"><div>
    cc1: all warnings being treated as errors

  </div>
</div><div dir=3D"auto">
  <div>
    </div></div><div dir=3D"auto"><div>
    make[3]: *** [Makefile:2576: libgzip_a-dup2.o] Error 1

  </div>
</div><div dir=3D"auto">
  <div>
    </div></div>
    make[3]: Leaving directory &#39;/home/runner/work/gzip-windows-build/gz=
ip-windows-build/gzip/lib&#39;<div dir=3D"auto"><br></div><div dir=3D"auto"=
>What are the correct steps to cross-compile for Windows on Ubuntu 20 LTS?<=
/div></div>

--00000000000042be6d061f71f295--




Acknowledgement sent to Daniel Ruf <ruf.shagentur@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gzip@HIDDEN. Full text available.
Report forwarded to bug-gzip@HIDDEN:
bug#72587; 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, 11 Feb 2025 08:00:02 UTC

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