Skip to content

Errors when building with libxml2 ≥ 2.12.0 #36

@ryandesign

Description

@ryandesign

libinfinity 0.7.2 does not build with libxml2 ≥ 2.12.0. Errors from the first encountered file are:

adopted/inf-adopted-session-record.c:88:3: error: use of undeclared identifier 'xmlErrorPtr'
  xmlErrorPtr xmlerror;
  ^

adopted/inf-adopted-session-record.c:91:3: error: use of undeclared identifier 'xmlerror'
  xmlerror = xmlGetLastError();
  ^
adopted/inf-adopted-session-record.c:91:14: error: implicit declaration of function 'xmlGetLastError' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  xmlerror = xmlGetLastError();
             ^

adopted/inf-adopted-session-record.c:97:5: error: use of undeclared identifier 'xmlerror'
    xmlerror->message
    ^

adopted/inf-adopted-session-record.c:559:3: error: use of undeclared identifier 'xmlErrorPtr'
  xmlErrorPtr xmlerror;
  ^

adopted/inf-adopted-session-record.c:593:5: error: use of undeclared identifier 'xmlerror'
    xmlerror = xmlGetLastError();
    ^
adopted/inf-adopted-session-record.c:593:16: error: implicit declaration of function 'xmlGetLastError' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    xmlerror = xmlGetLastError();
               ^
adopted/inf-adopted-session-record.c:598:7: error: use of undeclared identifier 'xmlerror'
      xmlerror->code,
      ^
adopted/inf-adopted-session-record.c:599:7: error: use of undeclared identifier 'xmlerror'
      xmlerror->message
      ^
adopted/inf-adopted-session-record.c:612:5: error: use of undeclared identifier 'xmlerror'
    xmlerror = xmlGetLastError();
    ^
adopted/inf-adopted-session-record.c:612:16: error: implicit declaration of function 'xmlGetLastError' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    xmlerror = xmlGetLastError();
               ^
adopted/inf-adopted-session-record.c:617:7: error: use of undeclared identifier 'xmlerror'
      xmlerror->code,
      ^
adopted/inf-adopted-session-record.c:618:7: error: use of undeclared identifier 'xmlerror'
      xmlerror->message
      ^
adopted/inf-adopted-session-record.c:674:3: error: use of undeclared identifier 'xmlErrorPtr'
  xmlErrorPtr xmlerror;
  ^

adopted/inf-adopted-session-record.c:723:5: error: use of undeclared identifier 'xmlerror'
    xmlerror = xmlGetLastError();
    ^
adopted/inf-adopted-session-record.c:723:16: error: implicit declaration of function 'xmlGetLastError' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    xmlerror = xmlGetLastError();
               ^
adopted/inf-adopted-session-record.c:728:7: error: use of undeclared identifier 'xmlerror'
      xmlerror->code,
      ^
adopted/inf-adopted-session-record.c:729:7: error: use of undeclared identifier 'xmlerror'
      xmlerror->message
      ^

but many, many other files need fixes too. The problem occurs because libxml2 2.12.0 removed unnecessary inclusions from their headers, exposing areas where your code has not included the necessary headers.

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