From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound.soverin.net (outbound.soverin.net [116.202.65.215]) by sourceware.org (Postfix) with ESMTPS id DB2B63857C58 for ; Sun, 17 Oct 2021 22:04:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DB2B63857C58 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 2E961604C3; Sun, 17 Oct 2021 22:04:54 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net Received: by reform (Postfix, from userid 1000) id 4726D2E80614; Mon, 18 Oct 2021 00:04:51 +0200 (CEST) Date: Mon, 18 Oct 2021 00:04:51 +0200 From: Mark Wielaard To: "Sochat, Vanessa" Cc: "libabigail@sourceware.org" Subject: Re: Patch for Incorrect Symbol DW_LANG_PL1 -> DW_LANG_PLI Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="9lSsd275sn3i1IT+" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2021 22:04:58 -0000 --9lSsd275sn3i1IT+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Vanessa, On Sun, Oct 17, 2021 at 08:53:52PM +0000, Sochat, Vanessa via Libabigail wrote: > A symbol in elfutils was renamed (see line 7 here) in elfutils: > > https://chromium.googlesource.com/external/elfutils/+/515dd0acc77673c953380bcf5ccfb05b83c5a3ab/NEWS > > This results in this error when trying to install the 2.0 libabigail > release (and I suspect others depending on the version of elfutils > used): error: 'DW_LANG_PL1' was not declared in this scope; did you > mean 'DW_LANG_PLI' Although that typo was indeed fixed, an compatibility define was left if libdw/dwarf.h: /* Old (typo) '1' != 'I'. */ #define DW_LANG_PL1 DW_LANG_PLI So I am slightly surprised you are getting that error, every version of elfutils really should have DW_LANG_PL1 (even though the correct name is DW_LANG_PLI) precisely to prevent any such compile errors. Are you sure you are using the correct dwarf.h from elfutils/libdw ? > And after some poking I figured out that this line > https://sourceware.org/git/?p=libabigail.git;a=blob;f=src/abg-dwarf-reader.cc;h=1d6ad24cbfcc2d94c07311bb04112f14f4f0e71c;hb=HEAD#l11056 > needs to be DW_LANG_PLI instead of DW_LANG_PL1. I am attaching the > patch I used to make the fix in spack: > https://github.com/spack/spack/blob/03f84fb440770101816dad61ca59cf1bebf1997b/var/spack/repos/builtin/packages/libabigail/package.py#L37 I think the patch itself is correct, but you probably want to fix the typo in libabigail itself (see attached - this might be an api break for libabigail though without compatibility symbols). Note that this would mean libabigail won't compile with elfutils versions before 0.168, but that is probably no problem given that version is from 2016. Cheers, Mark --9lSsd275sn3i1IT+ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pl1-pli.patch" diff --git a/include/abg-ir.h b/include/abg-ir.h index 81147144..7ed97987 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -657,7 +657,7 @@ public: LANG_Pascal83, LANG_Modula2, LANG_Java, - LANG_PL1, + LANG_PLI, LANG_UPC, LANG_D, LANG_Python, diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index 1d6ad24c..daecaf79 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -11053,8 +11053,8 @@ dwarf_language_to_tu_language(size_t l) return translation_unit::LANG_Ada95; case DW_LANG_Fortran95: return translation_unit::LANG_Fortran95; - case DW_LANG_PL1: - return translation_unit::LANG_PL1; + case DW_LANG_PLI: + return translation_unit::LANG_PLI; case DW_LANG_ObjC: return translation_unit::LANG_ObjC; case DW_LANG_ObjC_plus_plus: @@ -11160,7 +11160,7 @@ get_default_array_lower_bound(translation_unit::language l) case translation_unit::LANG_Java: value = 0; break; - case translation_unit::LANG_PL1: + case translation_unit::LANG_PLI: value = 1; break; case translation_unit::LANG_UPC: diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 4f19e07a..fabc089d 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -1467,8 +1467,8 @@ translation_unit_language_to_string(translation_unit::language l) return "LANG_Modula2"; case translation_unit::LANG_Java: return "LANG_Java"; - case translation_unit::LANG_PL1: - return "LANG_PL1"; + case translation_unit::LANG_PLI: + return "LANG_PLI"; case translation_unit::LANG_UPC: return "LANG_UPC"; case translation_unit::LANG_D: @@ -1533,8 +1533,8 @@ string_to_translation_unit_language(const string& l) return translation_unit::LANG_Modula2; else if (l == "LANG_Java") return translation_unit::LANG_Java; - else if (l == "LANG_PL1") - return translation_unit::LANG_PL1; + else if (l == "LANG_PLI") + return translation_unit::LANG_PLI; else if (l == "LANG_UPC") return translation_unit::LANG_UPC; else if (l == "LANG_D") --9lSsd275sn3i1IT+--