-
Notifications
You must be signed in to change notification settings - Fork 146
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
Disallowed file accesses #1282
Comments
BuildXL requires by default that all outputs (writes) be declared. Unfortunately symbol files are sometimes not considered "real outputs", so probably this write is not declared in the spec and you're getting these errors. Some stuff you can try:
|
Thank you for your suggestions. I am new to BuildXL and want to use it in our build.
I was able to proceed by using the additionalOutputDirectories directive but now I’ve come upon a mismatch of “NTDDI_VERSION setting conflicts with _WIN32_WINNT setting”.
Thanks. Jim
From: Marcelo Lynch <[email protected]>
Sent: Friday, January 22, 2021 1:10 PM
To: microsoft/BuildXL <[email protected]>
Cc: Youngman, James [External/Artech] <[email protected]>; Author <[email protected]>
Subject: [EXTERNAL] Re: [microsoft/BuildXL] Disallowed file accesses (#1282)
BuildXL requires by default that all outputs (writes) be declared. Unfortunately symbol files are sometimes not considered "real outputs", so probably this write is not declared in the spec and you're getting these errors.
Some stuff you can try:
* Use the /Z7 switch [docs.microsoft.com]<https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.microsoft.com_en-2Dus_cpp_build_reference_z7-2Dzi-2Dzi-2Ddebug-2Dinformation-2Dformat-3Fview-3Dmsvc-2D160&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=xP-E-JQ7-c0Vg44oT8cmSNA7y6J-0y9Y5QWOoO-wl1s&m=vuVR7mKGoZ4MO4HmkmgkKPK1uXC8xRgOTRA8j7qB7v4&s=LbEP8ESHYg_zInjJNHcb_IC7moG_8feGP30M3ZsXVa0&e=> for cl to inject the debug symbols into the object file (which will be a declared output for the process) instead of outputting to a (non-declared) .pdb.
* Untrack the cl.exe accesses to the v:\code\win32\Debug\pdb directory by adding it to an allowlist [github.com]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_microsoft_BuildXL_blob_master_Documentation_Wiki_Configuration.md-23file-2Daccess-2Dallowlists&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=xP-E-JQ7-c0Vg44oT8cmSNA7y6J-0y9Y5QWOoO-wl1s&m=vuVR7mKGoZ4MO4HmkmgkKPK1uXC8xRgOTRA8j7qB7v4&s=zxhwWx289EU914XVxjmCoEY6JJziVCne7Sc-AlPU5IQ&e=>. Allow lists are meant for these cases but are a technically unsafe option because they may lead to non-deterministic builds. In your case the directory looks pretty safe to untrack because it looks only meant for symbol files anyways and will not affect the main build outputs.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [github.com]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_microsoft_BuildXL_issues_1282-23issuecomment-2D765626117&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=xP-E-JQ7-c0Vg44oT8cmSNA7y6J-0y9Y5QWOoO-wl1s&m=vuVR7mKGoZ4MO4HmkmgkKPK1uXC8xRgOTRA8j7qB7v4&s=BKCcOW7tjw2M06p-BENGMLhGkBaDOSgaxf3raX5S3bc&e=>, or unsubscribe [github.com]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ASFSHAKKZJCTLQNTNP4LCFLS3HEPTANCNFSM4WO3BFFA&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=xP-E-JQ7-c0Vg44oT8cmSNA7y6J-0y9Y5QWOoO-wl1s&m=vuVR7mKGoZ4MO4HmkmgkKPK1uXC8xRgOTRA8j7qB7v4&s=z1iwL_-CGIK6xQ8ZGlzvj6gkHi92bF6D9FJP_z-SP0o&e=>.
|
Thanks for using and exploring BuildXL, it is much appreciated. Please send any valuable feedback our way so we can keep improving the user experience. You last error looks more like a compilation error rather than being related to the build configuration, are you hitting it before the execution starts? Refer to the documentation for those headers: [1] [2] [3] |
I have an msbuild project that is getting an error when creating a pdb file. How can I fix this? Thanks.
PS D:\Test\Code\src\oss\NtRegistrySupport> bxl /c:config.bc
Microsoft (R) Build Accelerator. Build: 0.1.0-devBuild, Version: [Developer Build]
Copyright (C) Microsoft Corporation. All rights reserved.
[0:04] error DX0064: [Pip07F4EBC59ED32C49, MSBuild.exe (NtRegistrySupport_VS2019 - D:\Test\Code\src\oss\NtRegistrySupport\NtRegistrySupport_VS2019.vcxproj), NtRegistrySupport_VS2019, NtRegistrySupport_VS2019.vcxproj, {}, D:\Test\Code\src\oss\NtRegistrySupport\NtRegistrySupport_VS2019.vcxproj, D:\Test\Code\src\oss\NtRegistrySupport] - failed with exit code 1
NtRegistrySupport.cpp
D:\Test\Code\src\oss\NtRegistrySupport.cpp : fatal error C1041: cannot open program database 'v:\code\win32\Debug\pdb\NtRegistrySupport_d.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS [D:\Test\Code\src\oss\NtRegistrySupport\NtRegistrySupport_VS2019.vcxproj]
[0:04] error DX0500: [Pip07F4EBC59ED32C49, MSBuild.exe (NtRegistrySupport_VS2019 - D:\Test\Code\src\oss\NtRegistrySupport\NtRegistrySupport_VS2019.vcxproj), NtRegistrySupport_VS2019, NtRegistrySupport_VS2019.vcxproj, {}] - Disallowed file accesses were detected (R = read, W = write):
Disallowed file accesses performed by: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29333\bin\HostX86\x86\CL.exe
W v:\code\win32\Debug\pdb\NtRegistrySupport_d.pdb
W = Write
[0:04] 100.00% Processes:[1 done (0 hit), 0 succeeded, 1 failed, 0 skipped, 0 executing, 0 waiting]
[0:04] -- Cache savings: 0.00% of 1 included processes. 0 excluded via filtering.
Build FAILED
Log Directory: D:\Test\Code\src\oss\NtRegistrySupport\Out\Logs
The text was updated successfully, but these errors were encountered: