Skip to content

Conversation

@andrewrk
Copy link
Member

to ziglang/translate-c@0a146cc

haven't diagnosed why this is happening yet:

andy@bark ~/d/z/build-release (aro-sync)> ZIG_DEBUG_CMD=1 stage3/bin/zig translate-c hello.c -lc --verbose-cimport
--zig-integration -x c -isystem /home/andy/dev/zig/lib/compiler/aro/include -fno-PIE -fPIC -gdwarf-4 -gdwarf32 -fno-lto -MD -MV -MF /home/andy/dev/zig/.zig-cache/tmp/dd150bafbc84a2bd/hello.c.d -fhosted -nostdinc -D__GLIBC_MINOR__=39 -isystem /home/andy/dev/zig/lib/include -isystem /nix/store/m3n0h7646c7qwf6dbvdqhslmxmv2dg3z-glibc-2.40-66-dev/include -O0 -target x86_64-linux.6.17.5...6.17.5-gnu.2.39 -mcpu=znver4-16bit_mode-32bit_mode-3dnow-3dnowa+64bit+adx+aes+allow_light_256_bit-amx_avx512-amx_bf16-amx_complex-amx_fp16-amx_fp8-amx_int8-amx_movrs-amx_tf32-amx_tile-amx_transpose+avx-avx10_1-avx10_2+avx2+avx512bf16+avx512bitalg+avx512bw+avx512cd+avx512dq-avx512er+avx512f-avx512fp16+avx512ifma-avx512pf+avx512vbmi+avx512vbmi2+avx512vl+avx512vnni-avx512vp2intersect+avx512vpopcntdq-avxifma-avxneconvert-avxvnni-avxvnniint16-avxvnniint8+bmi+bmi2-branch_hint+branchfusion-bsf_bsr_0_clobbers_result-ccmp-cf-cldemote+clflushopt+clwb+clzero+cmov-cmpccxadd+crc32+cx16+cx8-egpr-enqcmd-ermsb+evex512+f16c-false_deps_getmant-false_deps_lzcnt_tzcnt-false_deps_mulc-false_deps_mullq-false_deps_perm-false_deps_popcnt-false_deps_range-fast_11bytenop+fast_15bytenop-fast_7bytenop+fast_bextr+fast_dpwssd-fast_gather-fast_hops+fast_imm16+fast_lzcnt+fast_movbe+fast_scalar_fsqrt+fast_scalar_shift_masks-fast_shld_rotate-fast_variable_crosslane_shuffle+fast_variable_perlane_shuffle+fast_vector_fsqrt-fast_vector_shift_masks-faster_shift_than_shuffle+fma-fma4+fsgsbase+fsrm+fxsr+gfni-harden_sls_ijmp-harden_sls_ret-hreset-idivl_to_divb+idivq_to_divl-inline_asm_use_gpr32+invpcid-kl-lea_sp-lea_uses_ag-lvi_cfi-lvi_load_hardening-lwp+lzcnt+macrofusion+mmx+movbe-movdir64b-movdiri-movrs+mwaitx-ndd-nf-no_bypass_delay-no_bypass_delay_blend-no_bypass_delay_mov-no_bypass_delay_shuffle+nopl-pad_short_functions+pclmul-pconfig+pku+popcnt-ppx-prefer_128_bit-prefer_256_bit-prefer_mask_registers-prefer_movmsk_over_vtest-prefer_no_gather-prefer_no_scatter-prefetchi-prefetchwt1+prfchw-ptwrite-push2pop2-raoint+rdpid+rdpru+rdrnd+rdseed-retpoline-retpoline_external_thunk-retpoline_indirect_branches-retpoline_indirect_calls-rtm+sahf+sbb_dep_breaking-serialize-seses-sgx+sha-sha512+shstk-slow_3ops_lea-slow_incdec-slow_lea-slow_pmaddwd-slow_pmulld-slow_shld-slow_two_mem_ops-slow_unaligned_mem_16-slow_unaligned_mem_32-sm3-sm4+smap+smep-soft_float+sse+sse2+sse3+sse4_1+sse4_2+sse4a-sse_unaligned_mem+ssse3-tagged_globals-tbm-tsxldtrk-tuning_fast_imm_vector_shift-uintr-use_glm_div_sqrt_costs-use_slm_arith_costs-usermsr+vaes+vpclmulqdq+vzeroupper-waitpkg+wbnoinvd-widekl+x87-xop+xsave+xsavec+xsaveopt+xsaves-zu hello.c -o /home/andy/dev/zig/.zig-cache/tmp/dd150bafbc84a2bd/hello.zig
info(compilation): processing dep file at /home/andy/dev/zig/.zig-cache/tmp/dd150bafbc84a2bd/hello.c.d
error: translation failure
hello.c:1:10: error: 'stdio.h' not found
#include <stdio.h>
         ^

to 0a146cc07eb65c3ab9cd4b927b7240deaaf3c478
@andrewrk andrewrk requested a review from Vexu November 20, 2025 02:12
@Vexu
Copy link
Member

Vexu commented Nov 20, 2025

haven't diagnosed why this is happening yet:

It's because you're missing a initSearchPath in translate_c/main.zig.

I also have this open at #25780 but haven't added the latest translate-c changes there yet.

@andrewrk
Copy link
Member Author

andrewrk commented Nov 20, 2025

Ah, completely missed that, thank you!

I'll leave the branch in case you want it, but otherwise I'll leave it in your hands.

@andrewrk andrewrk closed this Nov 20, 2025
@Vexu Vexu deleted the aro-sync branch November 20, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants