X Tutup
The Wayback Machine - https://web.archive.org/web/20230329061736/https://github.com/PowerShell/PowerShell/issues/19419
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

Powershell from-source build misses "ref" directory #19419

Open
5 tasks done
xgqt opened this issue Mar 28, 2023 · 1 comment
Open
5 tasks done

Powershell from-source build misses "ref" directory #19419

xgqt opened this issue Mar 28, 2023 · 1 comment
Labels
Area-Maintainers-Build specific to affecting the build Needs-Triage The issue is new and needs to be triaged by a work group.

Comments

@xgqt
Copy link

xgqt commented Mar 28, 2023

Prerequisites

Steps to reproduce

Looks like some packages have to have the ref directory in the powershell home
($PSHOME is set to /usr/share/pwsh-7.3).

Here is an example of importing PowerShellGet, this complains about missfing ref.

2023 03 28_23:44:15

Here importing PSDesiredStateConfiguration fails completely:

2023 03 28_23:45:45

Also the Alpine package seems to have similar PSHOME contents, no ref directory, see: https://pkgs.alpinelinux.org/contents?repo=community&page=1&arch=x86_64&branch=edge&name=powershell

Expected behavior

Powershell build scripts copy or link to the location of required assemblies,
and so using those modules work.
Or use current runtime assemblies when the package is not "self-contained".

Actual behavior

While attempting to import PSDesiredStateConfiguration it fails to import fully, see below error.

Error details

While importing PSDesiredStateConfiguration:

Add-Type: Could not find a part of the path '/usr/share/pwsh-7.3/ref'.
Import-Module: The specified module
'/home/xy/.local/share/powershell/Modules/PSDesiredStateConfiguration/2.0.6/helpers/DscResourceInfo.psm1' was not
loaded because no valid module file was found in any module directory.

Environment data

PSVersionTable:

Name                           Value
----                           -----
PSVersion                      7.3.3
PSEdition                      Core
GitCommitId                    7.3.3
OS                             Linux 6.1.12-gentoo-magentalane-2023.02.21 #5 SMP PREEMPT_DYNAMIC Mon Feb 20 23:50:…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

And the runtime:

.NET SDK:
 Version:   7.0.201
 Commit:    68f2d7e7a3

Środowisko uruchomieniowe:
 OS Name:     gentoo
 OS Version:  2.13
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /opt/dotnet-sdk-bin-7.0/sdk/7.0.201/

Host:
  Version:      7.0.3
  Architecture: x64
  Commit:       0a2bda10e8

.NET SDKs installed:
  7.0.201 [/opt/dotnet-sdk-bin-7.0/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.3 [/opt/dotnet-sdk-bin-7.0/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.3 [/opt/dotnet-sdk-bin-7.0/shared/Microsoft.NETCore.App]

@xgqt xgqt added the Needs-Triage The issue is new and needs to be triaged by a work group. label Mar 28, 2023
@xgqt
Copy link
Author

xgqt commented Mar 28, 2023

The modules listed above are imported correctly if I link .NET SDK's Microsoft.NETCore.App to the ref dir ln -fs /opt/dotnet-sdk-bin-7.0/shared/Microsoft.NETCore.App/7.0.3 /usr/share/pwsh-7.3/ref

@iSazonov iSazonov added the Area-Maintainers-Build specific to affecting the build label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Maintainers-Build specific to affecting the build Needs-Triage The issue is new and needs to be triaged by a work group.
Projects
None yet
Development

No branches or pull requests

2 participants
X Tutup