mac-can / PCBUSB-Library

macOS® User-Space Driver for PCAN-USB Interfaces (Binaries only)
https://mac-can.com
Other
29 stars 0 forks source link

Apple Silicon (ARM M1) not supported #3

Closed csrubin closed 2 years ago

csrubin commented 3 years ago

Currently this driver only seems to support x86 architectures. Is there any way to port this over to M1 chips, or is there another workaround to use to solve compatibility problems?

mac-can commented 3 years ago

You are right, currently only the x86_64 architecture is supported by the PCBUSB library. There is theoretically a good chance that it would compile and run on the Apple Silicon (ARM M1); see RusokuCAN issue #6.

Unfortunately, I don't have a Mac with an M1 chip. And - sorry for that - even if a cross-compilation would succeed, I would not release untested software. And it is and remains closed-source.

Cheers

When I started the project eight years ago, I was asked if the PowerPC architecture was supported. Isn´t it funny 😎

gregington commented 3 years ago

Is there any progress on an Apple Silicon build? Next week sees an expected release of MacBook Pro models with M1X chipsets; it won't be long until intel Macs won't be available for purchase.

csrubin commented 3 years ago

Through some testing and use of Rosetta, we’ve actually been able to use this software on M1 Macs! I don’t remember the exact steps (sorry!) but I can tell you it’s possible

On Oct 18, 2021, at 2:53 AM, Greg Tan @.***> wrote:

 Is there any progress on an Apple Silicon build? Next week sees an expected release of MacBook Pro models with M1X chipsets; it won't be long until intel Macs won't be available for purchase.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

gregington commented 3 years ago

Thanks @csrubin, I got it working using the arch -x86_64 command.

Using the prefix arch-x86_64 will load the subsequent universal binary as x86 (instead of Apple Silicon) and will allow Rosetta to work for dynamically linked libraries. Otherwise the binary will be run as Apple Silicon and Rosetta won't be used. For example, you can run arch -x86_64 python which will run the x86 python binary.

See also https://apple.stackexchange.com/questions/409746/run-everything-in-rosetta-2-on-silicon-mac and https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment.

mac-can commented 3 years ago

The PCBUSB dylib compiled as Universal macOS Binary can be downloded here: https://www.uv-software.de/dokuwiki/doku.php?id=uvs:programs:pcbusb_library It should run on both architectures, but it is not tested on arm64.

Happy CANgineering.

mac-can commented 2 years ago

I am happy to announce version 0.10.1 (Service Release). It is now officially available as Universal macOS Binary.