Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

7.4.0 Linux native shared libraries in module not loaded using the RID directory #20740

Copy link
Copy link
@rhubarb-geek-nz

Description

@rhubarb-geek-nz
Issue body actions

Prerequisites

Steps to reproduce

I have powershell module that uses native shared libraries packaged in the module.

/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/System.Data.SQLite.dll
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/osx-x64/SQLite.Interop.dll.dylib
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/linux-arm/SQLite.Interop.dll.so
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/linux-x64/SQLite.Interop.dll.so
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/linux-arm64/SQLite.Interop.dll.so
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/win-x86/SQLite.Interop.dll.dll
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/osx-arm64/SQLite.Interop.dll.dylib
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/win-arm/SQLite.Interop.dll.dll
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/win-arm64/SQLite.Interop.dll.dll
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/SQLiteConnection.dll
/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/win-x64/SQLite.Interop.dll.dll

7.3.10 finds and loads these shared libraries.

7.4.0 does not look for them on Linux under the RID directory

Expected behavior

3463:     file=/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/SQLite.Interop.dll.so [0];  dynamically loaded by /opt/microsoft/powershell/7/libcoreclr.so [0]
      3463:     file=/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/libSQLite.Interop.dll.so [0];  dynamically loaded by /opt/microsoft/powershell/7/libcoreclr.so [0]
      3463:     opening file=/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/linux-x64/SQLite.Interop.dll.so [0]; direct_opencount=25
      3463:     symbol=sqlite3_set_authorizer;  lookup in file=/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/linux-x64/SQLite.Interop.dll.so [0]
      3463:     binding file /home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/linux-x64/SQLite.Interop.dll.so [0] to /home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/linux-x64/SQLite.Interop.dll.so [0]: normal symbol `sqlite3_set_authorizer'

Actual behavior

3223:     file=/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/SQLite.Interop.dll.so [0];  dynamically loaded by /opt/microsoft/powershell/7/libcoreclr.so [0]
      3223:     file=/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/libSQLite.Interop.dll.so [0];  dynamically loaded by /opt/microsoft/powershell/7/libcoreclr.so [0]
      3223:     file=/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/SQLite.Interop.dll.so [0];  dynamically loaded by /opt/microsoft/powershell/7/libcoreclr.so [0]
      3223:     file=/home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/libSQLite.Interop.dll.so [0];  dynamically loaded by /opt/microsoft/powershell/7/libcoreclr.so [0]
     | /home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/SQLite.Interop.dll.so: cannot open shared object file: No such file or directory
     | /home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/libSQLite.Interop.dll.so: cannot open shared object file: No such file or directory

Error details

     | Unable to load shared library 'SQLite.Interop.dll' or one of its dependencies. In order to help diagnose loading
     | problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment
     | variable:  /opt/microsoft/powershell/7/SQLite.Interop.dll.so: cannot open shared object file: No such file or
     | directory
     | /home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/SQLite.Interop.dll.so:
     | cannot open shared object file: No such file or directory /opt/microsoft/powershell/7/libSQLite.Interop.dll.so:
     | cannot open shared object file: No such file or directory
     | /home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/libSQLite.Interop.dll.so: cannot open shared object file: No such file or directory /opt/microsoft/powershell/7/SQLite.Interop.dll: cannot open shared object file: No such file or directory /home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/SQLite.Interop.dll: cannot open shared object file: No such file or directory /opt/microsoft/powershell/7/libSQLite.Interop.dll: cannot open shared object file: No such file or directory /home/bythesea/.local/share/powershell/Modules/rhubarb-geek-nz.SQLiteConnection/1.0.118.0/libSQLite.Interop.dll: cannot open shared object file: No such file or directory

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Ubuntu 22.04.3 LTS
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

Important detail -

Running the test.ps1 from within a PowerShell 7.4.0 session works, but running "test.ps1" directly from a bash shell (using the shebang) doesn't.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    7.4-regressionRegression in 7.4Regression in 7.4In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.