From 79b82d1ecae38fec9471a40fc7d749394e8a1155 Mon Sep 17 00:00:00 2001 From: Robin Kuzmin Date: Wed, 8 Dec 2021 09:20:12 -0800 Subject: [PATCH 1/8] Installing libomp-7-dev instead of libgomp1 (for native simulator in Debian:buster Docker image). --- images/iqsharp-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/iqsharp-base/Dockerfile b/images/iqsharp-base/Dockerfile index 6618d38585..d13201dd52 100644 --- a/images/iqsharp-base/Dockerfile +++ b/images/iqsharp-base/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && \ # Dependencies for the Quantum Development Kit. # Note that we install them here to minimize the number # of layers. - libgomp1 \ + libomp-7-dev \ # Dependency for QIR libc6 \ # Not strictly needed, but Git is useful for several From b4694fb2ca52bb7f7e45941652544d9a661d638b Mon Sep 17 00:00:00 2001 From: Robin Kuzmin Date: Wed, 8 Dec 2021 12:13:06 -0800 Subject: [PATCH 2/8] Returning libgomp1. --- images/iqsharp-base/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/images/iqsharp-base/Dockerfile b/images/iqsharp-base/Dockerfile index d13201dd52..486aaf0727 100644 --- a/images/iqsharp-base/Dockerfile +++ b/images/iqsharp-base/Dockerfile @@ -20,6 +20,7 @@ RUN apt-get update && \ # Dependencies for the Quantum Development Kit. # Note that we install them here to minimize the number # of layers. + libgomp1 \ libomp-7-dev \ # Dependency for QIR libc6 \ From 4987ddd3a7b5ed588720e420b4cb4a84461c56fe Mon Sep 17 00:00:00 2001 From: Robin Kuzmin Date: Thu, 9 Dec 2021 12:19:05 -0800 Subject: [PATCH 3/8] Removed libgomp1 again. --- images/iqsharp-base/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/images/iqsharp-base/Dockerfile b/images/iqsharp-base/Dockerfile index 486aaf0727..d13201dd52 100644 --- a/images/iqsharp-base/Dockerfile +++ b/images/iqsharp-base/Dockerfile @@ -20,7 +20,6 @@ RUN apt-get update && \ # Dependencies for the Quantum Development Kit. # Note that we install them here to minimize the number # of layers. - libgomp1 \ libomp-7-dev \ # Dependency for QIR libc6 \ From 5d182319af0b4561f9ecd3bb9a954ce847f6c4d3 Mon Sep 17 00:00:00 2001 From: Robin Kuzmin Date: Fri, 10 Dec 2021 10:16:32 -0800 Subject: [PATCH 4/8] CR chages: Relpaced `libomp-7-dev` with `libomp5-7`. --- images/iqsharp-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/iqsharp-base/Dockerfile b/images/iqsharp-base/Dockerfile index d13201dd52..2497d5390a 100644 --- a/images/iqsharp-base/Dockerfile +++ b/images/iqsharp-base/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && \ # Dependencies for the Quantum Development Kit. # Note that we install them here to minimize the number # of layers. - libomp-7-dev \ + libomp5-7 \ # Dependency for QIR libc6 \ # Not strictly needed, but Git is useful for several From 1fc9c24e3eb2a30c014d3df2a11c6a6f2dc60e7a Mon Sep 17 00:00:00 2001 From: Chris Granade Date: Fri, 17 Dec 2021 21:52:49 +0000 Subject: [PATCH 5/8] Copy into $PREFIX/lib. --- conda-recipes/iqsharp/build.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conda-recipes/iqsharp/build.ps1 b/conda-recipes/iqsharp/build.ps1 index 7ef498bda0..bf0ca92744 100644 --- a/conda-recipes/iqsharp/build.ps1 +++ b/conda-recipes/iqsharp/build.ps1 @@ -54,3 +54,14 @@ Push-Location $TargetDirectory Write-Host "$ $InstallCmd"; Invoke-Expression $InstallCmd; Pop-Location + +Write-Host "## Installing OpenMP support into library path. ##" +if ($IsLinux) { + Copy-Item -Verboese ` + (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "libomp.so.*") ` + (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-linux-gnu") +} elseif ($IsMacOS) { + Copy-Item -Verboese ` + (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "libomp.dylib") ` + (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-darwin-macho") +} \ No newline at end of file From d96626198794a03f7a2c9af8c6011b2111010c93 Mon Sep 17 00:00:00 2001 From: Robin Kuzmin <9372582+kuzminrobin@users.noreply.github.com> Date: Fri, 17 Dec 2021 14:01:16 -0800 Subject: [PATCH 6/8] Minor fix. --- conda-recipes/iqsharp/build.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda-recipes/iqsharp/build.ps1 b/conda-recipes/iqsharp/build.ps1 index bf0ca92744..568dddce0e 100644 --- a/conda-recipes/iqsharp/build.ps1 +++ b/conda-recipes/iqsharp/build.ps1 @@ -57,11 +57,11 @@ Pop-Location Write-Host "## Installing OpenMP support into library path. ##" if ($IsLinux) { - Copy-Item -Verboese ` + Copy-Item -Verbose ` (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "libomp.so.*") ` (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-linux-gnu") } elseif ($IsMacOS) { - Copy-Item -Verboese ` + Copy-Item -Verbose ` (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "libomp.dylib") ` (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-darwin-macho") -} \ No newline at end of file +} From bf760dce178954c38f241b602938c849aa9fdfb8 Mon Sep 17 00:00:00 2001 From: Robin Kuzmin <9372582+kuzminrobin@users.noreply.github.com> Date: Fri, 17 Dec 2021 14:12:46 -0800 Subject: [PATCH 7/8] Build fix. --- conda-recipes/iqsharp/build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conda-recipes/iqsharp/build.ps1 b/conda-recipes/iqsharp/build.ps1 index 568dddce0e..9903235aed 100644 --- a/conda-recipes/iqsharp/build.ps1 +++ b/conda-recipes/iqsharp/build.ps1 @@ -58,10 +58,10 @@ Pop-Location Write-Host "## Installing OpenMP support into library path. ##" if ($IsLinux) { Copy-Item -Verbose ` - (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "libomp.so.*") ` + (Join-Path (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "native") "libomp.so.*") ` (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-linux-gnu") } elseif ($IsMacOS) { Copy-Item -Verbose ` - (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "libomp.dylib") ` + (Join-Path (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "native") "libomp.dylib") ` (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-darwin-macho") } From 602a8266ca6e4921e5ba889a448a554b8fbc0b00 Mon Sep 17 00:00:00 2001 From: Robin Kuzmin <9372582+kuzminrobin@users.noreply.github.com> Date: Fri, 17 Dec 2021 18:24:10 -0800 Subject: [PATCH 8/8] Build fix. --- conda-recipes/iqsharp/build.ps1 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/conda-recipes/iqsharp/build.ps1 b/conda-recipes/iqsharp/build.ps1 index 9903235aed..f4d4d71bea 100644 --- a/conda-recipes/iqsharp/build.ps1 +++ b/conda-recipes/iqsharp/build.ps1 @@ -57,11 +57,13 @@ Pop-Location Write-Host "## Installing OpenMP support into library path. ##" if ($IsLinux) { - Copy-Item -Verbose ` - (Join-Path (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "native") "libomp.so.*") ` - (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-linux-gnu") + $SourceFilesPath = (Join-Path (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "native") "libomp.so.*") + $DstDirPath = (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-linux-gnu") } elseif ($IsMacOS) { - Copy-Item -Verbose ` - (Join-Path (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "native") "libomp.dylib") ` - (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-darwin-macho") + $SourceFilesPath = (Join-Path (Join-Path (Join-Path (Join-Path $TargetDirectory "runtimes") $RuntimeID) "native") "libomp.dylib") + $DstDirPath = (Join-Path (Join-Path $Env:PREFIX "lib") "x86_64-darwin-macho") } +if (-not (Test-Path $DstDirPath)) { + New-Item -Path $DstDirPath -ItemType "directory" +} +Copy-Item -Verbose $SourceFilesPath $DstDirPath