bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unable to cross build for Windows


From: Torbjorn SVENSSON
Subject: Unable to cross build for Windows
Date: Thu, 8 Jun 2023 14:44:35 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1

Hello,

I've been trying to cross build for Windows in an Ubuntu docker container.
Have anyone been able to do that without clearing MAKE_CFLAGS, i.e. keeping
all the warning flags enabled?

Attached are log files for building with x86_64-w64-mingw32 and
i686-w64-mingw32 from Ubuntu 18.04, but I've also tried using
GCC 13.1 and have similar (maybe even identical) errors with it.
Examples of errors I get:

/build/gnu-make_4.4.1-45-g07fcee35/src/function.c: In function 
'windows32_openpipe':
/build/gnu-make_4.4.1-45-g07fcee35/src/function.c:1676:12: error: cast from 
function call of type 'intptr_t {aka long long int}' to non-matching type 'void 
*' [-Werror=bad-function-cast]
   tmpErr = (HANDLE)_get_osfhandle (errfd);
            ^


/build/gnu-make_4.4.1-45-g07fcee35/src/job.c: In function 'create_batch_file':
/build/gnu-make_4.4.1-45-g07fcee35/src/job.c:365:3: error: format not a string 
literal and no format arguments [-Werror=format-security]
   O (fatal, NILF, error_string);
   ^


On the MSDN page for _get_osfhandle, they recommend to case the return value
to HANDLE, but GCC apparently thinks this is not allowed.
Any idea on how to get around this issue?


For the O()-macro; is it correct to use the macro with a variable?
Maybe it's more appropriate to fall fatal directly with the arguments?


Kind regards,
Torbjörn

Attachment: build-i686-w64-mingw32.log
Description: Text document

Attachment: build-x86_64-w64-mingw32.log
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]