GNU bug report logs -
#72587
Getting compilation error
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72587 in the body.
You can then email your comments to 72587 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gzip <at> gnu.org
:
bug#72587
; Package
gzip
.
(Mon, 12 Aug 2024 05:37:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Ruf <ruf.shagentur <at> googlemail.com>
:
New bug report received and forwarded. Copy sent to
bug-gzip <at> gnu.org
.
(Mon, 12 Aug 2024 05:37:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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?
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gzip <at> gnu.org
:
bug#72587
; Package
gzip
.
(Mon, 12 Aug 2024 08:25:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 72587 <at> debbugs.gnu.org (full text, mbox):
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 <at> gnu.org
:
bug#72587
; Package
gzip
.
(Mon, 12 Aug 2024 09:30:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 72587 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> cs.ucla.edu> 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.
>
[Message part 2 (text/html, inline)]
bug closed, send any further explanations to
72587 <at> debbugs.gnu.org and Daniel Ruf <ruf.shagentur <at> googlemail.com>
Request was from
Paul Eggert <eggert <at> cs.ucla.edu>
to
control <at> debbugs.gnu.org
.
(Tue, 11 Feb 2025 07:59:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 11 Mar 2025 11:24:19 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.