Skip to content

ParserEngine.h should include expat.h "quoted" not <angle bracketed> #4045

@Vadrgh

Description

@Vadrgh

Summary

When using poco as a conan2 managed dependency of a cmake project, including Poco/SAX/SAXParser.h results in Poco/XML/ParserEngine.h:22:10: error: 'expat.h' file not found.

With clang instead of g++ there is an additional hint:

 'expat.h' file not found with <angled> include; use "quotes" instead

After following that suggestion and patching ParserEngine.h in the conan repository / local cache, the project compiles.

Details

Dev Environment

  • OS: Fedora38
  • Tools:
    • gcc: 13.1.1
    • clang: 16.0.4
    • cmake: 3.26.4
    • conan: 2.0.6
  • dependency specified as poco/1.12.4

Observations

The relevant part in HEAD of ParserEngine.h reads

#if defined(POCO_UNBUNDLED)
#include <expat.h>
#else
#include "Poco/XML/expat.h"

⇒ only for POCO_UNBUNDLED expat.h is a system(-override) include.

Maybe more important: same poco/1.12.4 worked before on Fedora36 with conan-1.58 and the toolchain belonging to that OS version,- whatever that was.

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