Skip to content

ly_config.h.in: LY_SRC_DIR embeds build path in installed public header #2553

Open

Description

@guna-120601

LY_SRC_DIR is defined in src/ly_config.h.in as:

#define LY_SRC_DIR "@CMAKE_CURRENT_SOURCE_DIR@"

This embeds the build-time source directory path into the installed public header (ly_config.h), which causes build path QA errors in cross-compilation environments like Yocto/OpenEmbedded.

LY_SRC_DIR is only referenced by tests and fuzzers:

tests/perf/perf.c
tests/fuzz/yang_parse_module.c
tests/fuzz/lys_parse_mem.c
tests/fuzz/lyd_parse_mem_xml.c
tests/fuzz/lyd_parse_mem_json.c
No library source code uses LY_SRC_DIR.

Suggestion: Move LY_SRC_DIR to a separate test-only config header so it is not included in the installed public header.

Activity

  1. michalvasko commented on Aug 12, 2026

    @michalvasko
    Member

    Right, macro removed.

  2. added
    is:enhancement
    status:completed
    on Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:enhancementstatus:completed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions