> On my side, the difference was that I built this time
> Gluegen and JOGL in a virtual machine but there must have been something else.
>
> The only difficulty was to succeed to link with libjawt.dylib for ARM under an
> Intel computer. I tried to set DYLD_LIBRARY_PATH env variable but it didn't work.
> So here's the solution to build Gluegen and JOGL for Mac ARM that I used:
> - download Zulu OpenJDK 11
> <
https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=macos&package=jdk> for
> x86_64 *and* arm64
> - install Zulu OpenJDK 11 for x86_64 in /Library/Java/JavaVirtualMachines to
> use it for build process
> - unzip Zulu OpenJDK 11 for arm64 somewhere on your disk and prepare a
> universal libjawt.dylib file for x86_64 and arm64 with a command similar to:
>
> lipo /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/lib/libjawt.dylib /path/to/zulu11.43.1021-ca-jdk11.0.9.1-macosx_aarch64/zulu-11.jdk/Contents/Home/lib/libjawt.dylib -output /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/lib/libjawt.dylib -create
>
> - check libjawt.dylib is universal with the command:
>
> lipo /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/lib/libjawt.dylib -info
>
> - get Gluegen and JOGL with Git as explained at
>
http://forum.jogamp.com/jogl/doc/HowToBuild.html> - before running Ant scripts, edit /gluegen/make/gluegen-cpptasks-base.xml/ to
> replace "x86_64" by "arm64" in the following lines:
>
> <compilerarg value="x86_64" if="use.macosx64"/>
> <linkerarg value="x86_64" if="use.macosx64"/>
>
> - run Ant scripts
> - pick generated .dylib files in
> /gluegen/build/gluegen-rt-natives-macosx-universal.jar/ and
> /jogl/build/jar/jogl-all-natives-macosx-universal.jar/ files
> - finally, if you want universal .dylib files use /lipo/ command to combine
> x86_64 and arm64 .dylib files, with commands similar to:
>
> lipo path/to/arm64/libgluegen_rt.dylib path/to/x86_64/libgluegen_rt.dylib -output path/to/universal/libgluegen_rt.dylib -create
>
>
> Sven, I hope you'll be able to adapt your Ant scripts to perform these
> operations.