CI R406: headerless self C lacks expected POSIX fdopendir pointer-returning binding

Open
#32,780 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
c
Domain
compilers

Research direction

Start at the assert_self_c_directory_bindings check near vlib/v/gen/c/headerless_program_test.v:269 and reproduce with ./v -cc clang -keepc on that test to inspect the generated C. Compare the emitted fdopendir prototype's name, return type and ordering against what the assertion expects, using the V binding path to find where it is produced. Done means the assertion passes on master without relaxing it or adding a C header; the issue is still under investigation, so confirm with maintainers first.

Written by the indexing model from the issue text.

Description

Executed master 486397e6e188c2009a5cd046a983c39bcc4e99d2 macOS Clang shard job 137465815318 completed 2026-11-23 04:41:53Z after 429 VLIB passes/117 skips. Original command ./v -cc clang -no-memory-limit -silent vlib/v/gen/c/headerless_program_test.v fails assert_self_c_directory_bindings: expected DIR* fdopendir( prototype in V self-generated C, not present. Also V3 unit compiler job 137463971681 fails the same assertion (alongside separate R405 malformed -cc argv). Distinct from R402, which complains of forbidden #include <features.h>. Both can coexist. Current test and V binding path require -keepc output comparison at failing and current revisions, registration/type alias/prototype order and exact generated declaration, not relaxing assertion or adding a blind C header. Source entry at vlib/v/gen/c/headerless_program_test.v:269; check whether fdopendir is emitted as a differently named/typed prototype. Status investigating/applicability unknown; no corrected native V test. First/last observed 04:13–04:41Z Nov23 on master486.

[!NOTE]
You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Dominant language
V
Stars
38.1k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
682

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vlang/v

All issues in vlang/v

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.