Skip to content

Commit d401126

Browse files
committed
Apply patch to use libdl.so.2 instead of libdl.so
The idea is borrowed from pythonnet/pythonnet#1425
1 parent b7bb4ae commit d401126

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

recipe/libdl.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/src/runtime/platform/LibraryLoader.cs
2+
+++ b/src/runtime/platform/LibraryLoader.cs
3+
@@ -36,7 +36,7 @@ namespace Python.Runtime.Platform
4+
private static int RTLD_NOW = 0x2;
5+
private static int RTLD_GLOBAL = 0x100;
6+
private static IntPtr RTLD_DEFAULT = IntPtr.Zero;
7+
- private const string NativeDll = "libdl.so";
8+
+ private const string NativeDll = "libdl.so.2";
9+
10+
public IntPtr Load(string dllToLoad)
11+
{

recipe/meta.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ package:
88
source:
99
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
1010
sha256: b7287480a1f6ae4b6fc80d775446d8af00e051ca1646b6cc3d32c5d3a461ede3
11+
patches:
12+
- libdl.patch
1113

1214
build:
1315
number: 2
@@ -30,10 +32,7 @@ requirements:
3032

3133
test:
3234
imports:
33-
- clr # [not linux]
34-
commands:
35-
- export LD_LIBRARY_PATH=${BUILD_PREFIX}/x86_64-conda-linux-gnu/sysroot/usr/lib/ # [linux]
36-
- $PYTHON -c 'import clr' # [linux]
35+
- clr
3736

3837
about:
3938
home: http://pythonnet.github.io

0 commit comments

Comments
 (0)