summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormark.yang <mark.yang@lge.com>2025-04-07 19:10:37 +0900
committerKhem Raj <raj.khem@gmail.com>2025-04-07 12:21:22 -0700
commit8ef6332dcf5b4020dac4a566430878cbf72f0627 (patch)
tree01bcdef1a0e709d1bb095a29f71b105bd68c24c5
parent7f41319477a37f2b1d56fd0e68899bfc6ae7f4e8 (diff)
downloadmeta-openembedded-8ef6332dcf5b4020dac4a566430878cbf72f0627.tar.gz
libsmi: fix build failure with gcc-15.0.1
* see more details: http://errors.yoctoproject.org/Errors/Details/851179/ yang-data.c:594:9: error: too many arguments to function 'yangparse'; expected 0, have 1 594 | yangparse(parser); | ^~~~~~~~~ ~~~~~~ In file included from scanner-yang.h:19, from yang-data.c:47: parser-yang.h:16:12: note: declared here 16 | extern int yangparse(); | ^~~~~~~~~ In file included from parser-yang.c:346: parser-yang.tab.h:170:5: error: conflicting types for 'yangparse'; have 'int(struct Parser *)' 170 | int yangparse (struct Parser *parserPtr); | ^~~~~~~~~ In file included from parser-yang.y:40: parser-yang.h:16:12: note: previous declaration of 'yangparse' with type 'int(void)' 16 | extern int yangparse(); | ^~~~~~~~~ make[2]: *** [Makefile:573: yang-data.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... smi-data.c: In function 'loadModule': smi-data.c:4658:9: error: too many arguments to function 'smiparse'; expected 0, have 1 4658 | smiparse((void *)&parser); | ^~~~~~~~ ~~~~~~~~~~~~~~~ smi-data.c:42:12: note: declared here 42 | extern int smiparse(); | ^~~~~~~~ parser-smi.c:1515:5: error: conflicting types for 'smiparse'; have 'int(struct Parser *)' 1515 | int smiparse (struct Parser *parserPtr); | ^~~~~~~~ In file included from parser-smi.y:37: parser-smi.h:27:12: note: previous declaration of 'smiparse' with type 'int(void)' 27 | extern int smiparse(); | ^~~~~~~~ parser-smi.c:63:25: error: conflicting types for 'smiparse'; have 'int(struct Parser *)' 63 | #define yyparse smiparse | ^~~~~~~~ parser-smi.c:3207:1: note: in expansion of macro 'yyparse' 3207 | yyparse (struct Parser *parserPtr) | ^~~~~~~ parser-smi.h:27:12: note: previous declaration of 'smiparse' with type 'int(void)' 27 | extern int smiparse(); | ^~~~~~~~ parser-yang.c:68:25: error: conflicting types for 'yangparse'; have 'int(struct Parser *)' 68 | #define yyparse yangparse | ^~~~~~~~~ parser-yang.c:2312:1: note: in expansion of macro 'yyparse' 2312 | yyparse (struct Parser *parserPtr) | ^~~~~~~ parser-yang.h:16:12: note: previous declaration of 'yangparse' with type 'int(void)' 16 | extern int yangparse(); | ^~~~~~~~~ In file included from scanner-yang.l:31: parser-yang.tab.h:170:5: error: conflicting types for 'yangparse'; have 'int(struct Parser *)' 170 | int yangparse (struct Parser *parserPtr); | ^~~~~~~~~ In file included from scanner-yang.l:30: parser-yang.h:16:12: note: previous declaration of 'yangparse' with type 'int(void)' 16 | extern int yangparse(); | ^~~~~~~~~ scanner-yang.l: In function 'yangEnterLexRecursion': scanner-yang.l:79:1: warning: old-style function definition [-Wold-style-definition] 79 | | ^ make[2]: *** [Makefile:573: smi-data.lo] Error 1 In file included from parser-smi.y:36: parser-smi.c: In function 'smiparse': parser-smi.c:10265:29: warning: passing argument 1 of 'smiyyerror' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 10265 | yyerror (parserPtr, yymsgp); | ^~~~~~ error.h:25:44: note: in definition of macro 'yyerror' 25 | #define yyerror(parserPtr, msg) smiyyerror(msg, parserPtr) | ^~~ In file included from parser-smi.y:40: smi-check.h:71:30: note: expected 'char *' but argument is of type 'const char *' 71 | extern void smiyyerror(char *msg, Parser *parserPtr); | ~~~~~~^~~ make[2]: *** [Makefile:573: parser-yang.lo] Error 1 make[2]: *** [Makefile:573: parser-smi.lo] Error 1 make[2]: *** [Makefile:573: scanner-yang.lo] Error 1 In file included from scanner-smi.l:34: parser-smi.tab.h:192:5: error: conflicting types for 'smiparse'; have 'int(struct Parser *)' 192 | int smiparse (struct Parser *parserPtr); | ^~~~~~~~ In file included from util.h:22, from scanner-smi.l:32: parser-smi.h:27:12: note: previous declaration of 'smiparse' with type 'int(void)' 27 | extern int smiparse(); | ^~~~~~~~ scanner-smi.l: In function 'smiEnterLexRecursion': scanner-smi.l:76:1: warning: old-style function definition [-Wold-style-definition] 76 | smiEnterLexRecursion(file) | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: mark.yang <mark.yang@lge.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/libsmi/libsmi/0001-Fix-build-failure-with-gcc-15.patch154
-rw-r--r--meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb1
2 files changed, 155 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libsmi/libsmi/0001-Fix-build-failure-with-gcc-15.patch b/meta-oe/recipes-support/libsmi/libsmi/0001-Fix-build-failure-with-gcc-15.patch
new file mode 100644
index 0000000000..69af5f5141
--- /dev/null
+++ b/meta-oe/recipes-support/libsmi/libsmi/0001-Fix-build-failure-with-gcc-15.patch
@@ -0,0 +1,154 @@
1From ea4bc4aad22455f8f37030f5915c4a94d76fd5e7 Mon Sep 17 00:00:00 2001
2From: "mark.yang" <mark.yang@lge.com>
3Date: Mon, 7 Apr 2025 18:57:26 +0900
4Subject: [PATCH] Fix build failure with gcc-15
5
6* see more details: http://errors.yoctoproject.org/Errors/Details/851179/
7
8yang-data.c:594:9: error: too many arguments to function 'yangparse'; expected 0, have 1
9 594 | yangparse(parser);
10 | ^~~~~~~~~ ~~~~~~
11In file included from scanner-yang.h:19,
12 from yang-data.c:47:
13parser-yang.h:16:12: note: declared here
14 16 | extern int yangparse();
15 | ^~~~~~~~~
16In file included from parser-yang.c:346:
17parser-yang.tab.h:170:5: error: conflicting types for 'yangparse'; have 'int(struct Parser *)'
18 170 | int yangparse (struct Parser *parserPtr);
19 | ^~~~~~~~~
20In file included from parser-yang.y:40:
21parser-yang.h:16:12: note: previous declaration of 'yangparse' with type 'int(void)'
22 16 | extern int yangparse();
23 | ^~~~~~~~~
24make[2]: *** [Makefile:573: yang-data.lo] Error 1
25make[2]: *** Waiting for unfinished jobs....
26smi-data.c: In function 'loadModule':
27smi-data.c:4658:9: error: too many arguments to function 'smiparse'; expected 0, have 1
28 4658 | smiparse((void *)&parser);
29 | ^~~~~~~~ ~~~~~~~~~~~~~~~
30smi-data.c:42:12: note: declared here
31 42 | extern int smiparse();
32 | ^~~~~~~~
33parser-smi.c:1515:5: error: conflicting types for 'smiparse'; have 'int(struct Parser *)'
34 1515 | int smiparse (struct Parser *parserPtr);
35 | ^~~~~~~~
36In file included from parser-smi.y:37:
37parser-smi.h:27:12: note: previous declaration of 'smiparse' with type 'int(void)'
38 27 | extern int smiparse();
39 | ^~~~~~~~
40parser-smi.c:63:25: error: conflicting types for 'smiparse'; have 'int(struct Parser *)'
41 63 | #define yyparse smiparse
42 | ^~~~~~~~
43parser-smi.c:3207:1: note: in expansion of macro 'yyparse'
44 3207 | yyparse (struct Parser *parserPtr)
45 | ^~~~~~~
46parser-smi.h:27:12: note: previous declaration of 'smiparse' with type 'int(void)'
47 27 | extern int smiparse();
48 | ^~~~~~~~
49parser-yang.c:68:25: error: conflicting types for 'yangparse'; have 'int(struct Parser *)'
50 68 | #define yyparse yangparse
51 | ^~~~~~~~~
52parser-yang.c:2312:1: note: in expansion of macro 'yyparse'
53 2312 | yyparse (struct Parser *parserPtr)
54 | ^~~~~~~
55parser-yang.h:16:12: note: previous declaration of 'yangparse' with type 'int(void)'
56 16 | extern int yangparse();
57 | ^~~~~~~~~
58In file included from scanner-yang.l:31:
59parser-yang.tab.h:170:5: error: conflicting types for 'yangparse'; have 'int(struct Parser *)'
60 170 | int yangparse (struct Parser *parserPtr);
61 | ^~~~~~~~~
62In file included from scanner-yang.l:30:
63parser-yang.h:16:12: note: previous declaration of 'yangparse' with type 'int(void)'
64 16 | extern int yangparse();
65 | ^~~~~~~~~
66scanner-yang.l: In function 'yangEnterLexRecursion':
67scanner-yang.l:79:1: warning: old-style function definition [-Wold-style-definition]
68 79 |
69 | ^
70make[2]: *** [Makefile:573: smi-data.lo] Error 1
71In file included from parser-smi.y:36:
72parser-smi.c: In function 'smiparse':
73parser-smi.c:10265:29: warning: passing argument 1 of 'smiyyerror' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
7410265 | yyerror (parserPtr, yymsgp);
75 | ^~~~~~
76error.h:25:44: note: in definition of macro 'yyerror'
77 25 | #define yyerror(parserPtr, msg) smiyyerror(msg, parserPtr)
78 | ^~~
79In file included from parser-smi.y:40:
80smi-check.h:71:30: note: expected 'char *' but argument is of type 'const char *'
81 71 | extern void smiyyerror(char *msg, Parser *parserPtr);
82 | ~~~~~~^~~
83make[2]: *** [Makefile:573: parser-yang.lo] Error 1
84make[2]: *** [Makefile:573: parser-smi.lo] Error 1
85make[2]: *** [Makefile:573: scanner-yang.lo] Error 1
86In file included from scanner-smi.l:34:
87parser-smi.tab.h:192:5: error: conflicting types for 'smiparse'; have 'int(struct Parser *)'
88 192 | int smiparse (struct Parser *parserPtr);
89 | ^~~~~~~~
90In file included from util.h:22,
91 from scanner-smi.l:32:
92parser-smi.h:27:12: note: previous declaration of 'smiparse' with type 'int(void)'
93 27 | extern int smiparse();
94 | ^~~~~~~~
95scanner-smi.l: In function 'smiEnterLexRecursion':
96scanner-smi.l:76:1: warning: old-style function definition [-Wold-style-definition]
97 76 | smiEnterLexRecursion(file)
98 | ^~~~~~~~~~~~~~~~~~~~
99
100Upstream-Status: Submitted [https://lists.ibr.cs.tu-bs.de/hyperkitty/list/libsmi@ibr.cs.tu-bs.de/thread/XUW4E575ALYHCAM33OEMU5V2LKUOYAVA/]
101Signed-off-by: mark.yang <mark.yang@lge.com>
102---
103 lib/parser-smi.h | 2 +-
104 lib/parser-yang.h | 4 ++--
105 lib/smi-data.c | 2 +-
106 3 files changed, 4 insertions(+), 4 deletions(-)
107
108diff --git a/lib/parser-smi.h b/lib/parser-smi.h
109index 90d7ec2..c2a3d1f 100644
110--- a/lib/parser-smi.h
111+++ b/lib/parser-smi.h
112@@ -24,7 +24,7 @@
113
114
115
116-extern int smiparse();
117+extern int smiparse(struct Parser *parserPtr);
118
119
120
121diff --git a/lib/parser-yang.h b/lib/parser-yang.h
122index dbfec46..f008cd6 100644
123--- a/lib/parser-yang.h
124+++ b/lib/parser-yang.h
125@@ -6,14 +6,14 @@
126 #include <stdio.h>
127
128 #include "yang-data.h"
129-
130+#include "smi-data.h"
131
132
133 #define YYERROR_VERBOSE
134
135
136
137-extern int yangparse();
138+extern int yangparse(struct Parser *parserPtr);
139
140
141
142diff --git a/lib/smi-data.c b/lib/smi-data.c
143index c9d95a4..773bc01 100644
144--- a/lib/smi-data.c
145+++ b/lib/smi-data.c
146@@ -39,7 +39,7 @@
147
148 #ifdef BACKEND_SMI
149 #include "scanner-smi.h"
150-extern int smiparse();
151+extern int smiparse(struct Parser *parserPtr);
152 #endif
153
154 #ifdef BACKEND_SMING
diff --git a/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb b/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb
index 4c397bdf9a..85eac33369 100644
--- a/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb
+++ b/meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb
@@ -9,6 +9,7 @@ SRC_URI = "https://www.ibr.cs.tu-bs.de/projects/${BPN}/download/${BP}.tar.gz \
9 file://libsmi-fix-the-test-dump-files.patch \ 9 file://libsmi-fix-the-test-dump-files.patch \
10 file://0001-Define-createIdentifierRef-prototype-in-yang-complex.patch \ 10 file://0001-Define-createIdentifierRef-prototype-in-yang-complex.patch \
11 file://0001-parser-yang-Define-_DEFAULT_SOURCE.patch \ 11 file://0001-parser-yang-Define-_DEFAULT_SOURCE.patch \
12 file://0001-Fix-build-failure-with-gcc-15.patch \
12 " 13 "
13 14
14SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3" 15SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3"