Skip to content

Commit

Permalink
webos: libpbnjson=r16
Browse files Browse the repository at this point in the history
:Release Notes:
Fix libpbnjson build failed on aarch64

:Detailed Notes:
libpbnjson fails to build on aarch64 machines
see: webosose#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 webosose#27

Change-Id: I8cee2cb9f4300e99da2a01210a4abd1c74a8277c
  • Loading branch information
hieunv0828 authored and shr-project committed Jan 19, 2024
1 parent f81893d commit 7551ec8
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From 1338f6c5a76a0ab0f88ace2fd152cfff3308d9b2 Mon Sep 17 00:00:00 2001
From: Hieu Van Nguyen <[email protected]>
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);
}
}

8 changes: 5 additions & 3 deletions meta-webos/recipes-webos/libpbnjson/libpbnjson.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

Expand Down

0 comments on commit 7551ec8

Please sign in to comment.