Using FluidSynth on Android crashes at runtime #1439
-
I'm trying to build an android app using FluidSynth, I managed to compile the project but when loading the native library, the app crashes with the following error: java.lang.UnsatisfiedLinkError: dlopen failed: library "libomp.so" not found This is my CMakeLists configuration
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
First of all, this is not a crash. It's a runtime error that results in an exception. Exceptions can be handled gracefully. Yes, fluidsynth has been compiled against openMP. This is correctly noted in the The error you see is caused by the runtime linker failing to discover the |
Beta Was this translation helpful? Give feedback.
First of all, this is not a crash. It's a runtime error that results in an exception. Exceptions can be handled gracefully.
Yes, fluidsynth has been compiled against openMP. This is correctly noted in the
cmake\fluidsynth\FluidSynthConfig.cmake
. You are not using this file. You are also not using the included pkg-config file. Instead, you have decided to import all of fluidsynth's dependencies manually. I would call this approach questionable.The error you see is caused by the runtime linker failing to discover the
libomp.so
file included in the Android NDK. Try settingLD_LIBRARY_PATH
accordingly or copy over the libs from the NDK into your runtime directory.