|
From: Fernando C. <fca...@gm...> - 2020-04-15 10:59:46
|
Just tested on Ubuntu 18.04 amd64; it works (I purposedly let it download the Android NDK): ~/src/liblo/libs/arm64-v8a$ file liblo.so liblo.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=e852fde4894cfd791b992aa97e714275c3f5ade1, stripped I can't test it within a real Android app, but it should work straight away. Fernando Il giorno mer 15 apr 2020 alle ore 12:35 Stephen Sinclair < rad...@gm...> ha scritto: > Hi Fernando and Mark, > > What do you think of this method? > > https://github.com/radarsat1/liblo/blob/master/build/android_build.sh > https://travis-ci.org/github/radarsat1/liblo/jobs/675237189 > > Basically, it downloads NDK 21, then runs automake to generate > config.h and lo.h, and then builds liblo using ndk-build. > > If this works for you, I'll update the README. > > regards, > Steve > > On Sat, Apr 11, 2020 at 12:13 AM Fernando Carello <fca...@gm...> > wrote: > > > > Mark, indeed I had to install 14b to have success (with OpenSSL too). > > The newer NDKs seem to miss some stuff: not only "true" GCC but some > includes too. > > Of course if you would succeed building with the newest NDK, that would > be absolutely great!! > > Best of luck. Very interested in your Android client app too! > > Fernando > > > > > > > > Il giorno sab 11 apr 2020 alle ore 00:07 Mark Hotchkiss < > Ma...@re...> ha scritto: > >> > >> Thanks so much Fernando. > >> > >> Today is a "paperwork" day, so I might get to testing that late > tonight. If not, then tomorrow. I have the latest Android SDK/NDK loaded, > so I will need to load r14b first. But I suspect that version was the magic > that I was missing. > >> > >> Of course, my goal will be to build it with the latest SDK/NDK version. > >> > >> mark > >> > >> -----Original Message----- > >> From: Fernando Carello [mailto:fca...@gm...] > >> Sent: Friday, April 10, 2020 2:35 PM > >> To: liblo development list > >> Subject: Re: [liblo] Android Anyone? > >> > >> Oh I need to clear that you have to build one version at a time. > >> So let's say you first build Android 32 bit library: "source > ./android_configure_armeabiv7.sh", make clean, configure, make etc. > >> Copy the resulting 32 bit .so somewhere safe (or it will be > overwritten). > >> Then build the 64 bit version: "source ./android_configure_arm64.sh", > make clean and so on. > >> > >> > >> Il giorno ven 10 apr 2020 alle ore 23:31 Fernando Carello < > fca...@gm...> ha scritto: > >>> > >>> Excellent. > >>> > >>> I uploaded the (configured and built) source tree on Dropbox for the > moment (I'm sure github would be better but I don't have an account and am > a total newbie vs git), along with the cross-compile configuring script I > use. > >>> > >>> 1. Scripts (note: I only tested the 32 bit version vs. liblo. Did not > try to build arm64 version of liblo): > >>> > https://www.dropbox.com/s/n82v53jbad6cwyb/android_crosscomp_configure_scripts.zip?dl=0 > >>> > >>> 2. Liblo source tree. I also copied liblo.so.7.4.1 in the root of the > source tree (from liblo-0.31/src/.libs) > >>> > https://www.dropbox.com/s/lmkp4jn97478pe4/liblo-0.31_Android_tree.tar.gz?dl=0 > >>> > >>> Rough procedure: > >>> Basically, you just need NDK v14b on Linux (I run Ubuntu 18.04): > >>> > https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip?hl=sr > >>> > >>> Unpack it somewhere; mine is simply in > >>> > >>> /home/fernando/android-ndk-r14b > >>> symlink: > >>> /home/fernando/android-ndk -> /home/fernando/android-ndk-r14b > >>> > >>> Now edit the scripts (see 1.) to suit your NDK relative path, as > indicated in the script source. > >>> Run the script (as current user, no need to sudo) using source > (example: "source ./android_configure_armeabiv7.sh"). > >>> The script will copy some files, create some links and set some > variables to enable cross-compiling for Android. > >>> Then move into liblo source, make clean, make distclean, run > "./configure --host=x86_64-pc-linux-gnu", run make. > >>> "testlo" errors notwithstanding, you should find liblo.7.4.1 under > "src/.libs" > >>> > >>> That's all: let me know if I can be of further help. > >>> > >>> All the best, > >>> Fernando > >>> > >>> Il giorno ven 10 apr 2020 alle ore 22:48 Mark Hotchkiss < > Ma...@re...> ha scritto: > >>>> > >>>> Fernando, that's not good news, it's GREAT news. > >>>> > >>>> I'm still perusing what you posted earlier, so there is still some > that I don't understand. But if you can let me know 1) what tools I need, > and 2) the rough procedure to build, I will test it here and try to refine > it. > >>>> > >>>> I can also look into any multicast issues on Android, and if > multicast is really not possible on Android, then conditionally leave it > out of testlo. Depending on how multicast behaves if you try to use it on > Android (can it crash the app?), we may need to update the source. > >>>> > >>>> What is the best way to exchange the build code? > >>>> > >>>> mark > >>>> > >>>> -----Original Message----- > >>>> From: Fernando Carello [mailto:fca...@gm...] > >>>> Sent: Friday, April 10, 2020 1:35 PM > >>>> To: liblo development list > >>>> Subject: Re: [liblo] Android Anyone? > >>>> > >>>> Good news: liblo.so.7.4.1 for Android was actually built, even if > testlo failed: > >>>> > >>>> -- > >>>> fernando@ubuntu:~/src/liblo-0.31/src/.libs$ file liblo.so.7.4.1 > >>>> liblo.so.7.4.1: ELF 32-bit LSB shared object, ARM, EABI5 version 1 > (SYSV), dynamically linked, interpreter /system/, with debug_info, not > stripped > >>>> -- > >>>> > >>>> I *think* that "testlo" wants to test the multicast interface, even > if "configure" stated there isn't one on Android. > >>>> So one could either fix testlo (preferred), or for the moment disable > the multicast interface test and call it a day. > >>>> > >>>> Mark, let me know if I can be of further help. > >>>> I could: > >>>> - provide the Android liblo.so library I just built (32 bit only at > the moment) > >>>> - provide (rough) directions to install and configure the needed > cross-compilation tools > >>>> > >>>> Fernando > >>>> > >>>> Il giorno ven 10 apr 2020 alle ore 22:09 Mark Hotchkiss < > Ma...@re...> ha scritto: > >>>>> > >>>>> Hi Fernando and Stephen, > >>>>> > >>>>> Much thanks for the quick replies, and also for the speedy > investigation into my problem. I will study those logs and links, and will > have some questions, I'm sure. > >>>>> > >>>>> When it comes Android, I am as new as it gets. I've only installed > the SDK and NDK last weekend, and didn't even consider using Android two > weeks ago. I have a steep learning curve, but that has never stopped me > before. > >>>>> > >>>>> Thanks again for the help. > >>>>> > >>>>> mark > >>>>> > >>>>> > >>>>> -----Original Message----- > >>>>> From: Stephen Sinclair [mailto:rad...@gm...] > >>>>> Sent: Friday, April 10, 2020 8:13 AM > >>>>> To: liblo development list > >>>>> Subject: Re: [liblo] Android Anyone? > >>>>> > >>>>> > >>>>> Hi Mark, > >>>>> > >>>>> Fernando is on the right track. Unfortunately I can't install > Android > >>>>> NDK and make it work for you at the moment, but in principle it > >>>>> should. I'd welcome any contribution to update the Android build > >>>>> procedure. > >>>>> > >>>>> I am not sure why --host is failing for you Fernando. I just tried > >>>>> building with the only cross-compiler I have installed on my system, > >>>>> MingW, and it configured and built just fine without trying to > execute > >>>>> the compiler output. Normally it should not do that as long as --host > >>>>> and --build are not the same: > >>>>> > >>>>> > https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html > >>>>> > >>>>> It looks like Travis has some Android NDK things available, so > perhaps > >>>>> I can get some CI configuration working to test an Android build: > >>>>> > >>>>> https://github.com/android/ndk-samples/blob/master/.travis.yml > >>>>> > >>>>> Steve > >>>>> > >>>>> On Fri, Apr 10, 2020 at 12:45 PM Fernando Carello < > fca...@gm...> wrote: > >>>>> > > >>>>> > Hi Mark, > >>>>> > just my 2 cents (newbie here). > >>>>> > > >>>>> > I set up an Android cross-compile environment on my Ubuntu, for > other reasons (building OpenSSL). > >>>>> > Using an old version of NDK (14b), I still have "true" GCC 4.9; I > can build for 32-bit and 64-bit Android ARM targets. > >>>>> > >>>>> > > >>>>> > Problem is, liblo's "configure" does not seem to like my > environment; it pretends to run a cross-compiled executable, and obviously > fails. > >>>>> > >>>>> > > >>>>> > Specifically: > >>>>> > > >>>>> > ---- > >>>>> > checking for a BSD-compatible install... /usr/bin/install -c > >>>>> > checking whether build environment is sane... yes > >>>>> > checking for a thread-safe mkdir -p... /bin/mkdir -p > >>>>> > checking for gawk... gawk > >>>>> > checking whether make sets $(MAKE)... yes > >>>>> > checking whether make supports nested variables... yes > >>>>> > checking whether to enable maintainer-specific portions of > Makefiles... no > >>>>> > checking whether make supports nested variables... (cached) yes > >>>>> > checking for gcc... > /home/fernando/src/../android/android-toolchain-armv7/bin/arm-linux-androideabi-gcc-4.9 > -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -ffunction-sections > -fno-strict-aliasing -finline-limit=64 > --sysroot=/home/fernando/src/../android/android-toolchain-armv7/sysroot/ > >>>>> > >>>>> > checking whether the C compiler works... yes > >>>>> > checking for C compiler default output file name... a.out > >>>>> > checking for suffix of executables... > >>>>> > checking whether we are cross compiling... configure: error: in > `/home/fernando/src/liblo-0.31': > >>>>> > configure: error: cannot run C compiled programs. > >>>>> > If you meant to cross compile, use `--host'. > >>>>> > See `config.log' for more details > >>>>> > > >>>>> > [ SO I PASSED --host TO ./CONFIGURE, BUT:] > >>>>> > > >>>>> > fernando@ubuntu:~/src/liblo-0.31$ ./configure --host > >>>>> > configure: error: missing argument to --host-alias > >>>>> > --- > >>>>> > > >>>>> > For completeness, my $CC: > >>>>> > > >>>>> > fernando@ubuntu:~/src/liblo-0.31$ echo $CC > >>>>> > > /home/fernando/src/../android/android-toolchain-armv7/bin/arm-linux-androideabi-gcc-4.9 > -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -ffunction-sections > -fno-strict-aliasing -finline-limit=64 > --sysroot=/home/fernando/src/../android/android-toolchain-armv7/sysroot/ > >>>>> > >>>>> > > >>>>> > My config.log is attached. > >>>>> > > >>>>> > Hope this helps. > >>>>> > Please note, I'm no way an Android expert! :) > >>>>> > > >>>>> > > >>>>> > Il giorno ven 10 apr 2020 alle ore 05:04 Mark Hotchkiss < > Ma...@re...> ha scritto: > >>>>> >> > >>>>> >> Hello Stephen, other developers, et.al. > >>>>> >> > >>>>> >> Thanks so much for keeping this project moving forward. I'm > hoping to contribute, although in a small way. > >>>>> >> > >>>>> >> I first used liblo in 2015 for an augmented-reality project. That > used it to communicate position data between Linux computers, and it worked > very well. > >>>>> > >>>>> >> > >>>>> >> Now I'm using it in a rather large project, where multiple > user-interface controllers are communicating with the main communications > processor in a robotic system. I'm using multiple ports (five, at the > moment), with each device containing multiple servers and also sending to > multiple servers. It is working well when all of the devices are Linux. > >>>>> > >>>>> >> > >>>>> >> But we need tablets for the UI devices, and the Linux tablet that > we tried fell on its face (BQ Aquaris M10), and we can find no others. So > we have resigned ourselves to having to use Android tablets. So the task > now entails porting the application and libraries to the Android SDK and > NDK. > >>>>> > >>>>> >> > >>>>> >> It appears that the Android build procedure included in the liblo > project hasn't worked since gcc was removed from the NDK some years back > (the SDK now uses clang). Searching the web, nobody ever asks about liblo > on Android. The last mention of Android on this mail list is six years ago. > So I have a few questions: > >>>>> > >>>>> >> > >>>>> >> 1) Has anybody ever used liblo on Android? > >>>>> >> 2) Are there any known reasons why it might not work? > >>>>> >> 3) If not, does anyone have any idea how to build liblo with the > current Android NDK? > >>>>> >> > >>>>> >> I am new to Android development, although I've been doing > embedded development for decades. Unless someone knows of a reason why it > won't work, I'm willing to build liblo for Android and create a new Android > build script (new, until an NDK update breaks it again). A minor > contribution, maybe, but a key step for our project. > >>>>> > >>>>> >> > >>>>> >> Last question: what do you think? > >>>>> >> > >>>>> >> Thanks, > >>>>> >> Mark > >>>>> >> > >>>>> >> ------------------- > >>>>> >> Mark Hotchkiss > >>>>> >> Louma Inc. > >>>>> >> 4351 Clark Avenue > >>>>> >> Long Beach, CA 90808 > >>>>> >> phone: (562) 230-1080 > >>>>> >> email: ma...@re... > >>>>> >> > >>>>> >> > >>>>> >> _______________________________________________ > >>>>> >> liblo-devel mailing list > >>>>> >> lib...@li... > >>>>> >> https://lists.sourceforge.net/lists/listinfo/liblo-devel > >>>>> > > >>>>> > _______________________________________________ > >>>>> > liblo-devel mailing list > >>>>> > lib...@li... > >>>>> > https://lists.sourceforge.net/lists/listinfo/liblo-devel > >>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> liblo-devel mailing list > >>>>> lib...@li... > >>>>> https://lists.sourceforge.net/lists/listinfo/liblo-devel > >>>>> > >>>>> _______________________________________________ > >>>>> liblo-devel mailing list > >>>>> lib...@li... > >>>>> https://lists.sourceforge.net/lists/listinfo/liblo-devel > >>>> > >>>> _______________________________________________ > >>>> liblo-devel mailing list > >>>> lib...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/liblo-devel > >> > >> _______________________________________________ > >> liblo-devel mailing list > >> lib...@li... > >> https://lists.sourceforge.net/lists/listinfo/liblo-devel > > > > _______________________________________________ > > liblo-devel mailing list > > lib...@li... > > https://lists.sourceforge.net/lists/listinfo/liblo-devel > > > _______________________________________________ > liblo-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/liblo-devel > |