Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abseil-cpp issue with _append in library name #833

Open
chadrockey opened this issue Jun 13, 2024 · 4 comments
Open

abseil-cpp issue with _append in library name #833

chadrockey opened this issue Jun 13, 2024 · 4 comments

Comments

@chadrockey
Copy link
Contributor

I came across this issue today where a library name that contains _append will trigger the old syntax warning for _append to :append.

ERROR: abseil-cpp-20240116.2-r0 do_package: Variable Requires: absl_config = 20240116, absl_core_headers = 20240116, absl_log_internal_append_truncated = 20240116, absl_log_internal_config = 20240116, absl_log_internal_globals = 20240116, absl_log_severity = 20240116, absl_strings = 20240116, absl_str_format = 20240116, absl_time = 20240116, absl_span contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake.

I found I'm not the only one who has seen this issue:
https://community.toradex.com/t/how-to-add-new-abseil-cpp-to-image-please-convert-this-layer-metadata/21212/5

I'm looking for guidance on if this is something that should be patched, reported upstream to bitable, or maybe there's an insane skip that should be applied?

@kraj
Copy link
Contributor

kraj commented Jun 14, 2024

@chadrockey we do not parse the cmakefiles using bitbake, so I am not sure if override syntax change is an issue here unless log_internal_append_truncated is added via some recipe variable, in anycase, can you see if you have this issue with master branch of oe-core/meta-oe ? if it happens there then override syntax is not the problem

@chadrockey
Copy link
Contributor Author

@kraj I tested against the latest abseil-cpp. Here is the patch file I used to bypass this issue, so I can confirm what is reported on the toradex link that a match for '_append' is triggering the error:

abseil-cpp_20240116.2.bbappend

FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://0001-Change-library-name-to-not-include-_append.patch"

0001-Change-library-name-to-not-include-_append.patch

From 66fed46279fd8014220d93cfc4a54a86df94eb60 Mon Sep 17 00:00:00 2001
From: Chad Rockey <[email protected]>
Date: Thu, 13 Jun 2024 21:26:15 +0000
Subject: [PATCH] Change library name to not include _append

---
 absl/log/CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/absl/log/CMakeLists.txt b/absl/log/CMakeLists.txt
index a7d8b690..59a9a9c0 100644
--- a/absl/log/CMakeLists.txt
+++ b/absl/log/CMakeLists.txt
@@ -113,7 +113,7 @@ absl_cc_library(
   DEPS
     absl::config
     absl::core_headers
-    absl::log_internal_append_truncated
+    absl::log_internal_aappend_truncated
     absl::log_internal_config
     absl::log_internal_globals
     absl::log_severity
@@ -197,7 +197,7 @@ absl_cc_library(
     absl::errno_saver
     absl::inlined_vector
     absl::examine_stack
-    absl::log_internal_append_truncated
+    absl::log_internal_aappend_truncated
     absl::log_internal_format
     absl::log_internal_globals
     absl::log_internal_proto
@@ -377,7 +377,7 @@ absl_cc_library(
 
 absl_cc_library(
   NAME
-    log_internal_append_truncated
+    log_internal_aappend_truncated
   SRCS
   HDRS
     "internal/append_truncated.h"
@@ -885,7 +885,7 @@ absl_cc_test(
     absl::config
     absl::core_headers
     absl::log_entry
-    absl::log_internal_append_truncated
+    absl::log_internal_aappend_truncated
     absl::log_internal_format
     absl::log_internal_globals
     absl::log_internal_test_helpers

I've not come across anything similar to this before, so is it possible this is adding the library name to a variable as you suspect?

python split_dynamic_packages() {
    libdir = d.getVar('libdir')

    libpackages = do_split_packages(
        d,
        root=libdir,
        file_regex=r'^libabsl_(.*)\.so\..*$',
        output_pattern='libabsl-%s',
        description="abseil shared library %s",
        prepend=True,
        extra_depends='',
    )
    if libpackages:
        d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(libpackages))
}

@kraj
Copy link
Contributor

kraj commented Jun 14, 2024

I see, its because its splitting the contents into sepratate packages and packages are dynamically named after the library it contains, so if a library has a string _append in this name then it gets into bitbake metadata namespace. I would like you to try using latest yocto, maybe atleast kirkstone branch since thats where we have changed the override syntax from _ to : for these kind of reasons, becasue _ is valid character for symbol names in lot of languages and places. So please test it out using master branch on yocto and see if the issue still exists.

@chadrockey
Copy link
Contributor Author

@kraj my vendor's bsp is kirkstone, so that's why I believe the error pops up as it enforces the syntax.

The way that I produced this error was that I needed to back port the latest version of abseil-cpp so I copied the abseil-cpp recipe and files into a layer. Is there any additional testing you'd like me to do that's possible? I don't think my build will succeed if I checkout the entire oe master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants