diff options
author | mark.yang <mark.yang@lge.com> | 2025-04-07 19:10:37 +0900 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-04-07 12:21:22 -0700 |
commit | 8ef6332dcf5b4020dac4a566430878cbf72f0627 (patch) | |
tree | 01bcdef1a0e709d1bb095a29f71b105bd68c24c5 | |
parent | 7f41319477a37f2b1d56fd0e68899bfc6ae7f4e8 (diff) | |
download | meta-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.patch | 154 | ||||
-rw-r--r-- | meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb | 1 |
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 @@ | |||
1 | From ea4bc4aad22455f8f37030f5915c4a94d76fd5e7 Mon Sep 17 00:00:00 2001 | ||
2 | From: "mark.yang" <mark.yang@lge.com> | ||
3 | Date: Mon, 7 Apr 2025 18:57:26 +0900 | ||
4 | Subject: [PATCH] Fix build failure with gcc-15 | ||
5 | |||
6 | * see more details: http://errors.yoctoproject.org/Errors/Details/851179/ | ||
7 | |||
8 | yang-data.c:594:9: error: too many arguments to function 'yangparse'; expected 0, have 1 | ||
9 | 594 | yangparse(parser); | ||
10 | | ^~~~~~~~~ ~~~~~~ | ||
11 | In file included from scanner-yang.h:19, | ||
12 | from yang-data.c:47: | ||
13 | parser-yang.h:16:12: note: declared here | ||
14 | 16 | extern int yangparse(); | ||
15 | | ^~~~~~~~~ | ||
16 | In file included from parser-yang.c:346: | ||
17 | parser-yang.tab.h:170:5: error: conflicting types for 'yangparse'; have 'int(struct Parser *)' | ||
18 | 170 | int yangparse (struct Parser *parserPtr); | ||
19 | | ^~~~~~~~~ | ||
20 | In file included from parser-yang.y:40: | ||
21 | parser-yang.h:16:12: note: previous declaration of 'yangparse' with type 'int(void)' | ||
22 | 16 | extern int yangparse(); | ||
23 | | ^~~~~~~~~ | ||
24 | make[2]: *** [Makefile:573: yang-data.lo] Error 1 | ||
25 | make[2]: *** Waiting for unfinished jobs.... | ||
26 | smi-data.c: In function 'loadModule': | ||
27 | smi-data.c:4658:9: error: too many arguments to function 'smiparse'; expected 0, have 1 | ||
28 | 4658 | smiparse((void *)&parser); | ||
29 | | ^~~~~~~~ ~~~~~~~~~~~~~~~ | ||
30 | smi-data.c:42:12: note: declared here | ||
31 | 42 | extern int smiparse(); | ||
32 | | ^~~~~~~~ | ||
33 | parser-smi.c:1515:5: error: conflicting types for 'smiparse'; have 'int(struct Parser *)' | ||
34 | 1515 | int smiparse (struct Parser *parserPtr); | ||
35 | | ^~~~~~~~ | ||
36 | In file included from parser-smi.y:37: | ||
37 | parser-smi.h:27:12: note: previous declaration of 'smiparse' with type 'int(void)' | ||
38 | 27 | extern int smiparse(); | ||
39 | | ^~~~~~~~ | ||
40 | parser-smi.c:63:25: error: conflicting types for 'smiparse'; have 'int(struct Parser *)' | ||
41 | 63 | #define yyparse smiparse | ||
42 | | ^~~~~~~~ | ||
43 | parser-smi.c:3207:1: note: in expansion of macro 'yyparse' | ||
44 | 3207 | yyparse (struct Parser *parserPtr) | ||
45 | | ^~~~~~~ | ||
46 | parser-smi.h:27:12: note: previous declaration of 'smiparse' with type 'int(void)' | ||
47 | 27 | extern int smiparse(); | ||
48 | | ^~~~~~~~ | ||
49 | parser-yang.c:68:25: error: conflicting types for 'yangparse'; have 'int(struct Parser *)' | ||
50 | 68 | #define yyparse yangparse | ||
51 | | ^~~~~~~~~ | ||
52 | parser-yang.c:2312:1: note: in expansion of macro 'yyparse' | ||
53 | 2312 | yyparse (struct Parser *parserPtr) | ||
54 | | ^~~~~~~ | ||
55 | parser-yang.h:16:12: note: previous declaration of 'yangparse' with type 'int(void)' | ||
56 | 16 | extern int yangparse(); | ||
57 | | ^~~~~~~~~ | ||
58 | In file included from scanner-yang.l:31: | ||
59 | parser-yang.tab.h:170:5: error: conflicting types for 'yangparse'; have 'int(struct Parser *)' | ||
60 | 170 | int yangparse (struct Parser *parserPtr); | ||
61 | | ^~~~~~~~~ | ||
62 | In file included from scanner-yang.l:30: | ||
63 | parser-yang.h:16:12: note: previous declaration of 'yangparse' with type 'int(void)' | ||
64 | 16 | extern int yangparse(); | ||
65 | | ^~~~~~~~~ | ||
66 | scanner-yang.l: In function 'yangEnterLexRecursion': | ||
67 | scanner-yang.l:79:1: warning: old-style function definition [-Wold-style-definition] | ||
68 | 79 | | ||
69 | | ^ | ||
70 | make[2]: *** [Makefile:573: smi-data.lo] Error 1 | ||
71 | In file included from parser-smi.y:36: | ||
72 | parser-smi.c: In function 'smiparse': | ||
73 | parser-smi.c:10265:29: warning: passing argument 1 of 'smiyyerror' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] | ||
74 | 10265 | yyerror (parserPtr, yymsgp); | ||
75 | | ^~~~~~ | ||
76 | error.h:25:44: note: in definition of macro 'yyerror' | ||
77 | 25 | #define yyerror(parserPtr, msg) smiyyerror(msg, parserPtr) | ||
78 | | ^~~ | ||
79 | In file included from parser-smi.y:40: | ||
80 | smi-check.h:71:30: note: expected 'char *' but argument is of type 'const char *' | ||
81 | 71 | extern void smiyyerror(char *msg, Parser *parserPtr); | ||
82 | | ~~~~~~^~~ | ||
83 | make[2]: *** [Makefile:573: parser-yang.lo] Error 1 | ||
84 | make[2]: *** [Makefile:573: parser-smi.lo] Error 1 | ||
85 | make[2]: *** [Makefile:573: scanner-yang.lo] Error 1 | ||
86 | In file included from scanner-smi.l:34: | ||
87 | parser-smi.tab.h:192:5: error: conflicting types for 'smiparse'; have 'int(struct Parser *)' | ||
88 | 192 | int smiparse (struct Parser *parserPtr); | ||
89 | | ^~~~~~~~ | ||
90 | In file included from util.h:22, | ||
91 | from scanner-smi.l:32: | ||
92 | parser-smi.h:27:12: note: previous declaration of 'smiparse' with type 'int(void)' | ||
93 | 27 | extern int smiparse(); | ||
94 | | ^~~~~~~~ | ||
95 | scanner-smi.l: In function 'smiEnterLexRecursion': | ||
96 | scanner-smi.l:76:1: warning: old-style function definition [-Wold-style-definition] | ||
97 | 76 | smiEnterLexRecursion(file) | ||
98 | | ^~~~~~~~~~~~~~~~~~~~ | ||
99 | |||
100 | Upstream-Status: Submitted [https://lists.ibr.cs.tu-bs.de/hyperkitty/list/libsmi@ibr.cs.tu-bs.de/thread/XUW4E575ALYHCAM33OEMU5V2LKUOYAVA/] | ||
101 | Signed-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 | |||
108 | diff --git a/lib/parser-smi.h b/lib/parser-smi.h | ||
109 | index 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 | |||
121 | diff --git a/lib/parser-yang.h b/lib/parser-yang.h | ||
122 | index 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 | |||
142 | diff --git a/lib/smi-data.c b/lib/smi-data.c | ||
143 | index 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 | ||
14 | SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3" | 15 | SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3" |