[Bug 1964260] Re: SRU: Fix mismatched extern "C" block for aarch64

Bug Watch Updater 1964260 at bugs.launchpad.net
Wed Mar 9 19:00:45 UTC 2022


Launchpad has imported 5 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100985.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2021-06-09T06:55:00+00:00 Kevin Zhao wrote:

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

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1964260/comments/0

------------------------------------------------------------------------
On 2021-06-09T08:36:46+00:00 Acoplan-s wrote:

Confirmed by inspection of the source on the head of the 9 branch.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1964260/comments/1

------------------------------------------------------------------------
On 2021-12-27T16:17:32+00:00 Redi wrote:

*** Bug 103846 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1964260/comments/2

------------------------------------------------------------------------
On 2021-12-27T16:21:55+00:00 Cvs-commit wrote:

The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi at gcc.gnu.org>:

https://gcc.gnu.org/g:8c92fcb13a4979232787f0476bf7469ccbb03617

commit r9-9888-g8c92fcb13a4979232787f0476bf7469ccbb03617
Author: Jonathan Wakely <jwakely at redhat.com>
Date:   Mon Dec 27 16:20:24 2021 +0000

    aarch64: Fix mismatched extern "C" block [PR100985]
    
    gcc/ChangeLog:
    
            PR target/100985
            * config/aarch64/arm_acle.h: Remove unclosed extern "C" block.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1964260/comments/3

------------------------------------------------------------------------
On 2021-12-27T16:28:03+00:00 Redi wrote:

This should be fixed for gcc-9.5.0

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1964260/comments/4


** Changed in: gcc
       Status: Unknown => Fix Released

** Changed in: gcc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-9-cross in Ubuntu.
https://bugs.launchpad.net/bugs/1964260

Title:
  SRU: Fix mismatched extern "C" block for aarch64

Status in gcc:
  Fix Released
Status in gcc-9 package in Ubuntu:
  Fix Released
Status in gcc-9-cross package in Ubuntu:
  Fix Released
Status in gcc-9 source package in Focal:
  Triaged
Status in gcc-9-cross source package in Focal:
  New
Status in gcc-9 source package in Impish:
  Triaged
Status in gcc-9-cross source package in Impish:
  New
Status in gcc-9 source package in Jammy:
  Fix Released
Status in gcc-9-cross source package in Jammy:
  Fix Released

Bug description:
  [ Description ]
  Compile on focal fails with:

  /<<PKGBUILDDIR>>/src/rocksdb/util/crc32c.cc:363:1: error: template with C linkage
    363 | template<void (*CRC32)(uint64_t*, uint8_t const**)>
        | ^~~~~~~~
  In file included from /<<PKGBUILDDIR>>/src/rocksdb/util/crc32c_arm64.h:15,
                   from /<<PKGBUILDDIR>>/src/rocksdb/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" {
        | ^~~~~~~~~~

  This is fixed here:
  https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=8c92fcb13a4979232787f0476bf7469ccbb03617

  [ Test Case ]
  Compiling ceph for the yoga cloud archive fails with the error above and will be successful with the patch applied.

  [ Regression Potential ]
  This is actually fixing a regression. The patch that is picked has already landed upstream. It is also architecture specific, only seen on arm64.

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1964260/+subscriptions




More information about the foundations-bugs mailing list