The dir examples/QIR/Development build fails like this:
BuildExecutable:
Copying file from "/home/vsts/.nuget/packages/microsoft.quantum.simulators/0.27.236950/runtimes/linux-x64/native/libMicrosoft.Quantum.Simulator.Runtime.so" to "/home/vsts/work/1/s/examples/QIR/Development/build/libMicrosoft.Quantum.Simulator.Runtime.so".
clang --version
Ubuntu clang version 11.0.0-2~ubuntu20.04.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang -std=c++17 -Wno-override-module -fseh-exceptions -lstdc++ -o /home/vsts/work/1/s/examples/QIR/Development/build/Development /home/vsts/work/1/s/examples/QIR/Development/qir/Development.ll /home/vsts/work/1/s/examples/QIR/Development/build/Main.cpp -I/home/vsts/work/1/s/examples/QIR/Development/build -L/home/vsts/work/1/s/examples/QIR/Development/build -lMicrosoft.Quantum.Qir.Runtime -lMicrosoft.Quantum.Qir.QSharp.Core -lMicrosoft.Quantum.Qir.QSharp.Foundation
/home/vsts/work/1/s/examples/QIR/Development/build/Main.cpp:1:10: fatal error: 'QirContext.hpp' file not found
#include "QirContext.hpp"
^~~~~~~~~~~~~~~~
1 error generated.
2>/home/vsts/work/1/s/examples/QIR/Development/Development.csproj(139,5): error MSB3073: The command "clang -std=c++17 -Wno-override-module -fseh-exceptions -lstdc++ -o /home/vsts/work/1/s/examples/QIR/Development/build/Development /home/vsts/work/1/s/examples/QIR/Development/qir/Development.ll /home/vsts/work/1/s/examples/QIR/Development/build/Main.cpp -I/home/vsts/work/1/s/examples/QIR/Development/build -L/home/vsts/work/1/s/examples/QIR/Development/build -lMicrosoft.Quantum.Qir.Runtime -lMicrosoft.Quantum.Qir.QSharp.Core -lMicrosoft.Quantum.Qir.QSharp.Foundation" exited with code 1.
2>Done Building Project "/home/vsts/work/1/s/examples/QIR/Development/Development.csproj" (default targets) -- FAILED.
1>Done Building Project "/home/vsts/work/1/s/examples/QIR/QIR.sln" (default targets) -- FAILED.
upon update to a newer QDK ver like this in examples/QIR/Development/Development.csproj.
The update is needed in Q# compiler for generating build/Main.cpp.
Also pay attention that clang version 11.0.0 is used on Linux instead of 14 or newer.
If the examples/QIR/Development/Development.csproj is kept at the older QDK version (0.25.228311) then we get a version conflict between different .csproj projects of examples\QIR\QIR.sln like this (see extract below). The whole QIR.sln has to stay at an older QDK version:
1>/home/vsts/work/1/s/examples/QIR/Development/Development.csproj : error NU1605: Detected package downgrade: Microsoft.Quantum.Simulators from 0.27.236950 to 0.25.228311. Reference the package directly from the project to select a different version. [/home/vsts/work/1/s/examples/QIR/QIR.sln]
/home/vsts/work/1/s/examples/QIR/Development/Development.csproj : error NU1605: Development -> Microsoft.Quantum.QSharp.Core 0.27.236950 -> Microsoft.Quantum.Simulators (>= 0.27.236950) [/home/vsts/work/1/s/examples/QIR/QIR.sln]
/home/vsts/work/1/s/examples/QIR/Development/Development.csproj : error NU1605: Development -> Microsoft.Quantum.Simulators (>= 0.25.228311) [/home/vsts/work/1/s/examples/QIR/QIR.sln]
1>/home/vsts/work/1/s/examples/QIR/Development/Development.csproj : error NU1605: Detected package downgrade: Microsoft.Quantum.Simulators from 0.27.236950 to 0.25.228311. Reference the package directly from the project to select a different version. [/home/vsts/work/1/s/examples/QIR/QIR.sln]
/home/vsts/work/1/s/examples/QIR/Development/Development.csproj : error NU1605: Development -> Microsoft.Quantum.Standard 0.27.236950 -> Microsoft.Quantum.Simulators (>= 0.27.236950) [/home/vsts/work/1/s/examples/QIR/QIR.sln]
/home/vsts/work/1/s/examples/QIR/Development/Development.csproj : error NU1605: Development -> Microsoft.Quantum.Simulators (>= 0.25.228311) [/home/vsts/work/1/s/examples/QIR/QIR.sln]
Generating MSBuild file /home/vsts/work/1/s/examples/QIR/Development/obj/Development.csproj.nuget.g.props.
Generating MSBuild file /home/vsts/work/1/s/examples/QIR/Development/obj/Development.csproj.nuget.g.targets.
Writing assets file to disk. Path: /home/vsts/work/1/s/examples/QIR/Development/obj/project.assets.json
Failed to restore /home/vsts/work/1/s/examples/QIR/Development/Development.csproj (in 1.27 sec).
NuGet Config files used:
/home/vsts/work/1/s/NuGet.config
/home/vsts/.nuget/NuGet/NuGet.Config
Feeds used:
https://pkgs.dev.azure.com/ms-quantum-public/Microsoft Quantum (public)/_packaging/alpha/nuget/v3/index.json
https://api.nuget.org/v3/index.json
/opt/hostedtoolcache/dotnet/sdk/6.0.302/FSharp/library-packs
Installed:
2 package(s) to /home/vsts/work/1/s/examples/QIR/Emission/Emission.csproj
5 package(s) to /home/vsts/work/1/s/examples/QIR/Development/Development.csproj
13 of 15 projects are up-to-date for restore.
1>Done Building Project "/home/vsts/work/1/s/examples/QIR/QIR.sln" (Restore target(s)) -- FAILED.
The dir
examples/QIR/Development
build fails like this:upon update to a newer QDK ver like this in
examples/QIR/Development/Development.csproj
.The update is needed in Q# compiler for generating
build/Main.cpp
.Also pay attention that clang version 11.0.0 is used on Linux instead of 14 or newer.
If the
examples/QIR/Development/Development.csproj
is kept at the older QDK version (0.25.228311) then we get a version conflict between different .csproj projects ofexamples\QIR\QIR.sln
like this (see extract below). The wholeQIR.sln
has to stay at an older QDK version: