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

Apple Silicon / ARM builds #19

Open
sammcj opened this issue Apr 9, 2023 · 8 comments
Open

Apple Silicon / ARM builds #19

sammcj opened this issue Apr 9, 2023 · 8 comments

Comments

@sammcj
Copy link

sammcj commented Apr 9, 2023

The current binary is an Intel/AMD and as such runs in emulation mode on modern Apple machines and cannot run on Linux ARM machines.

It would be great if this was built for x86 and ARM targets.


I had a go in a fork and I had problems with the 'poetry' tool used by this project, however using standard pip I was able to install the updated packages that provide ARM compatibility without issue.


I've attached my (local) macOS / Apple Silicon ARM build to this issue in case anyone else wants the binary.

The build when compared to the Intel binary, the ARM binary is 70%~ smaller and processes gcode - and more importantly - processes gcodes around 3x faster on average in my tests.

@JohnOCFII
Copy link

The current binary is an Intel/AMD and as such runs in emulation mode on modern Apple machines and cannot run on Linux ARM machines.

It would be great if this was built for x86 and ARM targets.

It's getting closer. The instructions linked below (except replace step 2's git clone with git clone https://github.com/FreeCAD/FreeCAD.git) work well for building FreeCAD for Mac arm. I believe the primary FreeCAD packaging folks will be integrating this at some point. This process has also been discussed in this forum thread: https://forum.freecad.org/viewtopic.php?t=76777

https://github.com/oursland/FreeCAD-Build-Notes

@spitfire
Copy link

spitfire commented Mar 3, 2024

The current binary is an Intel/AMD and as such runs in emulation mode on modern Apple machines and cannot run on Linux ARM machines.

It would be great if this was built for x86 and ARM targets.

I had a go in a fork and I had problems with the 'poetry' tool used by this project, however using standard pip I was able to install the updated packages that provide ARM compatibility without issue.

I've attached my (local) macOS / Apple Silicon ARM build to this issue in case anyone else wants the binary.

The build when compared to the Intel binary, the ARM binary is 70%~ smaller and processes gcode - and more importantly - processes gcodes around 3x faster on average in my tests.

Can you provide any build instructions?
I'd like to try building from the latest source

@JohnOCFII
Copy link

Can you provide any build instructions?
I'd like to try building from the latest source

Best luck I've had building on M1/arm Mac has been with these instructions. I built successfully as recently as last week. https://github.com/oursland/FreeCAD-Build-Notes

@spitfire
Copy link

spitfire commented Mar 3, 2024

Can you provide any build instructions?
I'd like to try building from the latest source

Best luck I've had building on M1/arm Mac has been with these instructions. I built successfully as recently as last week. https://github.com/oursland/FreeCAD-Build-Notes

tried to generalize it (and obviously replace paths/urls/names accordingly), but I failed. What do you do instead of the following command:

conda env create -p .conda/freecad -f conda/conda-env.yaml
(conda/conda-env.yaml does not exist)?

@JohnOCFII
Copy link

conda env create -p .conda/freecad -f conda/conda-env.yaml
(conda/conda-env.yaml does not exist)?

That command works for me.

My base directory structure is as follows:

/Users/osh/Documents/Dev/FreeCAD

And all the directories and files are created and layered in as so:

(base)osh@OshMBPro FreeCAD % ls -lta
total 304
drwxr-xr-x   3 osh  staff     96 Feb 19 13:35 build
drwxr-xr-x@ 30 osh  staff    960 Feb 19 13:35 .
drwxr-xr-x  15 osh  staff    480 Feb 19 13:34 .git
drwxr-xr-x  31 osh  staff    992 Feb 19 13:34 src
drwxr-xr-x   9 osh  staff    288 Feb 19 13:34 conda
drwxr-xr-x  20 osh  staff    640 Feb 19 13:34 cMake
drwxr-xr-x   3 osh  staff     96 Feb 17 22:21 .conda
drwxr-xr-x   3 osh  staff     96 Feb 17 21:55 tools
drwxr-xr-x   5 osh  staff    160 Feb 17 21:55 tests
-rw-r--r--   1 osh  staff    233 Feb 17 21:55 rpkg.macros
-rw-r--r--   1 osh  staff    350 Feb 17 21:55 requirements.txt
drwxr-xr-x   3 osh  staff     96 Feb 17 21:55 package
drwxr-xr-x   5 osh  staff    160 Feb 17 21:55 data
drwxr-xr-x   3 osh  staff     96 Feb 17 21:55 contrib
-rw-r--r--   1 osh  staff   1557 Feb 17 21:55 SECURITY.md
-rw-r--r--   1 osh  staff   5442 Feb 17 21:55 README.md
-rw-r--r--   1 osh  staff  25794 Feb 17 21:55 LICENSE
-rw-r--r--   1 osh  staff  10030 Feb 17 21:55 CONTRIBUTING.md
-rw-r--r--   1 osh  staff   4001 Feb 17 21:55 CODE_OF_CONDUCT.md
-rw-r--r--   1 osh  staff   7654 Feb 17 21:55 CMakePresets.json
-rw-r--r--   1 osh  staff   3556 Feb 17 21:55 CMakeLists.txt
-rw-r--r--   1 osh  staff  20306 Feb 17 21:55 .pylintrc
-rw-r--r--   1 osh  staff   1592 Feb 17 21:55 .pre-commit-config.yaml
-rw-r--r--   1 osh  staff    136 Feb 17 21:55 .gitmodules
-rw-r--r--   1 osh  staff    806 Feb 17 21:55 .gitignore
drwxr-xr-x   8 osh  staff    256 Feb 17 21:55 .github
-rw-r--r--   1 osh  staff   5280 Feb 17 21:55 .git-blame-ignore-revs
-rw-r--r--   1 osh  staff  28958 Feb 17 21:55 .clang-tidy
-rw-r--r--   1 osh  staff   2051 Feb 17 21:55 .clang-format
drwxr-xr-x  10 osh  staff    320 Feb 17 21:16 ..

May I suggest joining the FreeCAD Discord? A number of helpful people there.

https://discord.gg/qpDNTBCMNu

@spitfire
Copy link

spitfire commented Mar 4, 2024

I thought these instruction would help me build preprocess_cancellation tool (which is what I'm looking for), not freecad.

@JohnOCFII
Copy link

I thought these instruction would help me build preprocess_cancellation tool (which is what I'm looking for), not freecad.

Sorry about that.

@kastorhalliwell
Copy link

Not that familiar with python, but I did find the following: https://www.baeldung.com/linux/python-binary

  1. Installed pip and pyinstaller
  2. Downloaded kageurufu/preprocess_cancellation source code and navigated to it
  3. Ran pyinstaller --onefile preprocess_cancellation.py
  4. Use the binary it spits out in dist/preprocess_cancellation

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

4 participants