#1600 closed defect (fixed)
GCC 13.1 requires '#include <cstdint>' in several headers
Reported by: | ligh_de | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | VTM | Version: | VTM-20.0 |
Keywords: | compiling gcc | Cc: | ksuehring, XiangLi, fbossen, jvet@… |
Description
Trying to compile VVC in MSYS2/MinGW64 using GCC 13.1 fails, the same error as in many other projects since GCC got updated from v12 to v13:
In file included from G:/MABS/build/vvc-git/source/Lib/CommonLib/CommonDef.h:65, from G:/MABS/build/vvc-git/source/Lib/CommonLib/AdaptiveLoopFilter.h:41, from G:/MABS/build/vvc-git/source/Lib/CommonLib/AdaptiveLoopFilter.cpp:38: G:/MABS/build/vvc-git/source/Lib/CommonLib/TypeDef.h:253:15: error: 'int16_t' does not name a type 253 | typedef int16_t Pel; ///< pixel type | ^~~~~~~ G:/MABS/build/vvc-git/source/Lib/CommonLib/TypeDef.h:54:1: note: 'int16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? 53 | #include "CommonDef.h" +++ |+#include <cstdint> 54 | G:/MABS/build/vvc-git/source/Lib/CommonLib/TypeDef.h:255:15: error: 'int16_t' does not name a type 255 | typedef int16_t TMatrixCoeff; ///< transform matrix coefficient | ^~~~~~~ G:/MABS/build/vvc-git/source/Lib/CommonLib/TypeDef.h:255:15: note: 'int16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? G:/MABS/build/vvc-git/source/Lib/CommonLib/TypeDef.h:256:15: error: 'int16_t' does not name a type 256 | typedef int16_t TFilterCoeff; ///< filter coefficient | ^~~~~~~ G:/MABS/build/vvc-git/source/Lib/CommonLib/TypeDef.h:256:15: note: 'int16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? {...}
Probably at least the following files need an additional #include <cstdint>:
- source/Lib/CommonLib/CommonDef.h
- source/Lib/CommonLib/TypeDef.h
- source/Lib/CommonLib/dtrace.h
- source/Lib/CommonLib/Hash.h
- source/Lib/Utilities/program_options_lite.h
Change history (6)
comment:1 Changed 18 months ago by ligh_de
comment:2 Changed 18 months ago by XiangLi
Thanks for the report. So far, I have not been able to install gcc-13.0 in our working environment . If your fix works, maybe you could submit an MR to fix the issue. You may check the workflow here https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM/-/wikis/VVC-Software-Development-Workflow. On the other hand, maybe you could also try other gcc versions, such as gcc-12.2. For other compilers, I just tried clang 14 and it also worked.
comment:3 Changed 18 months ago by ligh_de
I am not really a developer, just a half-wit. I usually run the media-autobuild suite which keeps itself up to date to the recent state of the MSYS2 project. If MSYS2 updates GCC to version 13, I can't just downgrade it: dozens of other modules, most of them linked into ffmpeg, rely on its consistency.
I am not very used to working with git. I learned to create Merge Requests by editing files in the web view of repositories hosted on github, but I have no experience on gitlab. Also I don't know your project well so I can't be sure that my solution is sufficient. For m-ab-s I created a patching script using sed:
vvc_extra.sh
_pre_ninja() { sed -i 's!#include <cstdlib>!#include <cstdlib>\n#include <cstdint>!' ${REPO_DIR}/source/Lib/CommonLib/CommonDef.h sed -i 's!#include <cstddef>!#include <cstddef>\n#include <cstdint>!' ${REPO_DIR}/source/Lib/CommonLib/TypeDef.h sed -i 's!#include <cstdarg>!#include <cstdarg>\n#include <cstdint>!' ${REPO_DIR}/source/Lib/CommonLib/dtrace.h sed -i 's!#include <vector>!#include <cstdint>\n#include <vector>!' ${REPO_DIR}/source/Lib/CommonLib/Hash.h sed -i 's!#include <vector>!#include <cstdint>\n#include <vector>!' ${REPO_DIR}/source/Lib/Utilities/program_options_lite.h }
comment:4 Changed 17 months ago by ksuehring
I submitted https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM/-/merge_requests/2616
Compiles for me with fewer changes.
comment:5 Changed 17 months ago by ksuehring
- Resolution set to fixed
- Status changed from new to closed
The MR was merged.
comment:6 Changed 17 months ago by ligh_de
Yes, compiles in m-ab-s as well; thank you.
1 week without any reaction. Is this project abandoned?