fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Fluidsynth Android binaries - fluidsynth-2.2.4-android24


From: Leon Mortensen
Subject: Re: [fluid-dev] Fluidsynth Android binaries - fluidsynth-2.2.4-android24.zip has changed a lot compared to fluidsynth-2.2.0-android.zip
Date: Thu, 6 Jan 2022 09:12:05 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1

Thanks again for answering, it's really appreciated!

I found a solution by creating an Android Studio project inspired by this article "Creating a Fluidsynth Hello World App for Android" by Hector Ricardo

https://medium.com/swlh/creating-a-fluidsynth-hello-world-app-for-android-5e112454a8eb

First made my app work using fluidSynth version 2.2.0, then updating it to 2.2.4 by replacing the .so with identical names, adding the new 2.2.4 .so and reusing the NDK .so libraries from 2.2.0. I'll list them here

        libc++_shared
        libcharset
        libffi
        libiconv
        libintl
        libz
        preloadable_libiconv

And that worked for me. I didn't succeed in letting Android Studio directly or indirectly find the needed NDK.

Thanks, Leon

On 1/3/2022 6:06 PM, Tom M. wrote:
You are trying to integrate a prebuilt software, which was compiled
against the NDK. That means it has a dependency on the NDK. The main
problem is that you want to use those binaries while not providing the
NDK.

As I explained earlier, the solution cannot be to include (parts of)
the NDK with the fluidsynth prebuilt binaries. I don't know either, on
which particular NDK-libs fluidsynth depends on. And I don't know
about the NDK-libs dependencies among themselves either. Figuring that
out is kind of a Sisyphean task. Ofc, one could just include two or
three NDK libs as we did for the 2.2.0 binaries, but this is no
sustaining solution as there is no guarantee that it will still work
when compiled against a different NDK version.

Thinking of the Windows binaries: we neither include the Windows SDK
nor the C++ stdlib there either.

So, for the moment, if you want to go that custom way, I have no other
advice beyound the idea of figuring out which libs you need by using
ldd. I don't speak Androidish either, never seen those errors, sry.

I'm BCC'ing Atsushi, perhaps he has an idea of how to figure out all
dependency libraries (Atsushi: Here's the beginning of the
conversation: 
https://lists.nongnu.org/archive/html/fluid-dev/2021-12/msg00001.html
).

Tom

Mo., 3. Jan. 2022 - 14:19 Uhr, Leon Mortensen <leon@earmaster.com>:
Happy New Year everyone, and thanks for your reply, Tom.

Yes, I'm using Android API Level 30, but as s mentioned the App is not build 
using Android Studio, and there's no LD_LIBRARY_PATH to be set

I've tried following you advice to investigate what libraries are missing by 
running the ldd libfluidsynth.so from a shell.
I tried both a terminal emulator on the device, and the adb shell command with 
similar results. Note ldd seems to require an absolute path. I've copied the 
libfluidsynth files to the Documents folder on the device and then called

ldd /storage/emulated/0/documents/libfluidsynth.so

I get the following error message
error: couldn't map "/storage/emulated/0/Documents/libfluidsynth.so" segment 0: 
Permission denied

I'd really appreciate any help here. I have no idea how to proceed, and my 
Android skills in this area are very limited
Any chance someone could make a list of ndk library files needed, or the 
consider a version of the release binaries that includes the needed files like 
it was in the past?

Thanks, Leon

On 12/18/2021 12:08 AM, Tom M. wrote:

I assume you're at least using Android API Level 24.

In this case, yes, it could be due to missing .so libs. The
precompiled binaries from 2.2.0 basically included many libraries from
the NDK. I considered this bad practice, as I assumed that the NDK
will be available anyway in the target environment and this in turn
would conflict with our provided NDK libs. Esp when different NDK
versions are involved. Since I restructured our Android CI Build
Pipeline after 2.2.0, I changed this and only included the libs that
were created when cross compiling fluidsynth.

Because fluidsynth depends on the NDK r21 (since it was compiled
against it), I suggest you make this or a newer version available in
your target environment. To my knowledge, Android Studio would
actually ensure that the NDK is present. But you should be able do
this also manually, e.g. by setting LD_LIBRARY_PATH correctly.

You could also figure out which libraries are missing by getting a
shell via the Android emulator or somehow, and use e.g.

ldd libfluidsynth.so

to see what .so files fluidsynth depends on. E.g. you should see that
you'll need libc++_shared.so from the NDK. And then you can
cherry-pick only the required NDK libs for your custom setup.

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]