-
Notifications
You must be signed in to change notification settings - Fork 752
CLR not working on 32 bit Linux #1210
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
Comments
@daniol it should be working on 32 bit Linux, but we don't have CI set for it. |
@lostmsu maybe it should, but it doesn't 😄 you can check it with a live version of debian 9 under a 32-bit machine. I don't know if this can be also reproduced on a VM. |
I can also confirm this issue with pythonnet 2.5.0, 2.5.1 and the master branch (84e2735). The issue does not exist in pythonnet 2.4.0. I am not using a VM nor a live USB stick. I have 32-bit ubuntu installed on a HDD. Below shows the crash report when using Python 3.5.2 from the OS. I also created Python 3.7.9 and 3.8.6 virtual environments and importing clr fails in these environments.
The complete crash report is available here If I don't start the Python REPL to import clr but pass it in through the command line I get the following
|
@filmor A summary of bisecting is available here The criteria that I used to decide if a commit was good or bad was by running the following bash script (which I named issue1210.sh) after each bisect iteration. If pytest passed then that commit was considered good.
Please let me know if you'd like further information. |
This is great, thanks. It points to PR #971, which uses the library loading to allow overriding one of Python's flags. I'll have a closer look, the actual writingnlooks fine, but maybe the lib loading assumes 64bitness somewhere. |
I've gone a little further to see if there are additional issues if the changes from PR #971 were temporarily removed. Here's what I did:
770fc01 immediately follows 4271e57 so 770fc01 seems to also introduce errors on 32-bit linux. 770fc01 passed the tests on travis (ignoring that one pip issue) so it is okay on 64-bit linux. |
I can also confirm that the issue does not exist in pythonnet 2.4.0. The current mono version (6.12) throws the following error when importing the clr module in pythonnet 2.4.0: |
@filmor why was this closed? |
@daniol Sorry for the silent closure, I just skimmed the last message (was cleaning up old issues) and saw the |
@filmor we could consider separating .NET build and Python build. Then Python build would only need to download |
I'm not sure that's worth the hassle (and I like the current clean |
Removing this from 3.0.0 milestone. @filmor if you are actively working on it - readd. Because this is not a breaking change there's no harm in releasing it with 3.0.1 or 3.1.0. |
Also, to officially support 32 bit we need it in CI. |
Since the build now depends on the
Please let me know if there is something else that you would like me to try or if there is additional information about my system that you would like know. |
Yes, I see the same error. The failing borrow (due to a null pointer being returned) is from the |
I have replaced the |
I have tested this now with Python 3.9, here it already fails on What I would expect: So the Does anyone have more insight here or knows a bit more about how Mono translates |
@filmor have you tried with .NET Core? If the behavior is different, I would simply open a bug in Mono. |
Environment
Details
Pythonnet seems not to be working on a Linux 32-Bit environment (i686) at all. I tested it on a "Debian live" (USB) system in two different computers, using Python from the Debian repositories and also building python from source code, here are the results:
Using Python from the Debian repositories:
The python execution crashes just doing
import clr
See attachment: mono_crash.4383a3eb2.0.zip, trace.txt
Building Python from source code (with
--enable-shared
):It doesn't crash, but clr throws an error when trying to load an assembly ("AttributeError: module 'clr' has no attribute 'AddReference'"). This was reported in some places around internet, but I don't have any
clr
module already installed which could cause a name collision. See output:Notes
The text was updated successfully, but these errors were encountered: