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

Compatibility and Build Guidance for Running OSM2World on Apple Silicon (ARM64) #227

Open
brunohprada opened this issue Dec 30, 2024 · 3 comments

Comments

@brunohprada
Copy link

Currently, I am attempting to run OSM2World on a Mac with Apple Silicon (ARM64 architecture), but I am encountering issues related to native library compatibility (libgluegen_rt.dylib appears to be compiled for x86_64). I have explored the possibility of compiling the software myself using mvn package, but I am not entirely sure how to proceed with ensuring compatibility on ARM64.

Would it be possible to:
1. Provide a pre-built version of OSM2World that is compatible with Apple Silicon?
2. Or share specific instructions or dependencies needed to compile and run the project successfully on ARM64?

Any guidance or recommendations would be greatly appreciated. I believe such instructions would also be helpful to others using similar systems.

Thank you again for your work and for considering this request.

@looolz
Copy link

looolz commented Dec 30, 2024

I tried myself. Dead in the water launching this, after installing latest version of Java on my M1 system.

myusername@client OSM2World-latest-bin % ./osm2world.sh

Unrecognized option: --add-exports

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

myusername@client OSM2World-latest-bin % 

Uninstalling now.

@tordanik
Copy link
Owner

tordanik commented Jan 7, 2025

Unrecognized option: --add-exports

This error message suggests an old Java version (as the --add-exports option was added some time around Java 9) and is most likely unrelated to Apple Silicon support. Current OSM2World versions require at least Java 17. This could happen because multiple versions of Java are installed on your system and the wrong one is used. (You could check with java --version.)

@tordanik
Copy link
Owner

tordanik commented Jan 7, 2025

@brunohprada Thanks for testing and reporting this. Not a full solution, but some thoughts:

  • libgluegen_rt is related to JOGL, a dependency which OSM2World uses to render hardware-accelerated 3d through OpenGL.
  • OpenGL issues only matter when using OSM2World's graphical interface or exporting to PNG. In a pinch, they can be worked around by using the command line. This error should only occur when you try to use the graphical interface. (Which happens by default if you run start OSM2World without any command line options.)
  • Because the issue is likely related to the JOGL dependency (which, unlike OSM2World itself, has to incorporate native code and is therefore a frequent cause of system-dependent issues), my first shot would be to see if more recent versions of JOGL have incorporated better Apple Silicon support. I do not know if those actually improve things with regards to this issue, though.

I've built a version of OSM2World that uses JOGL 2.5.0 instead of instead of the 2.4.0 RC still used in the master branch:
https://osm2world.org/build/tmp/OSM2World-0.4.0-jogl-2.5.0.zip
Not all of OSM2World's features work with it yet, but I would be interested if it improves things at all before pursuing this path further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants