Skip to content
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

Segmentation Fault on Linux running on Mac M4 #2807

Open
custom-discoveries opened this issue Feb 14, 2025 · 3 comments
Open

Segmentation Fault on Linux running on Mac M4 #2807

custom-discoveries opened this issue Feb 14, 2025 · 3 comments

Comments

@custom-discoveries
Copy link

Describe the bug
I'm receiving a Segmentation Fault when trying to execute a cx_Freeze complied python program on an Ubuntu Linux that is running in a Docker containter on a Mac M4 lapthop.
To Reproduce
Need to compile a python 3.9 program and try executing it on a Docker Ubuntu Linux image running on a Mac M4 architecture.

Expected behavior
The expected behavior is that my python program would be executed.

Screenshots
The only indication is a message that states: Segmetation fault. - no core dump produced.

Desktop (please complete the following information):

  • Platform information (e.g. Ubuntu Linux 20.04):
  • OS architecture (e.g. amd64): Mac M4 - arm64
  • Mac OS Version: Sequoia 15.3
  • cx_Freeze version [e.g. 6.11]: 7.2.3
  • Python version [e.g. 3.10]: 3.9.5
  • Docker V4.38.0

Additional context
I'm able to run the python script testFreeze.py in the Linux environment that is running ontop of a Mac M4 architecture. Additionally, I'm able to execute the program with exact same software configuration Python 3.95 running on Ubuntu Linux 20.4 that is running in a Docker V4.38 containter running on a Mac Intel (x86_64) platfrom, just fine. Finally, when I compile and run the python program under native Mac OS environment (15.03) on a Mac M4 architecture, it also works just fine.

@marcelotduarte
Copy link
Owner

marcelotduarte commented Feb 14, 2025

From the experience I had in #2641, I imagine that the problem is related to emulation, the same one that occurred in that issue.
So, using version 7.2.6 or higher, I recommend the current 7.2.10, try setting this variable before run cx_Freeze:

export CX_FREEZE_BIND=patchelf
cxfreeze --script testFreeze.py

@custom-discoveries
Copy link
Author

I recommend the current 7.2.10, try setting this variable before run cx_Freeze:

I updated to crrent 7.2.10 and added the export CX_FREEZE_BIND=patchelf to my build script, but those changs didn't resolve the issue. Do you know of any other persons executing a CX_FREEZE under a docker image on a Mac M4?

@marcelotduarte
Copy link
Owner

Do you know of any other persons executing a CX_FREEZE under a docker image on a Mac M4?

No.

Considering what you say in "Additional context" it also indicates that only with emulation you have a problem. There was another recent issue #2801 with Ubuntu 24.04. I see that you use 20.04. Using 22.04 I solved the emulator problem. Try using 22.04 to see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants