Skip to content

Migrator: a unity build sees the same global from two units and reports every function of the included unit unreadable (libcurl: 183 of its units) #2980

Closed

Description

@ehartford

From volkdude85/withlang-arch (VERIFICATION.md), reimplemented here because their fix sits on a private fork. with get c.libcurl 8.23.0: libcurl's unity_0_c.c #includes cf-h1-proxy.c and the others, so a global defined in an included unit is seen from two units (the unity file and the unit itself); the migrator counted that as a duplicate definition and marked 183 units unreadable, which left 137 of 152 public functions raw. Their fix: "the same global at the same site is one definition" (3 files, +54 lines). After it, two more causes wore the same label: build-time-generated units (tool_hugehelp.c) and the examples' own mains, both in #2972.

Repro: a project with c.libcurl = "8.23.0", with get c.libcurl, read the facade report's unreadable-unit list. Done when a definition reached through a unity include is one definition, the report says 152 of 152, and a fixture with two units including one .c pins it.

Activity

  1. added
    bug
    on Nov 2, 2026
  2. ehartford commented on Nov 2, 2026

    @ehartford
    ContributorAuthor

    Reproduced here with with get c.libcurl (8.23.0, with v0.16.0.8-g018ea96c5): facade libcurl: 152 functions, 15 presented safely, 137 raw; 3956 internal, 183 unit(s) could not be read, and 6988 function(s) are declared only by headers the package does not install (the curlx_* family). Report: a scratch project's .with/deps/c/libcurl/8.23.0/facade-report.txt. The same 183 as on Arch, so the unity include is the first cause here too.

  3. ehartford commented on Nov 2, 2026

    @ehartford
    ContributorAuthor

    From volkdude85/withlang-arch#1, the exact diagnostic: duplicate full global definition for Curl_cft_h1_proxy, defined in both the Unity build's unity_0_c.c and cf-h1-proxy.c. The grep target in the migrator is that message.

  4. added 2 commits that reference this issue on Nov 3, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions