Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Linux compilation error in ykpers-json.c #188

@RogueScholar

Description

@RogueScholar

Attempting to compile from source on Kubuntu 23.10 using GCC 13.2.0 resulted in the following error:

ykpers-json.c: In function 'set_json_value':
ykpers-json.c:53:27: error: 'TRUE' undeclared (first use in this function)
   53 |                 if(ret == TRUE && json_object_get_type(joption) == json_type_boolean) {
      |                           ^~~~
ykpers-json.c:53:27: note: each undeclared identifier is reported only once for each function it appears in
ykpers-json.c: In function '_ykp_json_import_cfg':
ykpers-json.c:230:85: error: 'FALSE' undeclared (first use in this function)
  230 |                 if(yk_json_object_object_get(jobj, "yubiProdConfig", yprod_json) == FALSE) {
      |                                                                                     ^~~~~
ykpers-json.c:243:86: error: 'TRUE' undeclared (first use in this function)
  243 |                 if(yk_json_object_object_get(yprod_json, "targetConfig", jtarget) == TRUE) {
      |                                                                                      ^~~~
make[1]: *** [Makefile:789: ykpers-json.lo] Error 1

The build was configured using the following flags on a clean environment:

$ ./configure --sysconfdir=/etc --sharedstatedir=/var/lib --localstatedir=/var --runstatedir=/run --libdir=/usr/local/lib/x86_64-linux-gnu --includedir=/usr/local/include/x86_64-linux-gnu --with-backend=libusb-1.0 --with-udevrulesdir=/usr/lib/udev/rules.d
  ...
  configure: summary of build options:

  version:           1.19.0 shared 20:0:19 major 1 minor 19 patch 0 number 0x011300
  Host type:         x86_64-pc-linux-gnu
  Install prefix:    /usr/local
  Compiler:          gcc
  Library types:     Shared=yes, Static=yes
  USB backend:       libusb-1.0
  JSON library:      yes
    CFLAGS:          -I/usr/include/json-c
    LIBS:            -ljson-c
    pretty printing: yes
  udev rules dir:    /usr/lib/udev/rules.d
  udev rules file:   69-yubikey.rules

Relevant installed dependency versions are as follows:

  • GCC C compiler collection: 13.2.0
  • pkgconf: 2.0.3
  • libyubikey0: 1.13
  • libusb-1.0: 1.0.26
  • libjson-c5: 0.17
  • libudev1: 253.5
  • valgrind: 3.21.0

Please advise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions