From 7551ec8f7dacfaa9e1bfa57c9a93ca6d3579a8b9 Mon Sep 17 00:00:00 2001 From: Hieu Van Nguyen Date: Fri, 22 Dec 2023 09:14:43 +0000 Subject: [PATCH] webos: libpbnjson=r16 :Release Notes: Fix libpbnjson build failed on aarch64 :Detailed Notes: libpbnjson fails to build on aarch64 machines see: https://github.com/webosose/meta-webosose/issues/27 Update the syntax in src/pbnjson_c/selectors/selectors_grammar_y.y to work with newer lemon tool :Testing Performed: Only build tested :QA Notes: :Issues Addressed: [WRQ-6118] check webosose github issue "pbnjson fails to build #27 Change-Id: I8cee2cb9f4300e99da2a01210a4abd1c74a8277c --- .../0001-Fix-build-with-lemon-3.44.patch | 60 +++++++++++++++++++ .../recipes-webos/libpbnjson/libpbnjson.bb | 8 ++- 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 meta-webos/recipes-webos/libpbnjson/files/0001-Fix-build-with-lemon-3.44.patch diff --git a/meta-webos/recipes-webos/libpbnjson/files/0001-Fix-build-with-lemon-3.44.patch b/meta-webos/recipes-webos/libpbnjson/files/0001-Fix-build-with-lemon-3.44.patch new file mode 100644 index 000000000..cd20fbca1 --- /dev/null +++ b/meta-webos/recipes-webos/libpbnjson/files/0001-Fix-build-with-lemon-3.44.patch @@ -0,0 +1,60 @@ +From 1338f6c5a76a0ab0f88ace2fd152cfff3308d9b2 Mon Sep 17 00:00:00 2001 +From: Hieu Van Nguyen +Date: Fri, 22 Dec 2023 03:26:10 +0000 +Subject: [PATCH] Fix build with lemon-3.44 + +:Release Notes: +Fixed build error after lemon tool upgraded to 3.44 + +:Detailed Notes: +Update the syntax in %syntax_error function to work with newer lemon + +The yy_syntax_error() function is updated from this commit: +https://github.com/sqlite/sqlite/commit/45f31be85dc90a3f76dd930ad4ec2a0174105156#diff-4ac00843d55028f60091f7ed92753bd216a0eaddd37723d8164ae7f85588e8a8L704 + +This caused an error: +selectors_grammar_y.y: In function 'yy_syntax_error': +selectors_grammar_y.y:47:17: error: 'raw_buffer' has no member named +'yy0' +selectors_grammar_y.y:56:37: error: 'raw_buffer' has no member named +'yy0' + +Use TOKEN macro to support both version. + +:Testing Performed: +Only build tested + +:QA Notes: + +:Issues Addressed: +[WRQ-6118] check webosose github issue "pbnjson fails to build #27" + +Change-Id: I0d9599a6bbc041f6d778a663c7ac569f111c9542 +--- +Upstream-Status: Submitted [http://gpro.lge.com/c/webosose/libpbnjson/+/385176 Fix build with lemon-3.44] + + src/pbnjson_c/selectors/selectors_grammar_y.y | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/pbnjson_c/selectors/selectors_grammar_y.y b/src/pbnjson_c/selectors/selectors_grammar_y.y +index 006c16f..6b3c642 100644 +--- a/src/pbnjson_c/selectors/selectors_grammar_y.y ++++ b/src/pbnjson_c/selectors/selectors_grammar_y.y +@@ -44,7 +44,7 @@ + } + + %syntax_error { +- if (!yyminor.yy0.m_str) ++ if (!TOKEN.m_str) + { + jerror_set(context->error, JERROR_TYPE_SYNTAX, + "Unexpected end of the query string"); +@@ -53,7 +53,7 @@ + { + jerror_set_formatted(context->error, JERROR_TYPE_SYNTAX, + "Unexpected token '%s' in the query string", +- yyminor.yy0.m_str); ++ TOKEN.m_str); + } + } + diff --git a/meta-webos/recipes-webos/libpbnjson/libpbnjson.bb b/meta-webos/recipes-webos/libpbnjson/libpbnjson.bb index 48223e9f3..41bd5c28f 100644 --- a/meta-webos/recipes-webos/libpbnjson/libpbnjson.bb +++ b/meta-webos/recipes-webos/libpbnjson/libpbnjson.bb @@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = " \ DEPENDS = "yajl glib-2.0 gperf-native flex-native lemon-native gmp uriparser boost" -WEBOS_VERSION = "2.15.0-16_45ed7fcd0123f7b970c12d1434d9364cd4024571" -PR = "r15" +WEBOS_VERSION = "2.15.0-15_038a2f0aa9f74a4db831e39a78754e250aeec651" +PR = "r16" inherit webos_component inherit webos_public_repo @@ -33,7 +33,9 @@ EXTRA_OECMAKE += "-DCMAKE_AR:FILEPATH=${AR}" PACKAGECONFIG[tools] = "-DPBNJSON_INSTALL_TOOLS:BOOL=TRUE,-DPBNJSON_INSTALL_TOOLS:BOOL=FALSE" -SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}" +SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE} \ + file://0001-Fix-build-with-lemon-3.44.patch \ +" S = "${WORKDIR}/git"