[FFmpeg-trac] #11241(build system:new): CC_IDENT macro generation doesn't consider non-utf8 encodings causes warnings and scrambled log when compiling on Windows
FFmpeg
trac at avcodec.org
Mon Oct 14 07:14:11 EEST 2024
#11241: CC_IDENT macro generation doesn't consider non-utf8 encodings causes
warnings and scrambled log when compiling on Windows
-------------------------------------+-------------------------------------
Reporter: violet | Type: defect
Status: new | Priority: normal
Component: build | Version: git-
system | master
Keywords: CC_IDENT | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
How to reproduce:
{{{
ENV: Win10 with Simplified-Chinese encoding "gb2312", msys2, ffmpeg 7.1+
master branch, VS2022
% ./configure
\src\ffmpeg\ffmpeg-7.1\config.h(1): warning C4828: 文件包含在偏移 0x66e
处开始的字符,该字符在当前源字符集中无效(代码页 65001)
}}}
In config.h, due to the forced "/utf8" cflag, the generated CC_IDENT looks
like:
{{{
#define CC_IDENT "���� x64 �� Microsoft (R) C/C++ �������� 19.41.34123
��"
}}}
It is actually a "gb2312" Chinese string:
{{{
#define CC_IDENT "用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.41.34123
版"
}}}
(slow fix)
I think it might be better to support non-utf8 encodings CC_IDENT in macro
generation code .
(fast fix)
Or, let `./configure` inherit CC_IDENT from environment or params, just
like `./configure --extra-cflags`, add another option `./configure --cc-
ident`. In this way, users can provide CC_IDENT in correct encoding
manually.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11241>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list