SRU: Fix mismatched extern "C" block for aarch64

Bug #1964260 reported by Corey Bryant
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc
Fix Released
Medium
gcc-9 (Ubuntu)
Fix Released
High
Unassigned
Focal
Fix Released
High
Unassigned
Impish
Fix Released
High
Unassigned
Jammy
Fix Released
High
Unassigned
gcc-9-cross (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Impish
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

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.

Revision history for this message
In , Kevin Zhao (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

Revision history for this message
In , Acoplan-s (acoplan-s) wrote :

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

Revision history for this message
In , Redi (redi) wrote :

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

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The releases/gcc-9 branch has been updated by Jonathan Wakely <email address hidden>:

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

commit r9-9888-g8c92fcb13a4979232787f0476bf7469ccbb03617
Author: Jonathan Wakely <email address hidden>
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.

Revision history for this message
In , Redi (redi) wrote :

This should be fixed for gcc-9.5.0

Changed in gcc-9 (Ubuntu):
status: New → Triaged
importance: Undecided → High
description: updated
Changed in gcc-9 (Ubuntu Impish):
status: New → Triaged
Changed in gcc-9 (Ubuntu Focal):
status: New → Triaged
importance: Undecided → High
Changed in gcc-9 (Ubuntu Impish):
importance: Undecided → High
Revision history for this message
Corey Bryant (corey.bryant) wrote :
Revision history for this message
Corey Bryant (corey.bryant) wrote :
Revision history for this message
Corey Bryant (corey.bryant) wrote :
tags: added: patch
Revision history for this message
Matthias Klose (doko) wrote :

fixed in jammy with 9.4.0-5ubuntu1

Changed in gcc-9 (Ubuntu Jammy):
status: Triaged → Fix Released
Matthias Klose (doko)
Changed in gcc-9-cross (Ubuntu Jammy):
status: New → Fix Released
Matthias Klose (doko)
summary: - Fix mismatched extern "C" block for aarch64
+ SRU: Fix mismatched extern "C" block for aarch64
description: updated
Changed in gcc:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Corey, or anyone else affected,

Accepted gcc-9 into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-9/9.4.0-3ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gcc-9 (Ubuntu Impish):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-impish
Changed in gcc-9-cross (Ubuntu Impish):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Corey, or anyone else affected,

Accepted gcc-9-cross into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-9-cross/26ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gcc-9 (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Corey, or anyone else affected,

Accepted gcc-9 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-9/9.4.0-1ubuntu1~20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gcc-9-cross (Ubuntu Focal):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Corey, or anyone else affected,

Accepted gcc-9-cross into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-9-cross/21ubuntu6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Corey Bryant (corey.bryant) wrote :
Revision history for this message
Corey Bryant (corey.bryant) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

the ceph builds did succeed. However for impish, the default GCC was used. Looks fine anyway.

tags: added: verification-done verification-done-focal verification-done-impish
removed: verification-needed verification-needed-focal verification-needed-impish
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-9 - 9.4.0-3ubuntu1.1

---------------
gcc-9 (9.4.0-3ubuntu1.1) impish-proposed; urgency=medium

  [ Corey Bryant ]
  * SRU: LP: #1964260. Fix PR target/100985, regression introduced
    with the previous upload.

 -- Matthias Klose <email address hidden> Wed, 09 Mar 2022 19:45:54 +0100

Changed in gcc-9 (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-9-cross - 26ubuntu2.1

---------------
gcc-9-cross (26ubuntu2.1) impish-proposed; urgency=medium

  * SRU: LP: #1964260. Fix PR target/100985, regression on the gcc-9
    branch.

 -- Matthias Klose <email address hidden> Thu, 10 Mar 2022 08:15:21 +0100

Changed in gcc-9-cross (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gcc-9 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-9 - 9.4.0-1ubuntu1~20.04.1

---------------
gcc-9 (9.4.0-1ubuntu1~20.04.1) focal-proposed; urgency=medium

  [ Corey Bryant ]
  * SRU: LP: #1964260. Fix PR target/100985, regression introduced
    with the previous upload.

 -- Matthias Klose <email address hidden> Wed, 09 Mar 2022 18:57:24 +0100

Changed in gcc-9 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-9-cross - 21ubuntu6

---------------
gcc-9-cross (21ubuntu6) focal-proposed; urgency=medium

  * SRU: LP: #1964260. Fix PR target/100985, regression introduced
    with the previous upload.

 -- Matthias Klose <email address hidden> Thu, 10 Mar 2022 08:15:21 +0100

Changed in gcc-9-cross (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
In , Redi (redi) wrote :

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.