/sap-commerce-apple-silicon

Run SAP (Hybris) Commerce on Apple Silicon (M1/M2)

sap-commerce-apple-silicon

Run SAP (Hybris) Commerce Cloud (TM) on Apple Silicon (M1/M2) natively, without Rosetta emulation for maximum performances.

Related repositories

SAP (Hybris) Commerce Cloud (TM) on Apple Silicon on Docker https://github.com/nicolabeghin/sap-commerce-docker-apple-silicon

Project without dependency on sapcorejco

Project without requirement to connect to SAP ECC/S4 RFC (JCO): you don't need to perform anything special and can use directly the SAPMachine 17 JDK for MacOS aarch64 in place of MacOS x64.

image

Project with sapcorejco dependency

Project with requirement to connect to SAP ECC/S4 RFC (JCO). In february 2023 JCO 3.1.7 has been released with Mac ARM64 (Apple Silicon) support. In order to leverage this:

  1. download JCO 3.1.7 for Apple MacOS 64-bit ARM from https://support.sap.com/en/product/connectors/jco.html#Download
  2. replace the content of the JCO zip (inside the zip) in core-customize/hybris/bin/modules/sap-framework-core/sapcorejco/lib/darwinintel64

image

  1. download SAPMachine 17 for MacOS aarch64 in place of MacOS x64 from https://sap.github.io/SapMachine/ image

  2. extract ZIP and move to /Library/Java/JavaVirtualMachines/sapmachine-jdk-17.0.6.jdk-aarch64

  3. change at beginning of hybris/bin/platform/setantenv.sh:

    export JAVA_HOME=/Library/Java/JavaVirtualMachines/sapmachine-jdk-17.0.6.jdk-aarch64/Contents/Home

Performance benchmark

5 times faster when running without Rosetta directly with MacOS aarch64 JVM

before

Server startup in 240040 ms

after

Server startup in 50872 ms

Troubleshooting

Tanuki wrapper

Older SAP Commerce Cloud releases do not provide Tanuki wrapper for ARM64. Make sure you have this file:

  • core-customize/hybris/bin/platform/resources/tanukiwrapper/bin/wrapper-macosx-arm-64

along with the old (MacOS Intel x64) ones

  • core-customize/hybris/bin/platform/resources/tanukiwrapper/bin/wrapper-macosx-universal-32
  • core-customize/hybris/bin/platform/resources/tanukiwrapper/bin/wrapper-macosx-universal-64

JCO libraries blocked by Mac OSX

libsapjco3.dylib blocked by Mac OSX Gatekeeper (ref. https://disable-gatekeeper.github.io/) - they can be whitelisted from OSX Settings

image image