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 build if --zig-lib-dir value is a relative path #15630

Closed
DraagrenKirneh opened this issue May 9, 2023 · 3 comments
Closed
Labels
bug Observed behavior contradicts documented or intended behavior
Milestone

Comments

@DraagrenKirneh
Copy link
Contributor

DraagrenKirneh commented May 9, 2023

Zig Version

0.11.0-dev.2969+855493bb8

Steps to Reproduce and Observed Behavior

This issue can be reproduced by running the following command:
$DEVKIT\bin\zig.exe build -p stage3 --search-prefix $DEVKIT --zig-lib-dir lib -Dstatic-llvm -Duse-zig-libcxx -Dtarget=x86_64-windows-gnu

Which is the command used by the building guide for windows (option 1b): https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows#option-1b-zig-build

Running the above command (with $DEVKIT replaced by the devkit path) will give the following error:

run docgen (langref.html): error: error: unable to open zig lib directory 'lib': FileNotFound

The following command exited with code 1:
$DEVKIT\bin\zig.exe build-exe --name hello --color on hello.zig --zig-lib-dir lib
$ZIGREPOSITORY\zig\doc\langref.html.in:402:31: error: example failed to compile
{#code_begin|exe|hello#}

Workaround:
Adding -Dno-langref to skip the lang ref generation or changing the lib option value used by "--zig-lib-dir" to ./lib or using the full path to it c:\some-path-to-zig\lib.

Expected Behavior

docgen should have the same behavior on --zig-lib-dir paths as the rest of the build system.

@DraagrenKirneh DraagrenKirneh added the bug Observed behavior contradicts documented or intended behavior label May 9, 2023
@andrewrk
Copy link
Member

Is this perhaps a duplicate of #12685?

@andrewrk andrewrk added this to the 0.11.0 milestone Jul 23, 2023
@DraagrenKirneh
Copy link
Contributor Author

DraagrenKirneh commented Jul 23, 2023

Is this perhaps a duplicate of #12685?

Yeah, I think it is.

@DraagrenKirneh
Copy link
Contributor Author

duplicate of #12685

@DraagrenKirneh DraagrenKirneh closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2023
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
Projects
None yet
Development

No branches or pull requests

2 participants