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

Cannot build runtime repo on Windows with ninja #45763

Closed
vitek-karas opened this issue Dec 8, 2020 · 13 comments · Fixed by #47344
Closed

Cannot build runtime repo on Windows with ninja #45763

vitek-karas opened this issue Dec 8, 2020 · 13 comments · Fixed by #47344

Comments

@vitek-karas
Copy link
Member

Clean clone of the runtime repo, Windows 10, latest VS dogfood, running build.cmd -ninja from root:

cl : Command line error D8016 : '/std:c++latest' and '/std:c11' command-line options are incompatible
cl : Command line warning D9025 : overriding '/TP' with '/TC'

while building src/coreclr/pal/src/libunwind

@jkotas
Copy link
Member

jkotas commented Dec 8, 2020

cc @jkoritzinsky

@tommcdon tommcdon added this to the 6.0.0 milestone Dec 9, 2020
@tommcdon
Copy link
Member

tommcdon commented Dec 9, 2020

@agocke @trylek this affects the dev inner loop

@trylek
Copy link
Member

trylek commented Dec 9, 2020

If this is due to some recent changes in the C++ compiler installed with the new VS, @janvorli may need to take a look to figure out the proper way to adjust the cmake files to be backward-compatible.

@agocke
Copy link
Member

agocke commented Dec 10, 2020

Reading the docs here, can we just disable stdc for libunwind? Since it specifies C++latest I assume it doesn't care about the C compatibility version

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Dec 10, 2020
@agocke
Copy link
Member

agocke commented Dec 10, 2020

Well that seemed to work, but it looks like there's something wrong with the DAC: I get the error The application to execute does not exist: 'C:/Users/andy/Code/runtime/artifacts/bin/coreclr/Linux.x64.Debug/DacTableGen/DacTableGen.dll'

It looks like it's trying to consume a Linux DAC even though this is building on Windows. Do we build a cross dac by default?

@tommcdon
Copy link
Member

tommcdon commented Dec 10, 2020

It looks like it's trying to consume a Linux DAC even though this is building on Windows. Do we build a cross dac by default?

Adding @sdmaclea

@sdmaclea
Copy link
Contributor

Yes this looks like it is due to building the linux cross dac for Windows. I'll take a look.

@sdmaclea sdmaclea changed the title Building runtime repo with -ninja on Windows fails with D8016 and D9025 Building runtime repo with latest VS dogfood on Windows fails with D8016 and D9025 Dec 10, 2020
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 14, 2020
@vitek-karas
Copy link
Member Author

This is still not fully fixed for me - on latest master it fails with:

     'C:/ProgramData/chocolatey/bin/ninja.exe' '-C' 'F:/dotnet/runtime2/artifacts/obj/native/net6.0-windows-Debug-x64' '-t' 'cleandead'

    failed with:

ninja : error : build.ninja:945: multiple rules generate System.IO.Compression.Native/System.IO.Compression.Native.lib [-w dupbuild=err] [F:\dotnet\runtime2\src\libraries\Native\build-native.proj]

@jkoritzinsky
Copy link
Member

cc: @VSadov since he most recently changed how we build System.IO.Compression.Native

@VSadov
Copy link
Member

VSadov commented Dec 16, 2020

The library was renamed on windows. It used to be clrcompression and now it is System.IO.Compression.Native - same as on Unix. That was basically the change.
I wonder if this could be related to the rename somehow?

@agocke agocke changed the title Building runtime repo with latest VS dogfood on Windows fails with D8016 and D9025 Cannot build runtime repo on Windows with ninja Dec 16, 2020
@akoeplinger
Copy link
Member

The System.IO.Compression.Native.lib issue was apparently fixed by 5761dd4

@vitek-karas
Copy link
Member Author

Now fails with a different error:

 -- Build files have been written to: F:/dotnet/runtime2/artifacts/obj/native/net6.0-windows-Debug-x64
  [1/94] Building C object System.IO.Compression.Native\CMakeFiles\System.IO.Compression.Native.dir\F_\dotnet\runtime2\src\libraries\Native\AnyOS\brotli\common\context.c.obj
cl : Command line error D9025: overriding '/W0' with '/W3' [F:\dotnet\runtime2\src\libraries\Native\build-native.proj]
cl : Command line error D9025: overriding '/MDd' with '/MTd' [F:\dotnet\runtime2\src\libraries\Native\build-native.proj]

@akoeplinger
Copy link
Member

Yeah I see the same here.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 22, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 26, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
9 participants