You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Tim (Jira)" <ji...@apache.org> on 2022/01/14 18:44:00 UTC
[jira] [Updated] (NETBEANS-6391) NetBeans 12.5/12.6 missing ARM based binaries for MacOSX terminal support in NetBeans
[ https://issues.apache.org/jira/browse/NETBEANS-6391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim updated NETBEANS-6391:
--------------------------
Summary: NetBeans 12.5/12.6 missing ARM based binaries for MacOSX terminal support in NetBeans (was: Netbeans 12.5/12.6 missing ARM based binaries for MacOSX terminal support in Netbeans)
> NetBeans 12.5/12.6 missing ARM based binaries for MacOSX terminal support in NetBeans
> -------------------------------------------------------------------------------------
>
> Key: NETBEANS-6391
> URL: https://issues.apache.org/jira/browse/NETBEANS-6391
> Project: NetBeans
> Issue Type: Bug
> Affects Versions: 12.5, 12.6
> Environment: java -version
> {noformat}
> openjdk version "17.0.1" 2021-10-19
> OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12)
> OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode)
> {noformat}
> Mac OS Montery M1 Pro Max MacBook Pro
> Reporter: Tim
> Priority: Blocker
>
> When using the “Open in Terminal” option I get nothing but a blank terminal window when running on an M1 Silicon Pro MacBook Pro using native ARM based JDK
> After debugging the source code of Netbeans itself it comes down to a missing resource in the “_netbeans/ide/bin/nativeexecution/_“ folder for “_MacOSX-unknown_64/pty_”
> This is because the host information cannot figure out the *CPUFAMILY* and is returning “*UNKNOWN*”
> Things I tried:
> 1. Changed the “_netbeans/ide/bin/nativeexecution/hostinfo.sh_” file as follows:
> Add another check for CPUFAMILY and return ARM:
> {noformat}
> …
> CPUFAMILY=`(echo ${CPUTYPE} | egrep "^i|x86_64|athlon|Intel" >/dev/null && echo x86) || echo ${CPUTYPE}`
> if [ "${CPUFAMILY}" = "sparc64" ]; then
> CPUFAMILY="sparc"
> fi
> # New check if ARM64 then return ARM so Java code will stop returning “UNKNOWN”
> if [ "${CPUFAMILY}" = "arm64" ]; then
> CPUFAMILY="arm"
> fi
> {noformat}
> 2. I’m a Java developer and don’t usually compile C++ but going into the “_netbeans/ide/dlight.nativeexecution/tools_” directory and manually running the ‘_buildall.sh_” script compiles almost all the files needed.
> ➜ tools git:(master) ✗ chmod +x ./buildall.sh
> ➜ tools git:(master) ✗ . ./buildall.sh
> {noformat}
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> rm -rf ../release/bin/nativeexecution/MacOSX-arm ../release/bin/nativeexecution/MacOSX-arm
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> gcc -s -O2 -o ../release/bin/nativeexecution/MacOSX-arm/privp privp.c
> ld: warning: option -s is obsolete and being ignored
> gcc -s -O2 -o ../release/bin/nativeexecution/MacOSX-arm/process_start process_start.c
> ld: warning: option -s is obsolete and being ignored
> gcc -s -O2 -o ../release/bin/nativeexecution/MacOSX-arm/pty_open pty_open.c
> ld: warning: option -s is obsolete and being ignored
> gcc -s -O2 -s -o ../release/bin/nativeexecution/MacOSX-arm/sigqueue sigqueue.c
> sigqueue.c:53:12: error: implicit declaration of function 'sigqueue' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
> return sigqueue(pid, signo, value);
> ^
> 1 error generated.
> make: *** [sigqueue] Error 1
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> rm -f -r /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/dist/MacOSX-arm
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> rm -f -r /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build
> rm -f -r /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/dist
> rm -f .make.state*
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> mkdir -p /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/dist/MacOSX-arm
> mkdir -p /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/env.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/src/env.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/error.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/src/error.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/loop.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/src/loop.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/options.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/src/options.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/pty_fork.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/src/pty_fork.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/pty.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/src/pty.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/util.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/src/util.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> --------------------------------------------------------------------------------
> gcc -s -O2 -s -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/dist/MacOSX-arm/pty /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/env.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/error.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/loop.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/options.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/pty_fork.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/pty.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/build/MacOSX-arm/src/util.o
> ld: warning: option -s is obsolete and being ignored
> ld: warning: option -s is obsolete and being ignored
> ================================================================================
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/pty/dist/MacOSX-arm/pty
> -rwxr-xr-x 1 tmulle staff 53520 Jan 14 13:25
> Mach-O 64-bit executable arm64
> ================================================================================
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> expr: syntax error
> rm -f -r /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/build/MacOSX-arm /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/dist/MacOSX-arm
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> rm -f -r /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/build
> rm -f -r /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/dist
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> expr: syntax error
> mkdir -p /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/dist/MacOSX-arm
> mkdir -p /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/build/MacOSX-arm/src
> mkdir -p /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/build/MacOSX-arm/src/linux
> mkdir -p /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/build/MacOSX-arm/src/solaris
> mkdir -p /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/build/MacOSX-arm/src/macosx
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/build/MacOSX-arm/src/error.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/src/error.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/build/MacOSX-arm/src/killall.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/src/killall.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/src/killall.c:187:13: warning: enumeration value 'S_SID' not handled in switch [-Wswitch]
> switch (scope) {
> ^
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/src/killall.c:187:13: note: add missing switch cases
> switch (scope) {
> ^
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/src/killall.c:199:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
> }
> ^
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/src/killall.c:260:16: error: implicit declaration of function 'sigqueue' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
> return sigqueue(params.id, params.sig, value);
> ^
> 2 warnings and 1 error generated.
> make: *** [/Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/killall/build/MacOSX-arm/src/killall.o] Error 1
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> rm -f -r /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/build/MacOSX-arm /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/dist/MacOSX-arm
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> rm -f -r /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/build
> rm -f -r /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/dist
> rm -f .make.state*
> Platform: MacOSX-arm
> Darwin mars.fios-router.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
> Makefile:85: warning: overriding commands for target `/Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/dist/MacOSX-arm'
> Makefile:81: warning: ignoring old commands for target `/Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/dist/MacOSX-arm'
> make: Circular /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/dist/MacOSX-arm <- /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/dist/MacOSX-arm dependency dropped.
> mkdir -p /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/build/MacOSX-arm/src
> gcc -s -O2 -c -o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/build/MacOSX-arm/src/unbuffer.o /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/src/unbuffer.c
> clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
> mkdir -p /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/dist/MacOSX-arm
> ================================================================================
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools/unbuffer/dist/MacOSX-arm/
> total 0
> drwxr-xr-x 2 tmulle staff 64 Jan 14 13:25 .
> drwxr-xr-x 3 tmulle staff 96 Jan 14 13:25 ..
> directory
> ================================================================================
> /Users/tmulle/Development/Projects/netbeans/ide/dlight.nativeexecution/tools
> ================================================
> buildall: directory
> buildall/pty: Mach-O 64-bit executable arm64
> buildall/pty_open: Mach-O 64-bit executable arm64
> buildall/process_start: Mach-O 64-bit executable arm64
> buildall/privp: Mach-O 64-bit executable arm64
> {noformat}
> If I then make a directory called “_netbeans/ide/bin/nativeexecution/MacOSX-arm_64_” and copy the “_buildall/_“ output into that directory the terminal works and I they are running *natively* (Not Rosetta).
> Again, this worked for me but obviously someone with more knowledge will know how to fix this.
> And yes, I know that you need a M1 Silicon Mac to build the binaries :-(
> h4. Quick Fix
> I was able to fix it temporarily with these steps but they are not ideal:
> 1. Step #1 from above is required
> 2. Copying the contents of “_netbeans/ide/bin/nativeexecution/MacOSX-x86_64_” to “_netbeans/ide/bin/nativeexecution/MacOSX-arm_64_”
> This works, however, any terminal window is now using *Rosetta* and _NOT native ARM_ code
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists