diff --git a/builders/ubuntu-python-builder.psm1 b/builders/ubuntu-python-builder.psm1 index e7a6eb3c..9b486629 100644 --- a/builders/ubuntu-python-builder.psm1 +++ b/builders/ubuntu-python-builder.psm1 @@ -31,7 +31,7 @@ class UbuntuPythonBuilder : NixPythonBuilder { $pythonBinariesLocation = $this.GetFullPythonToolcacheLocation() ### To build Python with SO, passing relative path W.r.t to the binary location. - $env:LDFLAGS="-Wl,-rpath='`$`$ORIGIN/../lib'" + $env:LIBS = "-Wl,--enable-new-dtags,-rpath='`$`$ORIGIN/../lib'" $configureString = "./configure" $configureString += " --prefix=$pythonBinariesLocation" $configureString += " --enable-shared" @@ -43,7 +43,7 @@ class UbuntuPythonBuilder : NixPythonBuilder { Write-Host "The passed configure options are: " Write-Host $configureString - Write-Host "LDFLAGS: $env:LDFLAGS" + Write-Host "LIBS: $env:LIBS" Execute-Command -Command $configureString } diff --git a/tests/python-tests.ps1 b/tests/python-tests.ps1 index 8acbd9c2..1eb5cb20 100644 --- a/tests/python-tests.ps1 +++ b/tests/python-tests.ps1 @@ -94,7 +94,9 @@ Describe "Tests" { It "Check if shared libraries are linked correctly" { "bash ./sources/psutil-install-test.sh" | Should -ReturnZeroExitCode } + } + if (($Platform -match "ubuntu") -or ($Platform -match "linux")) { It "Relocatable Python" { $semversion = [semver] $Version $pyfilename = "python$($semversion.Major).$($semversion.Minor)"