Building packages from source crashes with `unimplemented function KERNEL32.dll.CopyFile2` in pywine:3.12
Closed this issue · 7 comments
Hi,
Thank you for your work.
I have run into a problem and i am unsure how to resolve it. My project depends on pysftp and i am installing pysftp with wine64 pip install pysftp (normaly it comes via requirements of my own package, but thats besides the point). When i execute this in pywine:3.10 and pywine:3.11 it is installed without any problems. in pywine:3.12 it throws errors, see next section. Is this a problem of pysftp, is it a problem with wine or am i doing something wrong?
Log
root@bob:/host# wine64 pip install pysftp
Collecting pysftp
Downloading pysftp-0.2.9.tar.gz (25 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... -wine: Call from 00006FFFFFC8F008 to unimplemented function KERNEL32.dll.CopyFile2, aborting
wine: Unimplemented function KERNEL32.dll.CopyFile2 called at address 00006FFFFFC8F008 (thread 0158), starting debugger...
|wine: Call from 00006FFFFFC8F008 to unimplemented function KERNEL32.dll.CopyFile2, aborting
error
error: subprocess-exited-with-error? Preparing metadata (pyproject.toml) did not run successfully.
? exit code: 2147483904
??> [226 lines of output]
running dist_info
creating C:\users\root\Temp\pip-modern-metadata-f_7h1i36\pysftp.egg-info
writing C:\users\root\Temp\pip-modern-metadata-f_7h1i36\pysftp.egg-info\PKG-INFO
writing dependency_links to C:\users\root\Temp\pip-modern-metadata-f_7h1i36\pysftp.egg-info\dependency_links.txt
writing requirements to C:\users\root\Temp\pip-modern-metadata-f_7h1i36\pysftp.egg-info\requires.txt
writing top-level names to C:\users\root\Temp\pip-modern-metadata-f_7h1i36\pysftp.egg-info\top_level.txt
writing manifest file 'C:\users\root\Temp\pip-modern-metadata-f_7h1i36\pysftp.egg-info\SOURCES.txt'
reading manifest file 'C:\users\root\Temp\pip-modern-metadata-f_7h1i36\pysftp.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs_build'
adding license file 'LICENSE.txt'
writing manifest file 'C:\users\root\Temp\pip-modern-metadata-f_7h1i36\pysftp.egg-info\SOURCES.txt'
creating 'C:\users\root\Temp\pip-modern-metadata-f_7h1i36\pysftp-0.2.9.dist-info'
Unhandled exception: unimplemented function KERNEL32.dll.CopyFile2 called in 64-bit code (0x006fffffc8f008).
Register dump:
rip:00006fffffc8f008 rsp:00007ffffe2ee640 rbp:00007ffffe2ee7e0 eflags:00000202 ( - -- I - - - )
rax:0000000180000100 rbx:00007ffffe2ee660 rcx:00007ffffe2ee660 rdx:00006ffffc7603ce
rsi:00007f40dc1d9420 rdi:00007f40dc204630 r8:00006ffffc4a4e81 r9:00007ffffe2ee720 r10:0000000000000008
r11:00007ffffe2ee708 r12:00007ffffec00c00 r13:00007ffffec21a80 r14:0000000000000000 r15:00007ffffec00c00
Stack dump:
0x007ffffe2ee640: 00007ffffe2ee660 00006ffffc89e890
0x007ffffe2ee650: 0000000000000001 00006ffffc8fbfb0
0x007ffffe2ee660: 0000000180000100 0000000000000000
0x007ffffe2ee670: 00006fffffc8f008 00007fff00000002
0x007ffffe2ee680: 00006ffffc760690 00006ffffc7603ce
0x007ffffe2ee690: 00006ffffc8fbfb0 0000000000000002
0x007ffffe2ee6a0: 00006ffffc89eb20 00006ffffc27e776
0x007ffffe2ee6b0: 000039d4b8752d91 0000000000000000
0x007ffffe2ee6c0: 00007ffffec21a80 00007ffffec00c00
0x007ffffe2ee6d0: 0000000000000000 00006ffffc27e710
0x007ffffe2ee6e0: 00006ffffc8fbfb0 00007ffffe2ee7e0
0x007ffffe2ee6f0: 00007f40dc1d9420 00007f40dc204630
Backtrace:
=>0 0x006fffffc8f008 stub_entry_point+0x48(dll=, name=, ret_addr=) [/usr/src/packages/BUILD/dlls/ntdll/loader.c:356] in ntdll (0x007ffffe2ee7e0)
1 0x006ffffc4a4e81 in python312 (+0x244e81) (0x007ffffe2ee7e0)
2 0x006ffffc4a4dda in python312 (+0x244dda) (0x007ffffe2ee7e0)
3 0x006ffffc27874e in python312 (+0x1874e) (0x00000000000003)
4 0x006ffffc29ac76 in python312 (+0x3ac76) (0x007ffffe2eeab0)
5 0x006ffffc29abc5 in python312 (+0x3abc5) (0x007ffffe2eeab0)
6 0x006ffffc29ca97 in python312 (+0x3ca97) (0x007ffffe2eeab0)
7 0x006ffffc31e86e in python312 (+0xbe86e) (0x006ffffc7ca600)
8 0x006ffffc31e1c6 in python312 (+0xbe1c6) (0x007ffffe2eedb0)
9 0x006ffffc31e175 in python312 (+0xbe175) (0x007ffffe2eedb0)
10 0x006ffffc29d811 in python312 (+0x3d811) (0x007ffffe2eedb0)
11 0x006ffffc2cb38a in python312 (+0x6b38a) (0x006ffffc8fbfb0)
12 0x006ffffc2cd08a in python312 (+0x6d08a) (0x007ffffe318ad8)
13 0x006ffffc36cff8 in python312 (+0x10cff8) (0x007ffffe2ef180)
14 0x006ffffc2a1f3e in python312 (+0x41f3e) (0x007ffffe2ef180)
15 0x006ffffc2b4a22 in python312 (+0x54a22) (0x006ffffc8fbfb0)
16 0x006ffffc2b4081 in python312 (+0x54081) (0x006ffffc8fbfb0)
17 0x006ffffc2b218c in python312 (+0x5218c) (0x007f40dcfa8cc0)
18 0x006ffffc2b2100 in python312 (+0x52100) (0x007f40dcfa8cc0)
19 0x006ffffc2b0cdf in python312 (+0x50cdf) (0x007f40dcfa8cc0)
20 0x006ffffc2b3206 in python312 (+0x53206) (0x007fffff5c6620)
21 0x006ffffc2b2fd0 in python312 (+0x52fd0) (0x007f40dcfa8cc0)
22 0x006ffffc27874e in python312 (+0x1874e) (0x00000000000002)
23 0x006ffffc29ac76 in python312 (+0x3ac76) (0x007ffffe2ef870)
24 0x006ffffc29abc5 in python312 (+0x3abc5) (0x007ffffe2ef870)
25 0x006ffffc29ca97 in python312 (+0x3ca97) (0x007ffffe2ef870)
26 0x006ffffc2b4a22 in python312 (+0x54a22) (0x006ffffc8fbfb0)
27 0x006ffffc2b4081 in python312 (+0x54081) (0x006ffffc8fbfb0)
28 0x006ffffc2b218c in python312 (+0x5218c) (0x007ffffeafbec0)
29 0x006ffffc2b2100 in python312 (+0x52100) (0x007ffffeafbec0)
30 0x006ffffc373e90 in python312 (+0x113e90) (0x006ffffebe22b0)
31 0x006ffffc373c1a in python312 (+0x113c1a) (0x007ffffeafbec0)
32 0x006ffffc373270 in python312 (+0x113270) (0x007ffffe2efd08)
33 0x006ffffc3730ae in python312 (+0x1130ae) (0000000000000000)
34 0x006ffffc372f8b in python312 (+0x112f8b) (0xffffffffffffffff)
35 0x006ffffc30876e in python312 (+0xa876e) (0x006ffffc89e720)
36 0x006ffffc308405 in python312 (+0xa8405) (0000000000000000)
37 0x006ffffc264845 in python312 (+0x4845) (0000000000000000)
38 0x00000140001230 in python (+0x1230) (0000000000000000)
39 0x006fffffac8a69 BaseThreadInitThunk+0x9(unknown=, entry=, arg=) [/usr/src/packages/BUILD/dlls/kernel32/thread.c:61] in kernel32 (0000000000000000)
40 0x006fffffcbd485 __wine_pop_frame(entry=00000001400012A0, arg=000000007FFD0000) [/usr/src/packages/BUILD/include/wine/exception.h:277] in ntdll (0000000000000000)
41 0x006fffffcbd485 RtlUserThreadStart+0x85(entry=[, arg=[) [/usr/src/packages/BUILD/dlls/ntdll/thread.c:294] in ntdl
l (0000000000000000)
0x006fffffc8f008 stub_entry_point+0x48 [/usr/src/packages/BUILD/dlls/ntdll/loader.c:356] in ntdll: jmp 0x00006fffffc8f000 stub_entry_point+0x40 [/usr/src/packages/BUILD/dlls/ntdll/loader.c:356] in ntdll
Unable to access file '/usr/src/packages/BUILD/dlls/ntdll/loader.c'
Modules:
Module Address Debug info Name (82 modules)
PE 000000007ba70000-000000007bffd000 Deferred opengl32
PE 0000000140000000-000000014001a000 Export python
PE 0000000180000000-000000018000f000 Deferred python3
PE 00006ffff8360000-00006ffff836b000 Deferred libffi-8
PE 00006ffff8370000-00006ffff8390000 Deferred _ctypes.pyd
PE 00006ffff8390000-00006ffff84a7000 Deferred unicodedata.pyd
PE 00006ffff84b0000-00006ffff84be000 Deferred _overlapped.pyd
PE 00006ffff84c0000-00006ffff84d2000 Deferred _asyncio.pyd
PE 00006ffff84e0000-00006ffff85a3000 Deferred libssl-3
PE 00006ffff85b0000-00006ffff8972000 Deferred crypt32
PE 00006ffff8980000-00006ffff89ad000 Deferred _ssl.pyd
PE 00006ffff89f0000-00006ffff8f51000 Deferred comctl32
PE 00006ffff8f60000-00006ffff8f92000 Deferred compstui
PE 00006ffff8fa0000-00006ffff9069000 Deferred winspool
PE 00006ffff9070000-00006ffffa5db000 Deferred wined3d
PE 00006ffffa5e0000-00006ffffa72b000 Deferred dxgi
PE 00006ffffa730000-00006ffffa89c000 Deferred wbemprox
PE 00006ffffae50000-00006ffffaf18000 Deferred uxtheme
PE 00006ffffaf20000-00006ffffaf29000 Deferred _queue.pyd
PE 00006ffffaf30000-00006ffffaf39000 Deferred select.pyd
PE 00006ffffaf40000-00006ffffaf56000 Deferred _socket.pyd
PE 00006ffffaf60000-00006ffffb455000 Deferred oleaut32
PE 00006ffffb460000-00006ffffb5f7000 Deferred combase
PE 00006ffffb600000-00006ffffbbb3000 Deferred ole32
PE 00006ffffbbc0000-00006ffffbc38000 Deferred propsys
PE 00006ffffbc40000-00006ffffbc4a000 Deferred _wmi.pyd
PE 00006ffffbc50000-00006ffffc141000 Deferred libcrypto-3
PE 00006ffffc150000-00006ffffc161000 Deferred _hashlib.pyd
PE 00006ffffc170000-00006ffffc199000 Deferred _lzma.pyd
PE 00006ffffc1a0000-00006ffffc1b5000 Deferred _bz2.pyd
PE 00006ffffc1c0000-00006ffffc1d9000 Deferred vcruntime140
PE 00006ffffc1e0000-00006ffffc237000 Deferred bcrypt
PE 00006ffffc240000-00006ffffc260000 Deferred version
PE 00006ffffc260000-00006ffffc914000 Export python312
PE 00006ffffd830000-00006ffffd855000 Deferred nsi
PE 00006ffffd860000-00006ffffd8ad000 Deferred dnsapi
PE 00006ffffd8b0000-00006ffffd93e000 Deferred iphlpapi
PE 00006ffffd9c0000-00006ffffda3e000 Deferred imm32
PE 00006ffffda40000-00006ffffda7c000 Deferred win32u
PE 00006ffffda80000-00006ffffdd42000 Deferred gdi32
PE 00006ffffdd50000-00006ffffe32d000 Deferred user32
PE 00006ffffe610000-00006ffffe7e5000 Deferred setupapi
PE 00006ffffe7f0000-00006ffffea7a000 Deferred rpcrt4
PE 00006ffffea80000-00006ffffeb2d000 Deferred ws2_32
PE 00006ffffeb30000-00006ffffef1d000 Deferred ucrtbase
PE 00006ffffef20000-00006ffffefe9000 Deferred sechost
PE 00006ffffeff0000-00006fffff343000 Deferred msvcrt
PE 00006fffff350000-00006fffff47d000 Deferred advapi32
PE 00006fffff480000-00006fffffa91000 Deferred kernelbase
PE 00006fffffaa0000-00006fffffc58000 Dwarf-4 kernel32
PE 00006fffffc60000-00006fffffffa000 Dwarf-4 ntdll
ELF 00007f40dc44c000-00007f40dc46c000 Deferred libgcc_s.so.1
ELF 00007f40dc46c000-00007f40dc59c000 Deferred opengl32.so
ELF 00007f40dcff8000-00007f40dcffe000 Deferred crypt32.so
ELF 00007f40dcffe000-00007f40dd029000 Deferred libexpat.so.1
ELF 00007f40dd029000-00007f40dd074000 Deferred libfontconfig.so.1
ELF 00007f40dd074000-00007f40dd097000 Deferred libbrotlicommon.so.1
ELF 00007f40dd097000-00007f40dd0a4000 Deferred libbrotlidec.so.1
ELF 00007f40dd0a4000-00007f40dd0da000 Deferred libpng16.so.16
ELF 00007f40dd0da000-00007f40dd0f9000 Deferred libz.so.1
ELF 00007f40dd0f9000-00007f40dd1c4000 Deferred libfreetype.so.6
ELF 00007f40dd1c4000-00007f40dd2a3000 Deferred libm.so.6
ELF 00007f40dd2a3000-00007f40dd440000 Deferred win32u.so
ELF 00007f40dd440000-00007f40dd44c000 Deferred libffi.so.8
ELF 00007f40dd44c000-00007f40dd4cd000 Deferred libgmp.so.10
ELF 00007f40dd4cd000-00007f40dd516000 Deferred libhogweed.so.6
ELF 00007f40dd516000-00007f40dd6cc000 Deferred libunistring.so.2
ELF 00007f40dd6cc000-00007f40dd800000 Deferred libp11-kit.so.0
ELF 00007f40dd800000-00007f40dda1c000 Deferred libgnutls.so.30
ELF 00007f40dda1e000-00007f40dda24000 Deferred winspool.so
ELF 00007f40dda24000-00007f40dda72000 Deferred libnettle.so.8
ELF 00007f40dda72000-00007f40dda87000 Deferred libtasn1.so.6
ELF 00007f40dda87000-00007f40ddab8000 Deferred libidn2.so.0
ELF 00007f40ddabe000-00007f40ddac3000 Deferred dnsapi.so
ELF 00007f40ddac3000-00007f40ddace000 Deferred bcrypt.so
ELF 00007f40ddece000-00007f40ddefd000 Deferred liblzma.so.5
ELF 00007f40ddefd000-00007f40ddf19000 Deferred libunwind.so.8
ELF 00007f40ddf19000-00007f40ddfd1000 Dwarf ntdll.so
ELF 00007f40ddfd4000-00007f40de1b5000 Deferred libc.so.6
ELF 00007f40de1ba000-00007f40de1c0000 Deferred ws2_32.so
ELF 00007f40de1c2000-00007f40de1f6000 Deferred ld-linux-x86-64.so.2
ELF 00007f40de1f6000-00007f40de1fb000 Deferred
Threads:
process tid prio name (all IDs are in hex)
00000020 start.exe
00000024 0
00000038 services.exe
0000003c 0
00000040 0 wine_rpcrt4_server
0000004c 0 wine_rpcrt4_io
00000070 0 wine_rpcrt4_io
00000088 0 wine_rpcrt4_io
00000094 0 wine_rpcrt4_io
000000c0 0 wine_rpcrt4_io
000000d4 0
00000110 0 wine_rpcrt4_io
00000044 winedevice.exe
00000048 0
00000054 0
00000058 0 wine_sechost_service
0000005c 0
00000060 0
000000cc 0
000000d0 0
00000068 winedevice.exe
0000006c 0
00000074 0
00000078 0 wine_sechost_service
0000007c 0
00000080 0
00000098 0
000000a8 0
0000008c plugplay.exe
00000090 0
000000a0 0
000000a4 0 wine_sechost_service
000000ac 0 wine_rpcrt4_server
000000b8 0 wine_rpcrt4_io
000000b0 svchost.exe
000000b4 0
000000c4 0
000000c8 0 wine_sechost_service
000000d8 conhost.exe
000000dc 0
000000e0 pip.exe
000000e4 0
000000e8 python.exe
000000ec 0
000000f4 explorer.exe
000000f8 0
00000100 0 wine_rpcrt4_server
00000108 rpcss.exe
0000010c 0
00000114 0
00000118 0 wine_sechost_service
0000011c 0 wine_rpcrt4_server
00000120 0 wine_rpcrt4_server
00000124 0 wine_rpcrt4_io
00000154 (D) C:\Python\python.exe
00000158 0 <==
0000016c 0
System information:
Wine build: wine-8.18
Platform: x86_64 (guest: i386)
Version: Windows 10
Host system: Linux
Host version: 6.2.0-35-generic
[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed? Encountered error while generating package metadata.
??> See above for output.note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Unhandled exception: unimplemented function KERNEL32.dll.CopyFile2 called in 64-bit code (0x006fffffc8f008).
Yeah, seen the same problem too, had no time to debug yet. Might be a wine problem? I already had to switch to the devel
version of wine due to https://bugs.winehq.org/show_bug.cgi?id=55708, but there might be other missing methods?
Mhm, might be. Should i open a bug report with wine? Or did you already create one?
No, I didn't report it yet. This seems to happen whenever there is no wheel available to install and pip tries to build the project from source (another example, randomly picked from PyPI: pip install tendril-tx-streamreactor
). As a workaround, you can probably build a wheel using any other Python installation (pip wheel pysftp
) and install the resulting wheel inside the container...
Probably caused by python/cpython#105086
I implemented a stupid workaround...
Reported to wine: https://bugs.winehq.org/show_bug.cgi?id=55897