openjpeg icon indicating copy to clipboard operation
openjpeg copied to clipboard

Support for OSX on ARM (M1)

Open Horcrux7 opened this issue 4 years ago • 6 comments

It will be nice if the next release of OpenJpeg can also support OSX on the ARM (M1) platform. I think the future Macs will run on ARM chips instead on Intel chips.

Horcrux7 avatar Nov 29 '20 17:11 Horcrux7

Why wouldn't it support them ? The library is written in portable C

rouault avatar Nov 29 '20 17:11 rouault

Why wouldn't it support them ? The library is written in portable C

In the latest release I see only binaries for x86 https://github.com/uclouvain/openjpeg/releases/tag/v2.3.1

Horcrux7 avatar Dec 01 '20 18:12 Horcrux7

In the latest release I see only binaries for x86

There are tons of potential platforms and CPU architectures. Releases include only a subset of what can work. Up to the users to build for their platform of choice. What could potentially be done in the source code is ARM specific optimizations for the optimized code paths that exist currently for x86. Of course it will require someone to contribute this or fund someone to do so.

rouault avatar Dec 01 '20 19:12 rouault

It is just standard aarch64 platform (with some caveats that it does not advertise some stuff here and there as on android). see https://github.com/google/cpu_features/pull/150

ffmpeg works good there on M1, so do not think it will not work.

ValZapod avatar Jan 12 '21 05:01 ValZapod

Since Intel platform is going to be obsolete for macOS, it should be considered to have native Apple Silicon support right here as a release.

gamma avatar Jun 09 '22 11:06 gamma

Just to add to this, I compiled and ran this as native an M1 machine when I contributed to the project. There are known compiler issues on the M1 platform that have to be resolved before you compile: https://developer.apple.com/forums/thread/666700

Eharve14 avatar Jun 09 '22 12:06 Eharve14

Was able to compile from source using the suggested CMake method on an M1 Air.

  • MacOS version: Ventura 13.1
  • uname -v : Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103
  • xcode-select --version: xcode-select version 2396

Dennis-Johnson avatar Jun 14 '23 06:06 Dennis-Johnson