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

Fix Tomcat native library location for m1 macs #22893

Closed
spbolton opened this issue Aug 30, 2022 · 0 comments · Fixed by #22895
Closed

Fix Tomcat native library location for m1 macs #22893

spbolton opened this issue Aug 30, 2022 · 0 comments · Fixed by #22895

Comments

@spbolton
Copy link
Contributor

spbolton commented Aug 30, 2022

In docker we set th -Djava.library.path=/usr/lib/x86_64-linux-gnu/ this does not work on arm platforms and throws the following error.

dotcms_1 | 30-Aug-2022 21:26:23.194 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/lib/x86_64-linux-gnu/]

We can make this context sensitive by getting the arcitecture from the system and should automatically set this to the right path using /user/libaarch64-lib-gnu. The value is set in JAVA_OPTS_BASE in 00-config-defaults.sh

-Djava.library.path=/usr/lib/$( uname -m )-linux-gnu/

full line becomes

export JAVA_OPTS_BASE=${JAVA_OPTS_BASE:-"-Djava.awt.headless=true -Xverify:none -Dfile.encoding=UTF8 -server -Dpdfbox.fontcache=/data/local/dotsecure -Dlog4j2.formatMsgNoLookups=true -Djava.library.path=/usr/lib/$( uname -m )-linux-gnu/ -XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:ShenandoahUncommitDelay=1000 -XX:ShenandoahGuaranteedGCInterval=10000 "}

Acceptance Criteria

  • dotCMS Docker image should build in Apple M1 chips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants