webcomics / pywine

Docker image for Wine with Python
MIT License
93 stars 26 forks source link

wine: Call from 00006FFFFF463EF7 to unimplemented function ucrtbase.dll.crealf, aborting #65

Closed vkuznetsovgn closed 3 weeks ago

vkuznetsovgn commented 3 weeks ago

Hey!

I'm trying to use scipy library in pywine. My host system is Ubuntu 24.04.

I'm doing the following steps:

$ docker run -it --rm tobix/pywine:3.12
$ wine pip install scipy
$ wine python
>>> from scipy.signal import butter

Then I'm just importing scipy and getting a huge error:

>>> from scipy.signal import butter
wine: Call from 00006FFFFF463EF7 to unimplemented function ucrtbase.dll.crealf, aborting
wine: Unimplemented function ucrtbase.dll.crealf called at address 00006FFFFF463EF7 (thread 00e4), starting debugger...
WineDbg attached to pid 0000
Unhandled exception: unimplemented function ucrtbase.dll.crealf called in 64-bit code (0x006fffff463ef7).
Register dump:
 rip:00006fffff463ef7 rsp:00007ffffe2ea320 rbp:00006ffffb3fa580 eflags:00000202 (   - --  I   - - - )
 rax:00007ffffe2ea368 rbx:00006fffffa7f144 rcx:00007ffffe2ea340 rdx:0000000000000000
 rsi:00007ffffe2ea410 rdi:00006ffffb4044e0  r8:00006ffffeb69c61  r9:00007ffffe2ea418 r10:00007437bea94d70
 r11:00007ffffe2ea588 r12:0000000000000070 r13:0000000000000000 r14:00007437bea94d70 r15:0000000000000000

Do you know how to fix it and if it's possible to fix it?

Mcublog commented 3 weeks ago

hi,

there was already a similar problem.

most likely the problem is in wine and you need to post a bug in their tracker.

You can also try changing the Python version or Scipy version to an older one.

I used the method above to get workaround in some my projects.

TobiX commented 3 weeks ago

crealf is only a stub in wine, which means it's not implemented. Every code using that function WILL crash. scipy uses that function a lot, so it's only natural it crashes under wine.

I don't consider this container anything that should be able to run every piece of Python software. It's mainly intended as a tool for CI builds (for example with PyInstaller).

You might want to raise this issue with either wine or scipy to "fix" this. In both cases, providing a patch would probably provide the fastest way to getting this fixed. Looking at what the function is supposed to do the implementation might be quite simple...

TobiX commented 3 weeks ago

On a more positive note: Thanks for trying my container in new and interesting ways :laughing: - A shame it didn't work out for you.

Thinking more about it I would have expected a sensible compiler to inline such simple functions... But MSVC apparently is no sensible compiler and doesn't really "support" complex numbers anyways (https://learn.microsoft.com/en-us/cpp/c-runtime-library/complex-math-support?view=msvc-170, example: https://godbolt.org/z/1WPq3K9hr)