Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docgen fails to cross compiling for windows on linux host #15205

Open
perillo opened this issue Apr 8, 2023 · 2 comments
Open

docgen fails to cross compiling for windows on linux host #15205

perillo opened this issue Apr 8, 2023 · 2 comments
Labels
bug Observed behavior contradicts documented or intended behavior docs
Milestone

Comments

@perillo
Copy link
Contributor

perillo commented Apr 8, 2023

Zig Version

0.11.0-dev.2401+348751462

Steps to Reproduce and Observed Behavior

build/stage3/bin/zig build --prefix /data/spool/zig -Dtarget=x86_64-windows
zig build-exe zig Debug x86_64-windows: error: the following command failed with 2 compilation errors:
/home/manlio/src/contrib/zig/github.com/perillo/zig/build/stage3/bin/zig build-exe --stack 33554432 /home/manlio/src/contrib/zig/github.com/perillo/zig/src/main.zig --cache-dir /home/manlio/src/contrib/zig/github.com/perillo/zig/zig-cache --global-cache-dir /home/manlio/.cache/zig --name zig -target x86_64-windows -mcpu x86_64 --mod build_options::/home/manlio/src/contrib/zig/github.com/perillo/zig/zig-cache/c/910dce64078a7561b60342bdc3714da2/options.zig --deps build_options -fno-build-id -fno-lto --enable-cache --listen=- 
run docgen (langref.html): error: error: lld-link: could not open '/home/manlio/.cache/zig/o/a607d807adb246ae33def8b810920fc1/kernel32.lib': No such file or directory
error: lld-link: could not open '/home/manlio/.cache/zig/o/8522759cf6bccbac1d86402cb7150d2d/ntdll.lib': No such file or directory

The following command exited with code 1:
/home/manlio/src/contrib/zig/github.com/perillo/zig/build/stage3/bin/zig test docgen_tmp/test_noreturn_from_exit.zig -target x86_64-windows --test-no-exec 
/home/manlio/src/contrib/zig/github.com/perillo/zig/doc/langref.html.in:5120:25: error: test failed
      {#target_windows#}
                        
error: ParseError
/home/manlio/src/contrib/zig/github.com/perillo/zig/doc/docgen.zig:1861:17: 0x28381d in exec (docgen)
                return error.ChildExitError;
                ^
/home/manlio/src/contrib/zig/github.com/perillo/zig/doc/docgen.zig:287:5: 0x29f294 in parseError__anon_6588 (docgen)
    return error.ParseError;
    ^
/home/manlio/src/contrib/zig/github.com/perillo/zig/doc/docgen.zig:1583:29: 0x296590 in genHtml__anon_4648 (docgen)
                            return parseError(tokenizer, code.source_token, "test failed", .{});
                            ^
/home/manlio/src/contrib/zig/github.com/perillo/zig/doc/docgen.zig:104:5: 0x2a58f3 in main (docgen)
    try genHtml(allocator, &tokenizer, &toc, buffered_writer.writer(), zig_exe, opt_zig_lib_dir, do_code_tests);
    ^

run docgen (langref.html): error: the following command exited with error code 1:
/home/manlio/src/contrib/zig/github.com/perillo/zig/zig-cache/o/7d5d6141b32df70742f3b95e912d3d3b/docgen --zig /home/manlio/src/contrib/zig/github.com/perillo/zig/build/stage3/bin/zig /home/manlio/src/contrib/zig/github.com/perillo/zig/doc/langref.html.in /home/manlio/src/contrib/zig/github.com/perillo/zig/zig-cache/o/0ca64785b60d183e7bae2353c48b16d1/langref.html 
Build Summary: 3/8 steps succeeded; 2 failed (disable with -fno-summary)
install transitive failure
├─ install generated to doc/langref.html transitive failure
│  └─ run docgen (langref.html) failure
│     └─ zig build-exe docgen Debug native cached 78ms MaxRSS:96M
├─ install lib/ cached
└─ install zig transitive failure
   └─ zig build-exe zig Debug x86_64-windows 2 errors
      └─ options success
error: lld-link: could not open '/home/manlio/.cache/zig/o/a607d807adb246ae33def8b810920fc1/kernel32.lib': No such file or directory
error: lld-link: could not open '/home/manlio/.cache/zig/o/8522759cf6bccbac1d86402cb7150d2d/ntdll.lib': No such file or directory

The problem is that I have wine installed, with binfmt_misc enabled.

Expected Behavior

No errors.

@perillo perillo added the bug Observed behavior contradicts documented or intended behavior label Apr 8, 2023
@andrewrk andrewrk added the docs label Apr 10, 2023
@andrewrk
Copy link
Member

This looks completely unrelated to wine. It is a bug in docgen when cross-compiling the language reference.

@andrewrk andrewrk changed the title build.zig: cross compiling for windows fails with wine on linux docgen fails to cross compiling for windows on linux host Apr 10, 2023
@andrewrk andrewrk added this to the 0.13.0 milestone Apr 10, 2023
@perillo
Copy link
Contributor Author

perillo commented Apr 10, 2023

This looks completely unrelated to wine. It is a bug in docgen when cross-compiling the language reference.

Yes. My comment was misleading. Wine being enabled in binfmt_misc was just the trigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior docs
Projects
None yet
Development

No branches or pull requests

2 participants