[Top][All Lists]

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

Re: compile ncurse with mingw

From: LIU Hao
Subject: Re: compile ncurse with mingw
Date: Wed, 1 Feb 2023 22:41:20 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

在 2023-02-01 20:24, Pierre Blavy 写道:
I'm trying to cross compile ncurse 6.3 patch 20211021 on fedor37 for windows 

./configure --host=i686-w64-mingw32 --prefix=/tmp/test/ncurses-win32;


First, when you specify `--host`, you should specify `--build`; otherwise `configure` may get confused if test programs can be executed successfully, for example, when wine-binfmt has installed.

Second, you should call `make` instead of `mingw32-make`. The latter is for use 
in CMD only.

And, this works for me:

   ./configure --build=x86_64-pc-linux-gnu  \
               --host=x86_64-w64-mingw32  \
   make -j4

There is probably more stuff that should be disabled for mingw-w64. You should 
have read README.MinGW.

It exists in libssp, but I was confused as the missing function is '__strcpy_chk' (prefixed by 2 underscores) but libssp.a defines '___strcpy_chk' (prefixed by 3 underscores). I don't know how to investigate any further.

That's because the x86 ABI of Windows has a convention to prefix function names with underscores. You can just ignore the inconsistency. (It's a bit more complex, but I will keep the answer simple here.)

However, it looks like that buffer overflow checking is enabled by default in the compiler that you use. This can be disabled by undefining `_FORTIFY_SOURCE`:

   ./configure --build=x86_64-pc-linux-gnu  \
               --host=x86_64-w64-mingw32  \
               --enable-term-driver  \
   make -j4

Best regards,

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

reply via email to

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