You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2021/01/12 05:15:00 UTC
[jira] [Closed] (ORC-579) Compilation fails with g++ 9
[ https://issues.apache.org/jira/browse/ORC-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun closed ORC-579.
-----------------------------
Resolution: Duplicate
> Compilation fails with g++ 9
> ----------------------------
>
> Key: ORC-579
> URL: https://issues.apache.org/jira/browse/ORC-579
> Project: ORC
> Issue Type: Improvement
> Components: C++
> Affects Versions: 1.5.8, 1.6.2
> Environment: Ubuntu 19.10
> Reporter: Michael Poole
> Priority: Minor
>
> g++ 9.2.1 with glibc 2.30 generates several warnings like these, which are promoted to compilation errors:
>
> {code:java}
> In file included from /usr/include/string.h:494,
> from c++/libs/thirdparty/protobuf_ep-install/include/google/protobuf/stubs/port.h:38,
> from c++/libs/thirdparty/protobuf_ep-install/include/google/protobuf/stubs/common.h:45,
> from c++/src/orc_proto.pb.h:9,
> from c++/src/orc_proto.pb.cc:4,
> from ../c++/src/wrap/orc-proto-wrapper.cc:44:
> In function ‘void* memset(void*, int, size_t)’,
> inlined from ‘void orc::proto::FileTail::SharedCtor()’ at c++/src/orc_proto.pb.cc:13453:11,
> inlined from ‘orc::proto::FileTail::FileTail()’ at c++/src/orc_proto.pb.cc:13426:13,
> inlined from ‘void protobuf_orc_5fproto_2eproto::InitDefaultsFileTailImpl()’ at c++/src/orc_proto.pb.cc:13421:1:
> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [33, 56] from the object at ‘orc::proto::_FileTail_default_instance_’ is out of the bounds of referenced subobject ‘orc::proto::FileTail::postscript_’ with type ‘orc::proto::PostScript*’ at offset 24 [-Werror=array-bounds]
> 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
> | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> {code}
> This can be resolved by adding a line to the obvious place in c++/src/wrap/orc-proto-wrapper.cc:
>
> {code:java}
> DIAGNOSTIC_IGNORE("-Warray-bounds")
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)