我正在尝试在 Alpine Linux 上使用 g++/gcc 编译 OpenCascade (OCE)。它在 Ubuntu 上构建良好,但同一项目在 Apline 上失败并出现错误:
OSD_MemInfo.cxx: In member function 'void OSD_MemInfo::Update()':
OSD_MemInfo.cxx:146:19: error: variable 'OSD_MemInfo::Update()::mallinfo aMI' has initializer but incomplete type
struct mallinfo aMI = mallinfo();
^~~
OSD_MemInfo.cxx:146:34: error: invalid use of incomplete type 'struct OSD_MemInfo::Update()::mallinfo'
struct mallinfo aMI = mallinfo();
^
OSD_MemInfo.cxx:146:10: note: forward declaration of 'struct OSD_MemInfo::Update()::mallinfo'
struct mallinfo aMI = mallinfo();
^~~~~~~~
我真的不明白为什么这是 Alpine 的错误,而不是 Ubuntu,有没有人知道为什么或遇到过类似的问题?