Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] swupdate suricatta build error
@ 2022-01-28  3:59 Chris
  2022-01-29 19:07 ` Peter Seiderer
  0 siblings, 1 reply; 2+ messages in thread
From: Chris @ 2022-01-28  3:59 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 2092 bytes --]

Hi, there
Did anybody ever see the same issue? When build 2021.11 for raspberry pi,
we added swupdate package and enabled suricatta mode by "make
swupdate-menuconfig", then we got error as below,

suricatta/common.c:79:26: error: storage size of ‘json_res’ isn’t known
   79 |  enum json_tokener_error json_res;
      |                          ^~~~~~~~
suricatta/common.c:82:15: warning: implicit declaration of function
‘json_tokener_parse_ex’ [-Wimplicit-function-declaration]
   82 |   json_root = json_tokener_parse_ex(
      |               ^~~~~~~~~~~~~~~~~~~~~
suricatta/common.c:82:13: warning: assignment to ‘struct json_object *’
from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   82 |   json_root = json_tokener_parse_ex(
      |             ^
suricatta/common.c:84:23: warning: implicit declaration of function
‘json_tokener_get_error’ [-Wimplicit-function-declaration]
   84 |  } while ((json_res = json_tokener_get_error(json_tokenizer)) ==
      |                       ^~~~~~~~~~~~~~~~~~~~~~
suricatta/common.c:85:4: error: ‘json_tokener_continue’ undeclared (first
use in this function)
   85 |    json_tokener_continue);
      |    ^~~~~~~~~~~~~~~~~~~~~
suricatta/common.c:85:4: note: each undeclared identifier is reported only
once for each function it appears in
suricatta/common.c:86:18: error: ‘json_tokener_success’ undeclared (first
use in this function); did you mean ‘json_tokener_error’?
   86 |  if (json_res != json_tokener_success) {
      |                  ^~~~~~~~~~~~~~~~~~~~
      |                  json_tokener_error
suricatta/suricatta.c:17:10: fatal error: json-c/json.h: No such file or
directory
   17 | #include <json-c/json.h>


   - host machine (OS/release) --Linux MINT20
   - version of Buildroot--2021.11
   - target for which the build fails--raspberry pi b
   - package(s) for which the build fails--swupdate
   - the command that fails and its output--as posted above
   - any information you think that may be relevant


Thanks
Chris

[-- Attachment #1.2: Type: text/html, Size: 4071 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] swupdate suricatta build error
  2022-01-28  3:59 [Buildroot] swupdate suricatta build error Chris
@ 2022-01-29 19:07 ` Peter Seiderer
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Seiderer @ 2022-01-29 19:07 UTC (permalink / raw)
  To: Chris; +Cc: buildroot

Hello Chris,

On Fri, 28 Jan 2022 12:59:23 +0900, Chris <cheart0@gmail.com> wrote:

> Hi, there
> Did anybody ever see the same issue? When build 2021.11 for raspberry pi,
> we added swupdate package and enabled suricatta mode by "make
> swupdate-menuconfig", then we got error as below,
> 
> suricatta/common.c:79:26: error: storage size of ‘json_res’ isn’t known
>    79 |  enum json_tokener_error json_res;
>       |                          ^~~~~~~~
> suricatta/common.c:82:15: warning: implicit declaration of function
> ‘json_tokener_parse_ex’ [-Wimplicit-function-declaration]
>    82 |   json_root = json_tokener_parse_ex(
>       |               ^~~~~~~~~~~~~~~~~~~~~
> suricatta/common.c:82:13: warning: assignment to ‘struct json_object *’
> from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
>    82 |   json_root = json_tokener_parse_ex(
>       |             ^
> suricatta/common.c:84:23: warning: implicit declaration of function
> ‘json_tokener_get_error’ [-Wimplicit-function-declaration]
>    84 |  } while ((json_res = json_tokener_get_error(json_tokenizer)) ==
>       |                       ^~~~~~~~~~~~~~~~~~~~~~
> suricatta/common.c:85:4: error: ‘json_tokener_continue’ undeclared (first
> use in this function)
>    85 |    json_tokener_continue);
>       |    ^~~~~~~~~~~~~~~~~~~~~
> suricatta/common.c:85:4: note: each undeclared identifier is reported only
> once for each function it appears in
> suricatta/common.c:86:18: error: ‘json_tokener_success’ undeclared (first
> use in this function); did you mean ‘json_tokener_error’?
>    86 |  if (json_res != json_tokener_success) {
>       |                  ^~~~~~~~~~~~~~~~~~~~
>       |                  json_tokener_error
> suricatta/suricatta.c:17:10: fatal error: json-c/json.h: No such file or
> directory
>    17 | #include <json-c/json.h>
> 
> 
>    - host machine (OS/release) --Linux MINT20
>    - version of Buildroot--2021.11
>    - target for which the build fails--raspberry pi b
>    - package(s) for which the build fails--swupdate
>    - the command that fails and its output--as posted above
>    - any information you think that may be relevant
> 
> 
> Thanks
> Chris

Seems suricatta depens on json-c, simple enable additional

	BR2_PACKAGE_JSON_C=y

in your .config file (or json-c via 'make menuconfig')...

Note: swupdate has already an optional dependency on json-c
(see [1]) but an hard dependency for an changed swupdate
config (via 'make swupdate-menuconfig' is hard to express
in buildroot)...

Regards,
Peter

[1] https://git.buildroot.net/buildroot/tree/package/swupdate/swupdate.mk#n42
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-01-29 19:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-28  3:59 [Buildroot] swupdate suricatta build error Chris
2022-01-29 19:07 ` Peter Seiderer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox