Failing to load PulseC (Android phone)

Hi,

We are facing this issue when trying to load pulse with a Unity 6 build for android phones. This is the runtime error we get (and obviously Pulse fails to work):

2025/12/15 13:59:43.837 10073 10123 Debug nativeloader Load /data/app/~~e9Gko5NAkr8KVPJWMRJjBA==/com.heizenrader.educationxr-fGVJYSOuNUcbp5OzpDS7Ew==/lib/arm64/libPulseC.so using class loader ns clns-9 (caller=/data/app/~~e9Gko5NAkr8KVPJWMRJjBA==/com.heizenrader.educationxr-fGVJYSOuNUcbp5OzpDS7Ew==/base.apk): dlopen failed: library “libc++_shared.so” not found: needed by /data/app/~~e9Gko5NAkr8KVPJWMRJjBA==/com.heizenrader.educationxr-fGVJYSOuNUcbp5OzpDS7Ew==/lib/arm64/libPulseC.so in namespace clns-9

2025/12/15 13:27:51.834 884 907 Error Unity DllNotFoundException: Unable to load DLL ‘PulseC’. Tried the load the following dynamic libraries: Unable to load dynamic library ‘PulseC’ because of 'External/il2cpp/builds/external/baselib/Source/Posix/Baselib_DynamicLibrary_PosixApi.inl.h(33):Baselib_DynamicLibrary_OpenUtf8: Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library “PulseC” not found
2025/12/15 13:27:51.834 884 907 Error Unity at Pulse.Unity.PulseUnityEngine.Allocate (System.Int32 model, System.String data_dir) [0x00000] in <00000000000000000000000000000000>:0
2025/12/15 13:27:51.834 884 907 Error Unity at Pulse.PulseEngineBase..ctor (Pulse.eModelType m, System.String data_dir) [0x00000] in <00000000000000000000000000000000>:0
2025/12/15 13:27:51.834 884 907 Error Unity at Caffeine.Viewer.Pulse.EdXR_PulseEngineDriver.Start () [0x00000] in <00000000000000000000000000000000>:0

Interestingly when making a build for Meta Quest (Android) with the same pulse version, everything seems to be working. Any ideas?

I assume it’d be some target platform mismatch

I provide 2 versions of PulseC for android, an arm64 and an armv7 version.

Are you targeting x86 or x86_64?

Just arm64 and armv7, I do see a warning when checking the arm64 one, not sure if it might have anything to do with it

dlopen failed: library “libc++_shared.so” not found: needed by /data/app/~~e9Gko5NAkr8KVPJWMRJjBA==/com.heizenrader.educationxr-fGVJYSOuNUcbp5OzpDS7Ew==/lib/arm64/libPulseC.so in namespace clns-9 ←not sure if this says anything else that might help

How big is that on disk?
I have starting statically linking to libC++ so its in the libPulseC.so rather than distribute the libc++_shared.so…removing the need for that file

image

On disk inside the Unity project it is the following

However once inside the apk the size seems reduced, maybe that is stripped out?

P.S: I did check inside the quest apk as well, where pulse actually works and the size is the same (11,851kb) so I am at a loss

I grabbed the libc++_shared.so from inside the quest apk (it was present in that apk for some reason) and put it next to the libPulseC.so in the phone Unity project and built and now its working, so maybe its missing that? (and something else was including that in the quest project?)

Well, glad that worked
I was trying to embed the C++ standard into PulseC so you did not have to do that

But I guess that did not work…