public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/100985] New: Aarch64 acle.h "extern "C" {" mismatch "}" in 9.4.0
@ 2021-06-09  6:55 kevin.zhao at linaro dot org
  2021-06-09  8:11 ` [Bug target/100985] [9 Regression] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: kevin.zhao at linaro dot org @ 2021-06-09  6:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100985

            Bug ID: 100985
           Summary: Aarch64 acle.h "extern "C" {" mismatch "}" in 9.4.0
           Product: gcc
           Version: 9.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kevin.zhao at linaro dot org
  Target Milestone: ---

Build rocksdb with GCC 9.4.0:
# git clone https://github.com/facebook/rocksdb.git
# cd rocksdb
# make static_lib

Log as below:
====================================================
$DEBUG_LEVEL is 0
  CC       util/crc32c.o
util/crc32c.cc:371:1: error: template with C linkage
  371 | template<void (*CRC32)(uint64_t*, uint8_t const**)>
      | ^~~~~~~~
In file included from ./util/crc32c_arm64.h:16,
                 from util/crc32c.cc:21:
/usr/lib/gcc/aarch64-linux-gnu/9/include/arm_acle.h:33:1: note: ‘extern "C"’
linkage started here
   33 | extern "C" {
      | ^~~~~~~~~~
util/crc32c.cc:503:13: error: conflicting declaration of ‘std::string
rocksdb::crc32c::IsFastCrc32Supported()’ with ‘C’ linkage
  503 | std::string IsFastCrc32Supported() {
      |             ^~~~~~~~~~~~~~~~~~~~
In file included from util/crc32c.cc:12:
./util/crc32c.h:20:20: note: previous declaration with ‘C++’ linkage
   20 | extern std::string IsFastCrc32Supported();
      |                    ^~~~~~~~~~~~~~~~~~~~
util/crc32c.cc:1277:10: error: conflicting declaration of ‘uint32_t
rocksdb::crc32c::Extend(uint32_t, const char*, size_t)’ with ‘C’ linkage
 1277 | uint32_t Extend(uint32_t crc, const char* buf, size_t size) {
      |          ^~~~~~
In file included from util/crc32c.cc:12:
./util/crc32c.h:25:17: note: previous declaration with ‘C++’ linkage
   25 | extern uint32_t Extend(uint32_t init_crc, const char* data, size_t n);
      |                 ^~~~~~
util/crc32c.cc:1283:1: error: expected ‘}’ at end of input
 1283 | }  // namespace ROCKSDB_NAMESPACE
      | ^
In file included from ./util/crc32c_arm64.h:16,
                 from util/crc32c.cc:21:
/usr/lib/gcc/aarch64-linux-gnu/9/include/arm_acle.h:33:12: note: to match this
‘{’
   33 | extern "C" {
      |            ^
Makefile:2272: recipe for target 'util/crc32c.o' failed
make: *** [util/crc32c.o] Error 1
===========================================================

The latest patch of GCC 9.4.0 release:
https://github.com/gcc-mirror/gcc/commit/6f06be1769d45359940c60517f9d55bedd3cb1f4#diff-64cabf812b3706ffd3c5ab7c6048c3617a406f029631d0427d3cfb896fd8dbf3R32
introduce a lonely induce that build issue:
#ifdef __cplusplus
extern "C" {
#endif

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-21 11:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  6:55 [Bug c/100985] New: Aarch64 acle.h "extern "C" {" mismatch "}" in 9.4.0 kevin.zhao at linaro dot org
2021-06-09  8:11 ` [Bug target/100985] [9 Regression] " pinskia at gcc dot gnu.org
2021-06-09  8:36 ` acoplan at gcc dot gnu.org
2021-12-27 16:17 ` redi at gcc dot gnu.org
2021-12-27 16:21 ` cvs-commit at gcc dot gnu.org
2021-12-27 16:28 ` redi at gcc dot gnu.org
2022-07-21 11:07 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).