All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libpam: drop yylex to static force
@ 2019-12-10  3:08 Hongxu Jia
  2019-12-10 10:58 ` Ross Burton
  0 siblings, 1 reply; 3+ messages in thread
From: Hongxu Jia @ 2019-12-10  3:08 UTC (permalink / raw)
  To: openembedded-core, ross.burton

Since flex was upgraded to 2.6.4, there is a build failure
...
In file included from ../../../Linux-PAM-1.3.1/modules/pam_console/configfile.c:56:
configfile.lex.c:23:15: error: static declaration of '_pc_yylex' follows non-static declaration
   23 | #define yyleng _pc_yyleng
      |               ^~~~~~~~~
configfile.lex.c:1091:28: note: in expansion of macro 'yylex'
 1091 |
      |                            ^
configfile.lex.c:1111:1: note: in expansion of macro 'YY_DECL'
 1111 |  */
      | ^~~
configfile.lex.c:23:15: note: previous declaration of '_pc_yylex' was here
   23 | #define yyleng _pc_yyleng
      |               ^~~~~~~~~
configfile.lex.c:1089:12: note: in expansion of macro 'yylex'
 1089 |
      |            ^
...

Google the world and find a similar fix
https://lists.pld-linux.org/mailman/pipermail/pld-cvs-commit/Week-of-Mon-20170703/465181.html

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../0001-drop-yylex-to-static-force.patch     | 51 +++++++++++++++++++
 meta/recipes-extended/pam/libpam_1.3.1.bb     |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch

diff --git a/meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch b/meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch
new file mode 100644
index 0000000000..1aefa8c761
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch
@@ -0,0 +1,51 @@
+From 53f0fd76d6eb0ba5149d316647f83d3c56d1f9aa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 9 Dec 2019 18:31:06 -0800
+Subject: [PATCH] drop yylex to static force
+
+Since flex was upgraded to 2.6.4, there is a build failure
+...
+In file included from ../../../Linux-PAM-1.3.1/modules/pam_console/configfile.c:56:
+configfile.lex.c:23:15: error: static declaration of '_pc_yylex' follows non-static declaration
+   23 | #define yyleng _pc_yyleng
+      |               ^~~~~~~~~
+configfile.lex.c:1091:28: note: in expansion of macro 'yylex'
+ 1091 |
+      |                            ^
+configfile.lex.c:1111:1: note: in expansion of macro 'YY_DECL'
+ 1111 |  */
+      | ^~~
+configfile.lex.c:23:15: note: previous declaration of '_pc_yylex' was here
+   23 | #define yyleng _pc_yyleng
+      |               ^~~~~~~~~
+configfile.lex.c:1089:12: note: in expansion of macro 'yylex'
+ 1089 |
+      |            ^
+...
+
+Google the world and find a similar fix
+https://lists.pld-linux.org/mailman/pipermail/pld-cvs-commit/Week-of-Mon-20170703/465181.html
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ modules/pam_console/sed-static | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/pam_console/sed-static b/modules/pam_console/sed-static
+index b9a6fa2..c7a850e 100644
+--- a/modules/pam_console/sed-static
++++ b/modules/pam_console/sed-static
+@@ -13,7 +13,7 @@ sed '
+ /^YY_BUFFER_STATE yy_scan_buffer/s/^/STATIC /
+ /^YY_BUFFER_STATE yy_scan_string/s/^/STATIC /
+ /^void yy_switch_to_buffer/s/^/STATIC /
+-/define YY_DECL int yylex/s/YY_DECL /YY_DECL STATIC /
++#/define YY_DECL int yylex/s/YY_DECL /YY_DECL STATIC /
+ /^int yyparse/s/^/STATIC /
+ /^void yyrestart/s/^/STATIC /
+ ' < $1 > sedtmp.$$ && mv sedtmp.$$ $1
+-- 
+2.21.0
+
diff --git a/meta/recipes-extended/pam/libpam_1.3.1.bb b/meta/recipes-extended/pam/libpam_1.3.1.bb
index 1194933827..440d77babc 100644
--- a/meta/recipes-extended/pam/libpam_1.3.1.bb
+++ b/meta/recipes-extended/pam/libpam_1.3.1.bb
@@ -24,6 +24,7 @@ SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux
            file://pam-security-abstract-securetty-handling.patch \
            file://pam-unix-nullok-secure.patch \
            file://crypt_configure.patch \
+           file://0001-drop-yylex-to-static-force.patch \
           "
 
 SRC_URI[md5sum] = "558ff53b0fc0563ca97f79e911822165"
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libpam: drop yylex to static force
  2019-12-10  3:08 [PATCH] libpam: drop yylex to static force Hongxu Jia
@ 2019-12-10 10:58 ` Ross Burton
  2019-12-10 15:11   ` Hongxu Jia
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2019-12-10 10:58 UTC (permalink / raw)
  To: Hongxu Jia, oe-core

> +diff --git a/modules/pam_console/sed-static b/modules/pam_console/sed-static
> +index b9a6fa2..c7a850e 100644
> +--- a/modules/pam_console/sed-static
> ++++ b/modules/pam_console/sed-static

do_patch fails with:

can't find file to patch at input line 40

I guess your WRL layers are patching pam-console in?

Ross


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libpam: drop yylex to static force
  2019-12-10 10:58 ` Ross Burton
@ 2019-12-10 15:11   ` Hongxu Jia
  0 siblings, 0 replies; 3+ messages in thread
From: Hongxu Jia @ 2019-12-10 15:11 UTC (permalink / raw)
  To: Ross Burton, oe-core

On 12/10/19 6:58 PM, Ross Burton wrote:
>> +diff --git a/modules/pam_console/sed-static 
>> b/modules/pam_console/sed-static
>> +index b9a6fa2..c7a850e 100644
>> +--- a/modules/pam_console/sed-static
>> ++++ b/modules/pam_console/sed-static
>
> do_patch fails with:
>
> can't find file to patch at input line 40
>
> I guess your WRL layers are patching pam-console in?
>
Yes, you are right, sorry for the nosiy

//Hongxu

> Ross




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-10 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10  3:08 [PATCH] libpam: drop yylex to static force Hongxu Jia
2019-12-10 10:58 ` Ross Burton
2019-12-10 15:11   ` Hongxu Jia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.