Compiling Panda3D for Android?

Hello there!

I’ve been trying to get Panda3D compiled for Android with Python support. But I can’t find the thirdparty elements for it anywhere!

C:\p3d>makepanda\makepanda.bat --everything --no-eigen --target android
Version: 1.10.0
Storing dependency cache.
Elapsed Time: 0 sec
Could not find the Python library in thirdparty/android-libs-arm/python.
Build terminated.

Is there anywhere to find the third party, or any way to compile them? Is there a guide for compiling an Android build? I’ve been looking on the forums and Google but there’s only an unofficial Android port.

Thanks a lot.

You’ll have to build Python from source. This isn’t something I’ve tried myself yet. There are probably guides out there for how to compile Python on Android.

Hi there. Is there any news for this?

I failed to compile panda3d on android (termux) for android.
Seems like I dont have all dependencies installed in termux or the build file doesnt fit for me.

So I would like to compile on macos for android (target = android)

Did anybody do that and could give me a hint?

Thanks a lot

If we consider that we are talking about a third-party library - python. You need to ask in the appropriate forum for this language. Perhaps worth a look, although I’m not sure …

You’ll need to compile the thirdparty packages for Android first. But once you do that, you should be able to install the Android SDK and NDK and use makepanda with the --target flag to cross-compile. However, I have not tested doing this from macOS, only from Windows or Linux.

Hi rdb.

I have set up sdk/ndk on my mac. I can build android apps from java source.

For panda3d: Do you mean: I clone the git repo, download third party tools for macos and then build for macos? And then build for android?

Or do I need to find source repo for third party tools for android??

Sorry. I didnt understand your post in that point :slight_smile:

There doesnt seem to be any documentation for cross compiling panda3d.

I still hope that I either get it running with cross compile or with building it inside termux ion android…

No, you don’t need to build the thirdparty tools for macOS, just for Android. You can find a repository to let you build the thirdparty tools with CMake here:

This does not include Python; I would actually suggest starting with Python, as many of the thirdparty libraries are probably not even needed!

You’re kind of entering uncharted territory here, as I’ve not tried to done this myself yet. Though if you want, I could give it a try and see if I could get you a copy, if the termux route turns out fruitless.