tbonelee opened a new pull request, #4806: URL: https://github.com/apache/zeppelin/pull/4806
### What is this PR for? Previous pty4j dependency version does not support Silicon OSX So `%sh.terminal` interpreter did not work on Silicon OSX. To fix this, I bumped pty4j version to 0.12.35 The previous `pty4j` dependency version does not support macOS on Apple Silicon. As a result, the `%sh.terminal` interpreter did not work on Apple Silicon macOS. To fix this issue, I have updated the `pty4j` verison to `0.12.35` ### What type of PR is it? Bug Fix ### What is the Jira issue? * Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN/6071 ### How should this be tested? - Run `%sh.terminal` interpreter on a Mac with Apple Silicon and verify that it works correctly. ### Screenshots (if appropriate) #### Before <img width="1498" alt="image" src="https://github.com/user-attachments/assets/2ee6c9f9-7a1c-41d0-831a-900949d2c9bc"> - The interpreter was not working, and these error logs were generated: ``` ERROR [2024-09-01 14:10:18,305] ({Thread-11} PtyHelpers.java[<clinit>]:231) - Cannot load implementation of interface com.pty4j.unix.PtyHelpers$OSFacade java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/bt/g5zw1jfn36783j9xvwl6pmg80000gn/T/jna-738948474/jna9752198374376500371.tmp at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2638) at java.base/java.lang.Runtime.load0(Runtime.java:768) at java.base/java.lang.System.load(System.java:1854) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:947) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) at com.sun.jna.Native.<clinit>(Native.java:190) at com.pty4j.unix.macosx.OSFacadeImpl.<clinit>(OSFacadeImpl.java:91) at com.pty4j.unix.PtyHelpers$1.call(PtyHelpers.java:200) at com.pty4j.unix.PtyHelpers$1.call(PtyHelpers.java:196) at com.pty4j.util.LazyValue.getValue(LazyValue.java:25) at com.pty4j.unix.PtyHelpers.getOsFacade(PtyHelpers.java:244) at com.pty4j.unix.PtyHelpers.<clinit>(PtyHelpers.java:228) at com.pty4j.unix.Pty.ptyMasterOpen(Pty.java:141) at com.pty4j.unix.Pty.openMaster(Pty.java:193) at com.pty4j.unix.Pty.<init>(Pty.java:56) at com.pty4j.unix.UnixPtyProcess.<init>(UnixPtyProcess.java:83) at com.pty4j.PtyProcessBuilder.start(PtyProcessBuilder.java:111) at com.pty4j.PtyProcess.exec(PtyProcess.java:78) at com.pty4j.PtyProcess.exec(PtyProcess.java:49) at org.apache.zeppelin.shell.terminal.service.TerminalService.initializeProcess(TerminalService.java:88) at org.apache.zeppelin.shell.terminal.service.TerminalService.lambda$onTerminalReady$0(TerminalService.java:62) at java.base/java.lang.Thread.run(Thread.java:829) INFO [2024-09-01 14:10:18,324] ({Thread-11} ExtractedNative.java[doInit]:127) - Extracted pty4j native in 17 ms ERROR [2024-09-01 14:10:18,325] ({Thread-11} PtyHelpers.java[<clinit>]:237) - Cannot load native pty executor library java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native at com.pty4j.unix.NativePtyExecutor.<init>(NativePtyExecutor.java:14) at com.pty4j.unix.PtyHelpers$2.call(PtyHelpers.java:222) at com.pty4j.unix.PtyHelpers$2.call(PtyHelpers.java:218) at com.pty4j.util.LazyValue.getValue(LazyValue.java:25) at com.pty4j.unix.PtyHelpers.getPtyExecutor(PtyHelpers.java:254) at com.pty4j.unix.PtyHelpers.<clinit>(PtyHelpers.java:234) at com.pty4j.unix.Pty.ptyMasterOpen(Pty.java:141) at com.pty4j.unix.Pty.openMaster(Pty.java:193) at com.pty4j.unix.Pty.<init>(Pty.java:56) at com.pty4j.unix.UnixPtyProcess.<init>(UnixPtyProcess.java:83) at com.pty4j.PtyProcessBuilder.start(PtyProcessBuilder.java:111) at com.pty4j.PtyProcess.exec(PtyProcess.java:78) at com.pty4j.PtyProcess.exec(PtyProcess.java:49) at org.apache.zeppelin.shell.terminal.service.TerminalService.initializeProcess(TerminalService.java:88) at org.apache.zeppelin.shell.terminal.service.TerminalService.lambda$onTerminalReady$0(TerminalService.java:62) at java.base/java.lang.Thread.run(Thread.java:829) ERROR [2024-09-01 14:10:18,325] ({Thread-11} TerminalService.java[lambda$onTerminalReady$0]:64) - Cannot load implementation of interface com.pty4j.unix.PtyHelpers$OSFacade java.lang.RuntimeException: Cannot load implementation of interface com.pty4j.unix.PtyHelpers$OSFacade at com.pty4j.unix.PtyHelpers.getOsFacade(PtyHelpers.java:247) at com.pty4j.unix.PtyHelpers.getInstance(PtyHelpers.java:262) at com.pty4j.unix.Pty.ptyMasterOpen(Pty.java:141) at com.pty4j.unix.Pty.openMaster(Pty.java:193) at com.pty4j.unix.Pty.<init>(Pty.java:56) at com.pty4j.unix.UnixPtyProcess.<init>(UnixPtyProcess.java:83) at com.pty4j.PtyProcessBuilder.start(PtyProcessBuilder.java:111) at com.pty4j.PtyProcess.exec(PtyProcess.java:78) at com.pty4j.PtyProcess.exec(PtyProcess.java:49) at org.apache.zeppelin.shell.terminal.service.TerminalService.initializeProcess(TerminalService.java:88) at org.apache.zeppelin.shell.terminal.service.TerminalService.lambda$onTerminalReady$0(TerminalService.java:62) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/bt/g5zw1jfn36783j9xvwl6pmg80000gn/T/jna-738948474/jna9752198374376500371.tmp at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2638) at java.base/java.lang.Runtime.load0(Runtime.java:768) at java.base/java.lang.System.load(System.java:1854) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:947) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) at com.sun.jna.Native.<clinit>(Native.java:190) at com.pty4j.unix.macosx.OSFacadeImpl.<clinit>(OSFacadeImpl.java:91) at com.pty4j.unix.PtyHelpers$1.call(PtyHelpers.java:200) at com.pty4j.unix.PtyHelpers$1.call(PtyHelpers.java:196) at com.pty4j.util.LazyValue.getValue(LazyValue.java:25) at com.pty4j.unix.PtyHelpers.getOsFacade(PtyHelpers.java:244) at com.pty4j.unix.PtyHelpers.<clinit>(PtyHelpers.java:228) ... 10 more ``` #### After <img width="1500" alt="image" src="https://github.com/user-attachments/assets/8a548b2c-e75b-4c6f-8607-7bbc4ac08159"> - The interpreter is now working as expected, just like any ordinary shell. ### Questions: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
