You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
(7) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(7) |
| 2006 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(17) |
Nov
(18) |
Dec
(1) |
| 2007 |
Jan
|
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(6) |
Dec
(1) |
| 2008 |
Jan
(17) |
Feb
(20) |
Mar
(8) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(5) |
Aug
(6) |
Sep
(9) |
Oct
(19) |
Nov
(4) |
Dec
(35) |
| 2009 |
Jan
(40) |
Feb
(16) |
Mar
(7) |
Apr
(6) |
May
|
Jun
(5) |
Jul
(5) |
Aug
(4) |
Sep
(1) |
Oct
(2) |
Nov
(15) |
Dec
(15) |
| 2010 |
Jan
(5) |
Feb
(20) |
Mar
(12) |
Apr
|
May
(2) |
Jun
(4) |
Jul
|
Aug
(11) |
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
|
| 2011 |
Jan
(8) |
Feb
(19) |
Mar
|
Apr
(12) |
May
(7) |
Jun
(8) |
Jul
|
Aug
(1) |
Sep
(21) |
Oct
(7) |
Nov
(4) |
Dec
|
| 2012 |
Jan
(3) |
Feb
(25) |
Mar
(8) |
Apr
(10) |
May
|
Jun
(14) |
Jul
(5) |
Aug
(12) |
Sep
(3) |
Oct
(14) |
Nov
|
Dec
|
| 2013 |
Jan
(10) |
Feb
(4) |
Mar
(10) |
Apr
(14) |
May
(6) |
Jun
(13) |
Jul
(37) |
Aug
(20) |
Sep
(11) |
Oct
(1) |
Nov
(34) |
Dec
|
| 2014 |
Jan
(8) |
Feb
(26) |
Mar
(24) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(28) |
Oct
(4) |
Nov
(4) |
Dec
(2) |
| 2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(13) |
Jul
|
Aug
(3) |
Sep
(8) |
Oct
(11) |
Nov
(16) |
Dec
|
| 2016 |
Jan
|
Feb
(6) |
Mar
|
Apr
(9) |
May
(23) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(3) |
Jun
|
Jul
(3) |
Aug
|
Sep
(8) |
Oct
|
Nov
|
Dec
(3) |
| 2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(31) |
May
|
Jun
|
Jul
|
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
(2) |
Feb
(2) |
Mar
(5) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
(1) |
10
(18) |
11
|
|
12
|
13
(1) |
14
(2) |
15
(3) |
16
(2) |
17
(4) |
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
|
28
|
29
|
30
|
|
|
|
From: Stephen S. <rad...@gm...> - 2020-04-17 11:39:17
|
Okay Android + Qt/QML, that's good to know.. I'll check out this use case. Thanks for the process notes. By the way I think you may not be registered for the mailing list, as I keep having to approve your posts. (Not a problem, just letting you know.) cheers, Steve On Fri, Apr 17, 2020 at 1:36 PM Mark Hotchkiss <Ma...@re...> wrote: > > Hi Stephen, > > As I said, I'm new to Android, but I have a good idea of how I'll structure our "real project". And in that structure, your build script is fine for "production". We may even be done with it. That's because I intend to include only the liblo.so library file in the real project. > > Loading a fresh copy of the NDK only added about two minutes to the build. That's not much of a price for the assurance that you have the correct, unmolested version. > > Your right in that I did not find "master". I attempted to build 0.31, and only now do I see that "master" branch in sourceforge. I'm not very familiar with sourceforge (although I should be). > > As far as the "standard" way to include liblo into the project, my understanding is that all we need to do is have a import statement for the library file in the MainActivity.class file. The library will be included in the .APK file, and installed if it isn't already. But, of course, we haven't gotten there yet, so I can't be certain. > > Then we call the library through a C++ wrapper that makes liblo appear as an object to Qt and QML. > > mark > > > > -----Original Message----- > From: Stephen Sinclair [mailto:rad...@gm...] > Sent: Friday, April 17, 2020 1:04 AM > To: liblo development list > Subject: Re: [liblo] Android Anyone? > > > Great that you had some success! > > Yes sorry I only made bare minimum effort to try to use the > already-installed "ndk-build" instead of downloading the NDK, if it's > already available on $PATH, but it probably doesn't work very > generally. For now I just wanted to make sure it passed some CI > testing at least. > > Suggestions welcome! Although, I wouldn't expect android_build.sh to > be "used in production", it's just supposed to be an example of how to > get it to work. And for CI testing. I assume in a "real project" > you'd install liblo as a part of your Android project build, or > something along those lines, not sure -- I haven't done Android > development in a few years. Maybe there is a more standard way by now > to distribute native-compiled libraries for Android Studio. > > The two errors you mention sound like you weren't working from > "master", not sure what happened there but again, if you have any > suggestions or bug reports feel free to post about them here or in > github issues. > > regards, > Steve > > On Fri, Apr 17, 2020 at 9:57 AM Mark Hotchkiss <Ma...@re...> wrote: > > > > Hi Stephen, > > > > Success. But not without some confusion (I'm easily confused). Here is how it went. Sorry if it's rather long. > > > > When I first ran the script, it did not detect my installed NDK and downloaded another copy. It surprised me, but after looking at why (that it expects for it to be in the liblo project directory), I decided that that was the best way to do it. My reasoning was 1) it will always use the version of the NDK that the build script expects, 2) other possibly incompatible configurations of the NDK that might exist on the system won't cause the build to fail, and 3) the build script will not be outdated by future releases of the NDK, as long as r21 remains available. And it doesn't take long to load, and only need to load the first time. Based on all that, I now think that Gradle is unnecessary. > > > > > Having said that, the build failed anyway. > > > > The error I had was that the "index" function was missing. Having seen your commit for that issue, I assumed that I was trying to build the wrong version. After a few tries with other versions, I could not get rid of the error, so I simply replaced the server.c file with your new one. Then that error was gone and I got the other error, the multicast_iface change. But by then I knew what to do. > > > > > So everything built fine and I now have a liblo.so file. I will link it in with an application tomorrow, and then try to plug it into the Qt framework. I will let you know how it goes. > > > > > Mucho thanks, > > mark > > > > > > > > -----Original Message----- > > From: Stephen Sinclair [mailto:rad...@gm...] > > Sent: Thursday, April 16, 2020 4:04 AM > > To: liblo development list > > Subject: Re: [liblo] Android Anyone? > > > > > > Ok I can look into gradle from the command line, I simply followed > > instructions I found for using the NDK from the command line which > > indicated ndk-build. I was quite happy to find something that didn't > > require also downloading Android Studio. Anyways, I'll see if I can > > find more up to date information, thanks. > > > > Steve > > > > On Thu, Apr 16, 2020 at 1:01 PM Mark Hotchkiss <Ma...@re...> wrote: > > > > > > Hi Stephen and Fernando, > > > > > > This is great ! > > > > > > I have not run it yet (I'm locked out of the lab for cleaning) but I looked at the script and I like it. The fact that it uses the most recent NDK and Clang satisfies my client's requirements (I think). If it used Gradle instead of ndk-build, it would be perfect. The NDK is moving toward Gradle, and some fear that ndk-build may soon be deprecated. I doubt it though, and if it becomes an issue I can make those changes. > > > > > > > > > Like Fernando, I'm running on Ubuntu 18.04 amd64, so our testing is rather narrow, but I see no reason that it wouldn't run on any distribution that runs the NDK. > > > > > > > > > Thanks so much for this. I will let you know the results in a few hours. > > > > > > mark > > > > > > -----Original Message----- > > > From: Fernando Carello [mailto:fca...@gm...] > > > Sent: Wednesday, April 15, 2020 3:59 AM > > > To: liblo development list > > > Subject: Re: [liblo] Android Anyone? > > > > > > 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 > > > > > > _______________________________________________ > > > 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 |
|
From: Mark H. <Ma...@re...> - 2020-04-17 09:33:56
|
Hi Stephen, As I said, I'm new to Android, but I have a good idea of how I'll structure our "real project". And in that structure, your build script is fine for "production". We may even be done with it. That's because I intend to include only the liblo.so library file in the real project. Loading a fresh copy of the NDK only added about two minutes to the build. That's not much of a price for the assurance that you have the correct, unmolested version. Your right in that I did not find "master". I attempted to build 0.31, and only now do I see that "master" branch in sourceforge. I'm not very familiar with sourceforge (although I should be). As far as the "standard" way to include liblo into the project, my understanding is that all we need to do is have a import statement for the library file in the MainActivity.class file. The library will be included in the .APK file, and installed if it isn't already. But, of course, we haven't gotten there yet, so I can't be certain. Then we call the library through a C++ wrapper that makes liblo appear as an object to Qt and QML. mark -----Original Message----- From: Stephen Sinclair [mailto:rad...@gm...] Sent: Friday, April 17, 2020 1:04 AM To: liblo development list Subject: Re: [liblo] Android Anyone? Great that you had some success! Yes sorry I only made bare minimum effort to try to use the already-installed "ndk-build" instead of downloading the NDK, if it's already available on $PATH, but it probably doesn't work very generally. For now I just wanted to make sure it passed some CI testing at least. Suggestions welcome! Although, I wouldn't expect android_build.sh to be "used in production", it's just supposed to be an example of how to get it to work. And for CI testing. I assume in a "real project" you'd install liblo as a part of your Android project build, or something along those lines, not sure -- I haven't done Android development in a few years. Maybe there is a more standard way by now to distribute native-compiled libraries for Android Studio. The two errors you mention sound like you weren't working from "master", not sure what happened there but again, if you have any suggestions or bug reports feel free to post about them here or in github issues. regards, Steve On Fri, Apr 17, 2020 at 9:57 AM Mark Hotchkiss <Ma...@re...> wrote: > > Hi Stephen, > > Success. But not without some confusion (I'm easily confused). Here is how it went. Sorry if it's rather long. > > When I first ran the script, it did not detect my installed NDK and downloaded another copy. It surprised me, but after looking at why (that it expects for it to be in the liblo project directory), I decided that that was the best way to do it. My reasoning was 1) it will always use the version of the NDK that the build script expects, 2) other possibly incompatible configurations of the NDK that might exist on the system won't cause the build to fail, and 3) the build script will not be outdated by future releases of the NDK, as long as r21 remains available. And it doesn't take long to load, and only need to load the first time. Based on all that, I now think that Gradle is unnecessary. > > Having said that, the build failed anyway. > > The error I had was that the "index" function was missing. Having seen your commit for that issue, I assumed that I was trying to build the wrong version. After a few tries with other versions, I could not get rid of the error, so I simply replaced the server.c file with your new one. Then that error was gone and I got the other error, the multicast_iface change. But by then I knew what to do. > > So everything built fine and I now have a liblo.so file. I will link it in with an application tomorrow, and then try to plug it into the Qt framework. I will let you know how it goes. > > Mucho thanks, > mark > > > > -----Original Message----- > From: Stephen Sinclair [mailto:rad...@gm...] > Sent: Thursday, April 16, 2020 4:04 AM > To: liblo development list > Subject: Re: [liblo] Android Anyone? > > > Ok I can look into gradle from the command line, I simply followed > instructions I found for using the NDK from the command line which > indicated ndk-build. I was quite happy to find something that didn't > require also downloading Android Studio. Anyways, I'll see if I can > find more up to date information, thanks. > > Steve > > On Thu, Apr 16, 2020 at 1:01 PM Mark Hotchkiss <Ma...@re...> wrote: > > > > Hi Stephen and Fernando, > > > > This is great ! > > > > I have not run it yet (I'm locked out of the lab for cleaning) but I looked at the script and I like it. The fact that it uses the most recent NDK and Clang satisfies my client's requirements (I think). If it used Gradle instead of ndk-build, it would be perfect. The NDK is moving toward Gradle, and some fear that ndk-build may soon be deprecated. I doubt it though, and if it becomes an issue I can make those changes. > > > > > Like Fernando, I'm running on Ubuntu 18.04 amd64, so our testing is rather narrow, but I see no reason that it wouldn't run on any distribution that runs the NDK. > > > > > Thanks so much for this. I will let you know the results in a few hours. > > > > mark > > > > -----Original Message----- > > From: Fernando Carello [mailto:fca...@gm...] > > Sent: Wednesday, April 15, 2020 3:59 AM > > To: liblo development list > > Subject: Re: [liblo] Android Anyone? > > > > 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_script s.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?h l=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-androide abi-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-androide abi-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 > > > > _______________________________________________ > > 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 |
|
From: Stephen S. <rad...@gm...> - 2020-04-17 08:04:46
|
Great that you had some success! Yes sorry I only made bare minimum effort to try to use the already-installed "ndk-build" instead of downloading the NDK, if it's already available on $PATH, but it probably doesn't work very generally. For now I just wanted to make sure it passed some CI testing at least. Suggestions welcome! Although, I wouldn't expect android_build.sh to be "used in production", it's just supposed to be an example of how to get it to work. And for CI testing. I assume in a "real project" you'd install liblo as a part of your Android project build, or something along those lines, not sure -- I haven't done Android development in a few years. Maybe there is a more standard way by now to distribute native-compiled libraries for Android Studio. The two errors you mention sound like you weren't working from "master", not sure what happened there but again, if you have any suggestions or bug reports feel free to post about them here or in github issues. regards, Steve On Fri, Apr 17, 2020 at 9:57 AM Mark Hotchkiss <Ma...@re...> wrote: > > Hi Stephen, > > Success. But not without some confusion (I'm easily confused). Here is how it went. Sorry if it's rather long. > > When I first ran the script, it did not detect my installed NDK and downloaded another copy. It surprised me, but after looking at why (that it expects for it to be in the liblo project directory), I decided that that was the best way to do it. My reasoning was 1) it will always use the version of the NDK that the build script expects, 2) other possibly incompatible configurations of the NDK that might exist on the system won't cause the build to fail, and 3) the build script will not be outdated by future releases of the NDK, as long as r21 remains available. And it doesn't take long to load, and only need to load the first time. Based on all that, I now think that Gradle is unnecessary. > > Having said that, the build failed anyway. > > The error I had was that the "index" function was missing. Having seen your commit for that issue, I assumed that I was trying to build the wrong version. After a few tries with other versions, I could not get rid of the error, so I simply replaced the server.c file with your new one. Then that error was gone and I got the other error, the multicast_iface change. But by then I knew what to do. > > So everything built fine and I now have a liblo.so file. I will link it in with an application tomorrow, and then try to plug it into the Qt framework. I will let you know how it goes. > > Mucho thanks, > mark > > > > -----Original Message----- > From: Stephen Sinclair [mailto:rad...@gm...] > Sent: Thursday, April 16, 2020 4:04 AM > To: liblo development list > Subject: Re: [liblo] Android Anyone? > > > Ok I can look into gradle from the command line, I simply followed > instructions I found for using the NDK from the command line which > indicated ndk-build. I was quite happy to find something that didn't > require also downloading Android Studio. Anyways, I'll see if I can > find more up to date information, thanks. > > Steve > > On Thu, Apr 16, 2020 at 1:01 PM Mark Hotchkiss <Ma...@re...> wrote: > > > > Hi Stephen and Fernando, > > > > This is great ! > > > > I have not run it yet (I'm locked out of the lab for cleaning) but I looked at the script and I like it. The fact that it uses the most recent NDK and Clang satisfies my client's requirements (I think). If it used Gradle instead of ndk-build, it would be perfect. The NDK is moving toward Gradle, and some fear that ndk-build may soon be deprecated. I doubt it though, and if it becomes an issue I can make those changes. > > > > > Like Fernando, I'm running on Ubuntu 18.04 amd64, so our testing is rather narrow, but I see no reason that it wouldn't run on any distribution that runs the NDK. > > > > > Thanks so much for this. I will let you know the results in a few hours. > > > > mark > > > > -----Original Message----- > > From: Fernando Carello [mailto:fca...@gm...] > > Sent: Wednesday, April 15, 2020 3:59 AM > > To: liblo development list > > Subject: Re: [liblo] Android Anyone? > > > > 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 > > > > _______________________________________________ > > 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 |
|
From: Mark H. <Ma...@re...> - 2020-04-17 07:52:12
|
Hi Stephen, Success. But not without some confusion (I'm easily confused). Here is how it went. Sorry if it's rather long. When I first ran the script, it did not detect my installed NDK and downloaded another copy. It surprised me, but after looking at why (that it expects for it to be in the liblo project directory), I decided that that was the best way to do it. My reasoning was 1) it will always use the version of the NDK that the build script expects, 2) other possibly incompatible configurations of the NDK that might exist on the system won't cause the build to fail, and 3) the build script will not be outdated by future releases of the NDK, as long as r21 remains available. And it doesn't take long to load, and only need to load the first time. Based on all that, I now think that Gradle is unnecessary. Having said that, the build failed anyway. The error I had was that the "index" function was missing. Having seen your commit for that issue, I assumed that I was trying to build the wrong version. After a few tries with other versions, I could not get rid of the error, so I simply replaced the server.c file with your new one. Then that error was gone and I got the other error, the multicast_iface change. But by then I knew what to do. So everything built fine and I now have a liblo.so file. I will link it in with an application tomorrow, and then try to plug it into the Qt framework. I will let you know how it goes. Mucho thanks, mark -----Original Message----- From: Stephen Sinclair [mailto:rad...@gm...] Sent: Thursday, April 16, 2020 4:04 AM To: liblo development list Subject: Re: [liblo] Android Anyone? Ok I can look into gradle from the command line, I simply followed instructions I found for using the NDK from the command line which indicated ndk-build. I was quite happy to find something that didn't require also downloading Android Studio. Anyways, I'll see if I can find more up to date information, thanks. Steve On Thu, Apr 16, 2020 at 1:01 PM Mark Hotchkiss <Ma...@re...> wrote: > > Hi Stephen and Fernando, > > This is great ! > > I have not run it yet (I'm locked out of the lab for cleaning) but I looked at the script and I like it. The fact that it uses the most recent NDK and Clang satisfies my client's requirements (I think). If it used Gradle instead of ndk-build, it would be perfect. The NDK is moving toward Gradle, and some fear that ndk-build may soon be deprecated. I doubt it though, and if it becomes an issue I can make those changes. > > Like Fernando, I'm running on Ubuntu 18.04 amd64, so our testing is rather narrow, but I see no reason that it wouldn't run on any distribution that runs the NDK. > > Thanks so much for this. I will let you know the results in a few hours. > > mark > > -----Original Message----- > From: Fernando Carello [mailto:fca...@gm...] > Sent: Wednesday, April 15, 2020 3:59 AM > To: liblo development list > Subject: Re: [liblo] Android Anyone? > > 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_script s.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?h l=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-androide abi-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-androide abi-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 > > _______________________________________________ > 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 |
|
From: Mark H. <Ma...@re...> - 2020-04-16 20:30:21
|
Hi Stephen, If it is more than a little effort, then don't bother. While ndk-build is still supported, we need not worry, and it seems that other things break with each release of the NDK (my experience from simply testing the NDK example programs). So we may be revisiting this script in the future. Building for the NDK seems to be a moving target. Thanks again, mark -----Original Message----- From: Stephen Sinclair [mailto:rad...@gm...] Sent: Thursday, April 16, 2020 4:04 AM To: liblo development list Subject: Re: [liblo] Android Anyone? Ok I can look into gradle from the command line, I simply followed instructions I found for using the NDK from the command line which indicated ndk-build. I was quite happy to find something that didn't require also downloading Android Studio. Anyways, I'll see if I can find more up to date information, thanks. Steve On Thu, Apr 16, 2020 at 1:01 PM Mark Hotchkiss <Ma...@re...> wrote: > > Hi Stephen and Fernando, > > This is great ! > > I have not run it yet (I'm locked out of the lab for cleaning) but I looked at the script and I like it. The fact that it uses the most recent NDK and Clang satisfies my client's requirements (I think). If it used Gradle instead of ndk-build, it would be perfect. The NDK is moving toward Gradle, and some fear that ndk-build may soon be deprecated. I doubt it though, and if it becomes an issue I can make those changes. > > Like Fernando, I'm running on Ubuntu 18.04 amd64, so our testing is rather narrow, but I see no reason that it wouldn't run on any distribution that runs the NDK. > > Thanks so much for this. I will let you know the results in a few hours. > > mark > > -----Original Message----- > From: Fernando Carello [mailto:fca...@gm...] > Sent: Wednesday, April 15, 2020 3:59 AM > To: liblo development list > Subject: Re: [liblo] Android Anyone? > > 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_script s.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?h l=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-androide abi-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-androide abi-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 > > _______________________________________________ > 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 |
|
From: Stephen S. <rad...@gm...> - 2020-04-16 11:04:00
|
Ok I can look into gradle from the command line, I simply followed instructions I found for using the NDK from the command line which indicated ndk-build. I was quite happy to find something that didn't require also downloading Android Studio. Anyways, I'll see if I can find more up to date information, thanks. Steve On Thu, Apr 16, 2020 at 1:01 PM Mark Hotchkiss <Ma...@re...> wrote: > > Hi Stephen and Fernando, > > This is great ! > > I have not run it yet (I'm locked out of the lab for cleaning) but I looked at the script and I like it. The fact that it uses the most recent NDK and Clang satisfies my client's requirements (I think). If it used Gradle instead of ndk-build, it would be perfect. The NDK is moving toward Gradle, and some fear that ndk-build may soon be deprecated. I doubt it though, and if it becomes an issue I can make those changes. > > Like Fernando, I'm running on Ubuntu 18.04 amd64, so our testing is rather narrow, but I see no reason that it wouldn't run on any distribution that runs the NDK. > > Thanks so much for this. I will let you know the results in a few hours. > > mark > > -----Original Message----- > From: Fernando Carello [mailto:fca...@gm...] > Sent: Wednesday, April 15, 2020 3:59 AM > To: liblo development list > Subject: Re: [liblo] Android Anyone? > > 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 > > _______________________________________________ > liblo-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/liblo-devel |
|
From: Mark H. <Ma...@re...> - 2020-04-15 20:57:28
|
Hi Stephen and Fernando, This is great ! I have not run it yet (I'm locked out of the lab for cleaning) but I looked at the script and I like it. The fact that it uses the most recent NDK and Clang satisfies my client's requirements (I think). If it used Gradle instead of ndk-build, it would be perfect. The NDK is moving toward Gradle, and some fear that ndk-build may soon be deprecated. I doubt it though, and if it becomes an issue I can make those changes. Like Fernando, I'm running on Ubuntu 18.04 amd64, so our testing is rather narrow, but I see no reason that it wouldn't run on any distribution that runs the NDK. Thanks so much for this. I will let you know the results in a few hours. mark -----Original Message----- From: Fernando Carello [mailto:fca...@gm...] Sent: Wednesday, April 15, 2020 3:59 AM To: liblo development list Subject: Re: [liblo] Android Anyone? 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... <mailto: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 <" rel="nofollow">https://github.com/radarsat1/liblo/blob/master/build/android_build.sh> https://travis-ci.org/github/radarsat1/liblo/jobs/675237189 <" rel="nofollow">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... <mailto: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... <mailto: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... <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... <mailto: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_script s.zip?dl=0 <https://www.dropbox.com/s/n82v53jbad6cwyb/android_crosscomp_configure_scrip ts.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 <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?h l=sr <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... <mailto: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... <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... <mailto: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... <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 <https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilatio n.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 <" rel="nofollow">https://github.com/android/ndk-samples/blob/master/.travis.yml> >>>>> >>>>> Steve >>>>> >>>>> On Fri, Apr 10, 2020 at 12:45 PM Fernando Carello < fca...@gm... <mailto: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-androide abi-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-androide abi-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... <mailto:Ma...@re...> > ha scritto: >>>>> >> >>>>> >> Hello Stephen, other developers, et.al <http://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... <mailto:ma...@re...> >>>>> >> >>>>> >> >>>>> >> _______________________________________________ >>>>> >> liblo-devel mailing list >>>>> >> lib...@li... <mailto:lib...@li...> >>>>> >> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> >>>>> > >>>>> > _______________________________________________ >>>>> > liblo-devel mailing list >>>>> > lib...@li... <mailto:lib...@li...> >>>>> > https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> >>>>> >>>>> >>>>> _______________________________________________ >>>>> liblo-devel mailing list >>>>> lib...@li... <mailto:lib...@li...> >>>>> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> >>>>> >>>>> _______________________________________________ >>>>> liblo-devel mailing list >>>>> lib...@li... <mailto:lib...@li...> >>>>> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> >>>> >>>> _______________________________________________ >>>> liblo-devel mailing list >>>> lib...@li... <mailto:lib...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> >> >> _______________________________________________ >> liblo-devel mailing list >> lib...@li... <mailto:lib...@li...> >> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> > > _______________________________________________ > liblo-devel mailing list > lib...@li... <mailto:lib...@li...> > https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> _______________________________________________ liblo-devel mailing list lib...@li... <mailto:lib...@li...> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> |
|
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 > |
|
From: Stephen S. <rad...@gm...> - 2020-04-15 10:35:36
|
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 |
|
From: Fernando C. <fca...@gm...> - 2020-04-14 11:20:20
|
Thanks Stephen, much nicer explanation for newbies like me! Regards, Fernando Il giorno mar 14 apr 2020 alle ore 12:28 Stephen Sinclair < rad...@gm...> ha scritto: > Good to hear! > > I can see how the documentation was lacking in this respect as you > point out in the original post. I have tried to clarify the > explanation here: > > > https://github.com/radarsat1/liblo/commit/700c59910e66e9f50e580e0335432b5a6d9b8794 > > regards, > Steve > > On Mon, Apr 13, 2020 at 1:51 PM Fernando Carello <fca...@gm...> > wrote: > > > > Thanks for all the suggestions: taking the TCP Echo Server example as a > reference, I was able to write a simple C client for ZynAddSubFx, with > reply management. > > > > All the best, > > Fernando > > > > Il giorno sab 11 apr 2020 alle ore 00:13 Mark Hotchkiss < > Ma...@re...> ha scritto: > >> > >> Hi Fernando, > >> > >> I'm doing paperwork today, so I haven't yet seen that echo server > example. "lo_send_message_from()" and "lo_message_get_source()" are > functions that I am not familiar with, so maybe I've been not using the > best method. My approach was rather "brute force". > >> > >> I will let you know what I find soon. > >> > >> mark > >> > >> -----Original Message----- > >> From: Fernando Carello [mailto:fca...@gm...] > >> Sent: Friday, April 10, 2020 2:58 PM > >> To: liblo development list > >> Subject: Re: [liblo] Liblo client: how to receive replies from server? > >> > >> So let's see if I understood anything (I seem to be denser than usual > these days!) > >> > >> Instead of simply creating a client which sends OSC messages to Zyn, I > actually create a server, on a different UDP port vs. Zyn > >> I can still send messages to Zyn as if I wrote a simple client, by > using "lo_send_message_from()" instead of "lo_send()" > >> When Zyn replies, my server thread will catch the reply and behave > accordingly (I can report back to the user interface etc.). > >> Sound ingenious, if a bit tricky! > >> I suppose a simpler reply-catching mechanism in the Liblo HighLevel API > is not even planned? > >> > >> Many thanks for the support! > >> Fernando > >> > >> > >> > >> Il giorno ven 10 apr 2020 alle ore 22:24 Mark Hotchkiss < > Ma...@re...> ha scritto: > >>> > >>> Hello Stephen and Fernando, > >>> > >>> I'm still a bit confused about setting up a client *and* a server on > the same port > >>> Is that even possible on the same port? My experience is that, from a > single network interface, you can only have one task listening on a > particular port. That's why I use so many ports (they're cheap). I will > check-out that echo server example as well, however. > >>> > >>> As you see in the echo handler in that program, the answer is > basically calling lo_message_get_source() in the handler. > >>> Wow. I did not know about that function (or maybe I simply forgot). I > use broadcasts and OSC messages that exchange IP addresses to configure the > OSC network (multi-subnet broadcasts work well in liblo). This might > simplify my code. > >>> > >>> Thanks again, Stephen and Fernando. > >>> mark > >>> > >>> > >>> -----Original Message----- > >>> From: Fernando Carello [mailto:fca...@gm...] > >>> Sent: Friday, April 10, 2020 9:38 AM > >>> To: liblo development list > >>> Subject: Re: [liblo] Liblo client: how to receive replies from server? > >>> > >>> Hello Stephen, > >>> > >>> thanks for the head up; I'm still a bit confused about setting up a > client *and* a server on the same port, but I'll study the echo server > example to my best. > >>> > >>> Fernando > >>> > >>> Il giorno ven 10 apr 2020 alle ore 17:05 Stephen Sinclair < > rad...@gm...> ha scritto: > >>>> > >>>> Hi Fernando, > >>>> > >>>> Can you say if the TCP echo server example clarifies anything for you? > >>>> > >>>> http://liblo.sourceforge.net/examples/example_tcp_echo_server.c.html > >>>> > >>>> As you see in the echo handler in that program, the answer is > >>>> basically calling lo_message_get_source() in the handler. > >>>> > >>>> Try changing LO_TCP to LO_UDP in that example, it should still work. > >>>> > >>>> You can find it here in ZynAddSubFx: > >>>> > https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare.cpp#L104 > >>>> > >>>> Steve > >>>> > >>>> On Fri, Apr 10, 2020 at 10:34 AM Fernando Carello <fca...@gm...> > wrote: > >>>> > > >>>> > Hello Mark and thanks a lot for your support. > >>>> > > >>>> > From what I've gathered, my client application should act both as a > client and as a server (to catch replies). > >>>> > What I can't seem to grasp, is how the "true" OSC server (which is > ZynAddSubFx by the way; I did not write it) knows that the reply should go > to my server (instead of my client). > >>>> > > >>>> > I mean: > >>>> > > >>>> > MyClient: lo_send(get_master_volume) to Zyn, (at localhost port > 7777) > >>>> > MyServer: waiting for reply on port...? > >>>> > Zyn: reply(Master Volume = 87) to...? > >>>> > > >>>> > Sorry, I understand it's quite dumb a question...! Didn't find much > docs about this reply catching mechanism. > >>>> > > >>>> > Thanks again, > >>>> > Fernando > >>>> > > >>>> > > >>>> > Il giorno ven 10 apr 2020 alle ore 07:48 Mark Hotchkiss < > Ma...@re...> ha scritto: > >>>> >> > >>>> >> Hi Fernando, > >>>> >> > >>>> >> Since I subscribed to this list after you posted your question, I > never received it by email, so I'm not sure I'm responding correctly. I > suspect it will end-up as a new thread, rather than added to your thread. I > hope you receive it. > >>>> >> > >>>> >> Now my response: > >>>> >> > >>>> >> OSC creates unidirectional messages: from a client to a server. > There isn't an explicit mechanism for a "reply" to a message. That needs to > be implemented as an independent connection. > >>>> >> > >>>> >> Specifically for your use case: > >>>> >> I may ask the server which is the current master volume and expect > an integer value in return. > >>>> >> When "I" (app1) sends the request, using lo_send(), to the > "server" (app2), it uses the server's port address that app1 specified with > lo_address_new(). App2 has reserved that port when it created its server > with lo_server_thread_new(), so any traffic on that port will only go to > app2. That port cannot be used for replies. > >>>> >> > >>>> >> If app2 (the server) needs to send a reply to app1, then app1 will > need to create its own server with lo_server_thread_new(), with a different > port address. App2 will need to specify a lo_address to that port with > lo_address_new(). In other words, you need two ports, one in each direction. > >>>> >> > >>>> >> I use five ports, with the main "Server" accepting requests on > port X, the replies going out on port X+1, the server receiving maintenance > messages on port X+2, it replying to those on port X+3, and it broadcasts > status messages on port X+4. Here are a couple of address patterns: > >>>> >> > >>>> >> Request to the server: /request/execute/ <function index> > >>>> >> and it replies: /reply/execute/ACK > >>>> >> > >>>> >> I use a number of lo_server_thread_add_method() calls to route the > messages to the various callback functions. > >>>> >> > >>>> >> I hope this helps. > >>>> >> > >>>> >> mark > >>>> >> _______________________________________________ > >>>> >> 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 > |
|
From: Stephen S. <rad...@gm...> - 2020-04-14 10:28:51
|
Good to hear! I can see how the documentation was lacking in this respect as you point out in the original post. I have tried to clarify the explanation here: https://github.com/radarsat1/liblo/commit/700c59910e66e9f50e580e0335432b5a6d9b8794 regards, Steve On Mon, Apr 13, 2020 at 1:51 PM Fernando Carello <fca...@gm...> wrote: > > Thanks for all the suggestions: taking the TCP Echo Server example as a reference, I was able to write a simple C client for ZynAddSubFx, with reply management. > > All the best, > Fernando > > Il giorno sab 11 apr 2020 alle ore 00:13 Mark Hotchkiss <Ma...@re...> ha scritto: >> >> Hi Fernando, >> >> I'm doing paperwork today, so I haven't yet seen that echo server example. "lo_send_message_from()" and "lo_message_get_source()" are functions that I am not familiar with, so maybe I've been not using the best method. My approach was rather "brute force". >> >> I will let you know what I find soon. >> >> mark >> >> -----Original Message----- >> From: Fernando Carello [mailto:fca...@gm...] >> Sent: Friday, April 10, 2020 2:58 PM >> To: liblo development list >> Subject: Re: [liblo] Liblo client: how to receive replies from server? >> >> So let's see if I understood anything (I seem to be denser than usual these days!) >> >> Instead of simply creating a client which sends OSC messages to Zyn, I actually create a server, on a different UDP port vs. Zyn >> I can still send messages to Zyn as if I wrote a simple client, by using "lo_send_message_from()" instead of "lo_send()" >> When Zyn replies, my server thread will catch the reply and behave accordingly (I can report back to the user interface etc.). >> Sound ingenious, if a bit tricky! >> I suppose a simpler reply-catching mechanism in the Liblo HighLevel API is not even planned? >> >> Many thanks for the support! >> Fernando >> >> >> >> Il giorno ven 10 apr 2020 alle ore 22:24 Mark Hotchkiss <Ma...@re...> ha scritto: >>> >>> Hello Stephen and Fernando, >>> >>> I'm still a bit confused about setting up a client *and* a server on the same port >>> Is that even possible on the same port? My experience is that, from a single network interface, you can only have one task listening on a particular port. That's why I use so many ports (they're cheap). I will check-out that echo server example as well, however. >>> >>> As you see in the echo handler in that program, the answer is basically calling lo_message_get_source() in the handler. >>> Wow. I did not know about that function (or maybe I simply forgot). I use broadcasts and OSC messages that exchange IP addresses to configure the OSC network (multi-subnet broadcasts work well in liblo). This might simplify my code. >>> >>> Thanks again, Stephen and Fernando. >>> mark >>> >>> >>> -----Original Message----- >>> From: Fernando Carello [mailto:fca...@gm...] >>> Sent: Friday, April 10, 2020 9:38 AM >>> To: liblo development list >>> Subject: Re: [liblo] Liblo client: how to receive replies from server? >>> >>> Hello Stephen, >>> >>> thanks for the head up; I'm still a bit confused about setting up a client *and* a server on the same port, but I'll study the echo server example to my best. >>> >>> Fernando >>> >>> Il giorno ven 10 apr 2020 alle ore 17:05 Stephen Sinclair <rad...@gm...> ha scritto: >>>> >>>> Hi Fernando, >>>> >>>> Can you say if the TCP echo server example clarifies anything for you? >>>> >>>> http://liblo.sourceforge.net/examples/example_tcp_echo_server.c.html >>>> >>>> As you see in the echo handler in that program, the answer is >>>> basically calling lo_message_get_source() in the handler. >>>> >>>> Try changing LO_TCP to LO_UDP in that example, it should still work. >>>> >>>> You can find it here in ZynAddSubFx: >>>> https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare.cpp#L104 >>>> >>>> Steve >>>> >>>> On Fri, Apr 10, 2020 at 10:34 AM Fernando Carello <fca...@gm...> wrote: >>>> > >>>> > Hello Mark and thanks a lot for your support. >>>> > >>>> > From what I've gathered, my client application should act both as a client and as a server (to catch replies). >>>> > What I can't seem to grasp, is how the "true" OSC server (which is ZynAddSubFx by the way; I did not write it) knows that the reply should go to my server (instead of my client). >>>> > >>>> > I mean: >>>> > >>>> > MyClient: lo_send(get_master_volume) to Zyn, (at localhost port 7777) >>>> > MyServer: waiting for reply on port...? >>>> > Zyn: reply(Master Volume = 87) to...? >>>> > >>>> > Sorry, I understand it's quite dumb a question...! Didn't find much docs about this reply catching mechanism. >>>> > >>>> > Thanks again, >>>> > Fernando >>>> > >>>> > >>>> > Il giorno ven 10 apr 2020 alle ore 07:48 Mark Hotchkiss <Ma...@re...> ha scritto: >>>> >> >>>> >> Hi Fernando, >>>> >> >>>> >> Since I subscribed to this list after you posted your question, I never received it by email, so I'm not sure I'm responding correctly. I suspect it will end-up as a new thread, rather than added to your thread. I hope you receive it. >>>> >> >>>> >> Now my response: >>>> >> >>>> >> OSC creates unidirectional messages: from a client to a server. There isn't an explicit mechanism for a "reply" to a message. That needs to be implemented as an independent connection. >>>> >> >>>> >> Specifically for your use case: >>>> >> I may ask the server which is the current master volume and expect an integer value in return. >>>> >> When "I" (app1) sends the request, using lo_send(), to the "server" (app2), it uses the server's port address that app1 specified with lo_address_new(). App2 has reserved that port when it created its server with lo_server_thread_new(), so any traffic on that port will only go to app2. That port cannot be used for replies. >>>> >> >>>> >> If app2 (the server) needs to send a reply to app1, then app1 will need to create its own server with lo_server_thread_new(), with a different port address. App2 will need to specify a lo_address to that port with lo_address_new(). In other words, you need two ports, one in each direction. >>>> >> >>>> >> I use five ports, with the main "Server" accepting requests on port X, the replies going out on port X+1, the server receiving maintenance messages on port X+2, it replying to those on port X+3, and it broadcasts status messages on port X+4. Here are a couple of address patterns: >>>> >> >>>> >> Request to the server: /request/execute/ <function index> >>>> >> and it replies: /reply/execute/ACK >>>> >> >>>> >> I use a number of lo_server_thread_add_method() calls to route the messages to the various callback functions. >>>> >> >>>> >> I hope this helps. >>>> >> >>>> >> mark >>>> >> _______________________________________________ >>>> >> 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 |
|
From: Fernando C. <fca...@gm...> - 2020-04-13 11:51:18
|
Thanks for all the suggestions: taking the TCP Echo Server example as a reference, I was able to write a simple C client for ZynAddSubFx, with reply management. All the best, Fernando Il giorno sab 11 apr 2020 alle ore 00:13 Mark Hotchkiss <Ma...@re...> ha scritto: > Hi Fernando, > > I'm doing paperwork today, so I haven't yet seen that echo server example. > "lo_send_message_from()" and "lo_message_get_source()" are functions that > I am not familiar with, so maybe I've been not using the best method. My > approach was rather "brute force". > > I will let you know what I find soon. > > mark > > -----Original Message----- > *From:* Fernando Carello [mailto:fca...@gm...] > *Sent:* Friday, April 10, 2020 2:58 PM > *To:* liblo development list > *Subject:* Re: [liblo] Liblo client: how to receive replies from server? > > So let's see if I understood anything (I seem to be denser than usual > these days!) > > Instead of simply creating a client which sends OSC messages to Zyn, I > actually create a server, on a different UDP port vs. Zyn > I can still send messages to Zyn as if I wrote a simple client, by using > "lo_send_message_from()" instead of "lo_send()" > When Zyn replies, my server thread will catch the reply and behave > accordingly (I can report back to the user interface etc.). > Sound ingenious, if a bit tricky! > I suppose a simpler reply-catching mechanism in the Liblo HighLevel API is > not even planned? > > Many thanks for the support! > Fernando > > > > Il giorno ven 10 apr 2020 alle ore 22:24 Mark Hotchkiss < > Ma...@re...> ha scritto: > >> Hello Stephen and Fernando, >> >> I'm still a bit confused about setting up a client *and* a server on the >> same port >> Is that even possible on the same port? My experience is that, from a >> single network interface, you can only have one task listening on a >> particular port. That's why I use so many ports (they're cheap). I will >> check-out that echo server example as well, however. >> >> As you see in the echo handler in that program, the answer is basically >> calling *lo_message_get_source()* in the handler. >> Wow. I did not know about that function (or maybe I simply forgot). I use >> broadcasts and OSC messages that exchange IP addresses to configure the OSC >> network (multi-subnet broadcasts work well in liblo). This might simplify >> my code. >> >> Thanks again, Stephen and Fernando. >> mark >> >> >> -----Original Message----- >> *From:* Fernando Carello [mailto:fca...@gm...] >> *Sent:* Friday, April 10, 2020 9:38 AM >> *To:* liblo development list >> *Subject:* Re: [liblo] Liblo client: how to receive replies from server? >> >> Hello Stephen, >> >> thanks for the head up; I'm still a bit confused about setting up a >> client *and* a server on the same port, but I'll study the echo server >> example to my best. >> >> Fernando >> >> Il giorno ven 10 apr 2020 alle ore 17:05 Stephen Sinclair < >> rad...@gm...> ha scritto: >> >>> Hi Fernando, >>> >>> Can you say if the TCP echo server example clarifies anything for you? >>> >>> http://liblo.sourceforge.net/examples/example_tcp_echo_server.c.html >>> >>> As you see in the echo handler in that program, the answer is >>> basically calling lo_message_get_source() in the handler. >>> >>> Try changing LO_TCP to LO_UDP in that example, it should still work. >>> >>> You can find it here in ZynAddSubFx: >>> >>> https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare.cpp#L104 >>> >>> Steve >>> >>> On Fri, Apr 10, 2020 at 10:34 AM Fernando Carello <fca...@gm...> >>> wrote: >>> > >>> > Hello Mark and thanks a lot for your support. >>> > >>> > From what I've gathered, my client application should act both as a >>> client and as a server (to catch replies). >>> > What I can't seem to grasp, is how the "true" OSC server (which is >>> ZynAddSubFx by the way; I did not write it) knows that the reply should go >>> to my server (instead of my client). >>> > >>> > I mean: >>> > >>> > MyClient: lo_send(get_master_volume) to Zyn, (at localhost port 7777) >>> > MyServer: waiting for reply on port...? >>> > Zyn: reply(Master Volume = 87) to...? >>> > >>> > Sorry, I understand it's quite dumb a question...! Didn't find much >>> docs about this reply catching mechanism. >>> > >>> > Thanks again, >>> > Fernando >>> > >>> > >>> > Il giorno ven 10 apr 2020 alle ore 07:48 Mark Hotchkiss < >>> Ma...@re...> ha scritto: >>> >> >>> >> Hi Fernando, >>> >> >>> >> Since I subscribed to this list after you posted your question, I >>> never received it by email, so I'm not sure I'm responding correctly. I >>> suspect it will end-up as a new thread, rather than added to your thread. I >>> hope you receive it. >>> >> >>> >> Now my response: >>> >> >>> >> OSC creates unidirectional messages: from a client to a server. There >>> isn't an explicit mechanism for a "reply" to a message. That needs to be >>> implemented as an independent connection. >>> >> >>> >> Specifically for your use case: >>> >> I may ask the server which is the current master volume and expect an >>> integer value in return. >>> >> When "I" (app1) sends the request, using lo_send(), to the "server" >>> (app2), it uses the server's port address that app1 specified with >>> lo_address_new(). App2 has reserved that port when it created its server >>> with lo_server_thread_new(), so any traffic on that port will only go to >>> app2. That port cannot be used for replies. >>> >> >>> >> If app2 (the server) needs to send a reply to app1, then app1 will >>> need to create its own server with lo_server_thread_new(), with a different >>> port address. App2 will need to specify a lo_address to that port with >>> lo_address_new(). In other words, you need two ports, one in each direction. >>> >> >>> >> I use five ports, with the main "Server" accepting requests on port >>> X, the replies going out on port X+1, the server receiving maintenance >>> messages on port X+2, it replying to those on port X+3, and it broadcasts >>> status messages on port X+4. Here are a couple of address patterns: >>> >> >>> >> Request to the server: /request/execute/ <function index> >>> >> and it replies: /reply/execute/ACK >>> >> >>> >> I use a number of lo_server_thread_add_method() calls to route the >>> messages to the various callback functions. >>> >> >>> >> I hope this helps. >>> >> >>> >> mark >>> >> _______________________________________________ >>> >> 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 > |
|
From: Fernando C. <fca...@gm...> - 2020-04-10 22:13:21
|
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... >>>> <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 > |
|
From: Mark H. <Ma...@re...> - 2020-04-10 22:12:56
|
Hi Fernando, I'm doing paperwork today, so I haven't yet seen that echo server example. "lo_send_message_from()" and "lo_message_get_source()" are functions that I am not familiar with, so maybe I've been not using the best method. My approach was rather "brute force". I will let you know what I find soon. mark -----Original Message----- From: Fernando Carello [mailto:fca...@gm...] Sent: Friday, April 10, 2020 2:58 PM To: liblo development list Subject: Re: [liblo] Liblo client: how to receive replies from server? So let's see if I understood anything (I seem to be denser than usual these days!) Instead of simply creating a client which sends OSC messages to Zyn, I actually create a server, on a different UDP port vs. Zyn I can still send messages to Zyn as if I wrote a simple client, by using "lo_send_message_from()" instead of "lo_send()" When Zyn replies, my server thread will catch the reply and behave accordingly (I can report back to the user interface etc.). Sound ingenious, if a bit tricky! I suppose a simpler reply-catching mechanism in the Liblo HighLevel API is not even planned? Many thanks for the support! Fernando Il giorno ven 10 apr 2020 alle ore 22:24 Mark Hotchkiss < Ma...@re... <mailto:Ma...@re...> > ha scritto: Hello Stephen and Fernando, I'm still a bit confused about setting up a client *and* a server on the same port Is that even possible on the same port? My experience is that, from a single network interface, you can only have one task listening on a particular port. That's why I use so many ports (they're cheap). I will check-out that echo server example as well, however. As you see in the echo handler in that program, the answer is basically calling lo_message_get_source() in the handler. Wow. I did not know about that function (or maybe I simply forgot). I use broadcasts and OSC messages that exchange IP addresses to configure the OSC network (multi-subnet broadcasts work well in liblo). This might simplify my code. Thanks again, Stephen and Fernando. mark -----Original Message----- From: Fernando Carello [mailto: fca...@gm... <mailto:fca...@gm...> ] Sent: Friday, April 10, 2020 9:38 AM To: liblo development list Subject: Re: [liblo] Liblo client: how to receive replies from server? Hello Stephen, thanks for the head up; I'm still a bit confused about setting up a client *and* a server on the same port, but I'll study the echo server example to my best. Fernando Il giorno ven 10 apr 2020 alle ore 17:05 Stephen Sinclair < rad...@gm... <mailto:rad...@gm...> > ha scritto: Hi Fernando, Can you say if the TCP echo server example clarifies anything for you? http://liblo.sourceforge.net/examples/example_tcp_echo_server.c.html <" rel="nofollow">http://liblo.sourceforge.net/examples/example_tcp_echo_server.c.html> As you see in the echo handler in that program, the answer is basically calling lo_message_get_source() in the handler. Try changing LO_TCP to LO_UDP in that example, it should still work. You can find it here in ZynAddSubFx: https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare.c pp#L104 <https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare. cpp#L104> Steve On Fri, Apr 10, 2020 at 10:34 AM Fernando Carello < fca...@gm... <mailto:fca...@gm...> > wrote: > > Hello Mark and thanks a lot for your support. > > From what I've gathered, my client application should act both as a client and as a server (to catch replies). > What I can't seem to grasp, is how the "true" OSC server (which is ZynAddSubFx by the way; I did not write it) knows that the reply should go to my server (instead of my client). > > I mean: > > MyClient: lo_send(get_master_volume) to Zyn, (at localhost port 7777) > MyServer: waiting for reply on port...? > Zyn: reply(Master Volume = 87) to...? > > Sorry, I understand it's quite dumb a question...! Didn't find much docs about this reply catching mechanism. > > Thanks again, > Fernando > > > Il giorno ven 10 apr 2020 alle ore 07:48 Mark Hotchkiss < Ma...@re... <mailto:Ma...@re...> > ha scritto: >> >> Hi Fernando, >> >> Since I subscribed to this list after you posted your question, I never received it by email, so I'm not sure I'm responding correctly. I suspect it will end-up as a new thread, rather than added to your thread. I hope you receive it. >> >> Now my response: >> >> OSC creates unidirectional messages: from a client to a server. There isn't an explicit mechanism for a "reply" to a message. That needs to be implemented as an independent connection. >> >> Specifically for your use case: >> I may ask the server which is the current master volume and expect an integer value in return. >> When "I" (app1) sends the request, using lo_send(), to the "server" (app2), it uses the server's port address that app1 specified with lo_address_new(). App2 has reserved that port when it created its server with lo_server_thread_new(), so any traffic on that port will only go to app2. That port cannot be used for replies. >> >> If app2 (the server) needs to send a reply to app1, then app1 will need to create its own server with lo_server_thread_new(), with a different port address. App2 will need to specify a lo_address to that port with lo_address_new(). In other words, you need two ports, one in each direction. >> >> I use five ports, with the main "Server" accepting requests on port X, the replies going out on port X+1, the server receiving maintenance messages on port X+2, it replying to those on port X+3, and it broadcasts status messages on port X+4. Here are a couple of address patterns: >> >> Request to the server: /request/execute/ <function index> >> and it replies: /reply/execute/ACK >> >> I use a number of lo_server_thread_add_method() calls to route the messages to the various callback functions. >> >> I hope this helps. >> >> mark >> _______________________________________________ >> liblo-devel mailing list >> lib...@li... <mailto:lib...@li...> >> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> > > _______________________________________________ > liblo-devel mailing list > lib...@li... <mailto:lib...@li...> > https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> _______________________________________________ liblo-devel mailing list lib...@li... <mailto:lib...@li...> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> _______________________________________________ liblo-devel mailing list lib...@li... <mailto:lib...@li...> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> |
|
From: Mark H. <Ma...@re...> - 2020-04-10 22:07:51
|
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... <mailto: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_script s.zip?dl=0 <https://www.dropbox.com/s/n82v53jbad6cwyb/android_crosscomp_configure_scrip ts.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 <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?h l=sr <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... <mailto: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... <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... <mailto: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... <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 <https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilatio n.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 <" rel="nofollow">https://github.com/android/ndk-samples/blob/master/.travis.yml> Steve On Fri, Apr 10, 2020 at 12:45 PM Fernando Carello < fca...@gm... <mailto: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-androide abi-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-androide abi-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... <mailto:Ma...@re...> > ha scritto: >> >> Hello Stephen, other developers, et.al <http://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... <mailto:ma...@re...> >> >> >> _______________________________________________ >> liblo-devel mailing list >> lib...@li... <mailto:lib...@li...> >> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> > > _______________________________________________ > liblo-devel mailing list > lib...@li... <mailto:lib...@li...> > https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> _______________________________________________ liblo-devel mailing list lib...@li... <mailto:lib...@li...> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> _______________________________________________ liblo-devel mailing list lib...@li... <mailto:lib...@li...> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> _______________________________________________ liblo-devel mailing list lib...@li... <mailto:lib...@li...> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> |
|
From: Fernando C. <fca...@gm...> - 2020-04-10 21:57:56
|
So let's see if I understood anything (I seem to be denser than usual these days!) Instead of simply creating a client which sends OSC messages to Zyn, I actually create a server, on a different UDP port vs. Zyn I can still send messages to Zyn as if I wrote a simple client, by using "lo_send_message_from()" instead of "lo_send()" When Zyn replies, my server thread will catch the reply and behave accordingly (I can report back to the user interface etc.). Sound ingenious, if a bit tricky! I suppose a simpler reply-catching mechanism in the Liblo HighLevel API is not even planned? Many thanks for the support! Fernando Il giorno ven 10 apr 2020 alle ore 22:24 Mark Hotchkiss <Ma...@re...> ha scritto: > Hello Stephen and Fernando, > > I'm still a bit confused about setting up a client *and* a server on the > same port > Is that even possible on the same port? My experience is that, from a > single network interface, you can only have one task listening on a > particular port. That's why I use so many ports (they're cheap). I will > check-out that echo server example as well, however. > > As you see in the echo handler in that program, the answer is basically > calling *lo_message_get_source()* in the handler. > Wow. I did not know about that function (or maybe I simply forgot). I use > broadcasts and OSC messages that exchange IP addresses to configure the OSC > network (multi-subnet broadcasts work well in liblo). This might simplify > my code. > > Thanks again, Stephen and Fernando. > mark > > > -----Original Message----- > *From:* Fernando Carello [mailto:fca...@gm...] > *Sent:* Friday, April 10, 2020 9:38 AM > *To:* liblo development list > *Subject:* Re: [liblo] Liblo client: how to receive replies from server? > > Hello Stephen, > > thanks for the head up; I'm still a bit confused about setting up a client > *and* a server on the same port, but I'll study the echo server example to > my best. > > Fernando > > Il giorno ven 10 apr 2020 alle ore 17:05 Stephen Sinclair < > rad...@gm...> ha scritto: > >> Hi Fernando, >> >> Can you say if the TCP echo server example clarifies anything for you? >> >> http://liblo.sourceforge.net/examples/example_tcp_echo_server.c.html >> >> As you see in the echo handler in that program, the answer is >> basically calling lo_message_get_source() in the handler. >> >> Try changing LO_TCP to LO_UDP in that example, it should still work. >> >> You can find it here in ZynAddSubFx: >> >> https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare.cpp#L104 >> >> Steve >> >> On Fri, Apr 10, 2020 at 10:34 AM Fernando Carello <fca...@gm...> >> wrote: >> > >> > Hello Mark and thanks a lot for your support. >> > >> > From what I've gathered, my client application should act both as a >> client and as a server (to catch replies). >> > What I can't seem to grasp, is how the "true" OSC server (which is >> ZynAddSubFx by the way; I did not write it) knows that the reply should go >> to my server (instead of my client). >> > >> > I mean: >> > >> > MyClient: lo_send(get_master_volume) to Zyn, (at localhost port 7777) >> > MyServer: waiting for reply on port...? >> > Zyn: reply(Master Volume = 87) to...? >> > >> > Sorry, I understand it's quite dumb a question...! Didn't find much >> docs about this reply catching mechanism. >> > >> > Thanks again, >> > Fernando >> > >> > >> > Il giorno ven 10 apr 2020 alle ore 07:48 Mark Hotchkiss < >> Ma...@re...> ha scritto: >> >> >> >> Hi Fernando, >> >> >> >> Since I subscribed to this list after you posted your question, I >> never received it by email, so I'm not sure I'm responding correctly. I >> suspect it will end-up as a new thread, rather than added to your thread. I >> hope you receive it. >> >> >> >> Now my response: >> >> >> >> OSC creates unidirectional messages: from a client to a server. There >> isn't an explicit mechanism for a "reply" to a message. That needs to be >> implemented as an independent connection. >> >> >> >> Specifically for your use case: >> >> I may ask the server which is the current master volume and expect an >> integer value in return. >> >> When "I" (app1) sends the request, using lo_send(), to the "server" >> (app2), it uses the server's port address that app1 specified with >> lo_address_new(). App2 has reserved that port when it created its server >> with lo_server_thread_new(), so any traffic on that port will only go to >> app2. That port cannot be used for replies. >> >> >> >> If app2 (the server) needs to send a reply to app1, then app1 will >> need to create its own server with lo_server_thread_new(), with a different >> port address. App2 will need to specify a lo_address to that port with >> lo_address_new(). In other words, you need two ports, one in each direction. >> >> >> >> I use five ports, with the main "Server" accepting requests on port X, >> the replies going out on port X+1, the server receiving maintenance >> messages on port X+2, it replying to those on port X+3, and it broadcasts >> status messages on port X+4. Here are a couple of address patterns: >> >> >> >> Request to the server: /request/execute/ <function index> >> >> and it replies: /reply/execute/ACK >> >> >> >> I use a number of lo_server_thread_add_method() calls to route the >> messages to the various callback functions. >> >> >> >> I hope this helps. >> >> >> >> mark >> >> _______________________________________________ >> >> 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 > |
|
From: Fernando C. <fca...@gm...> - 2020-04-10 21:35:06
|
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... <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 >> > |
|
From: Fernando C. <fca...@gm...> - 2020-04-10 21:31:19
|
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... <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 > |
|
From: Mark H. <Ma...@re...> - 2020-04-10 20:48:53
|
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... <mailto: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... <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 <https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilatio n.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 <" rel="nofollow">https://github.com/android/ndk-samples/blob/master/.travis.yml> Steve On Fri, Apr 10, 2020 at 12:45 PM Fernando Carello < fca...@gm... <mailto: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-androide abi-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-androide abi-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... <mailto:Ma...@re...> > ha scritto: >> >> Hello Stephen, other developers, et.al <http://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... <mailto:ma...@re...> >> >> >> _______________________________________________ >> liblo-devel mailing list >> lib...@li... <mailto:lib...@li...> >> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> > > _______________________________________________ > liblo-devel mailing list > lib...@li... <mailto:lib...@li...> > https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> _______________________________________________ liblo-devel mailing list lib...@li... <mailto:lib...@li...> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> _______________________________________________ liblo-devel mailing list lib...@li... <mailto:lib...@li...> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> |
|
From: Fernando C. <fca...@gm...> - 2020-04-10 20:34:21
|
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... <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 > |
|
From: Mark H. <Ma...@re...> - 2020-04-10 20:24:15
|
Hello Stephen and Fernando, I'm still a bit confused about setting up a client *and* a server on the same port Is that even possible on the same port? My experience is that, from a single network interface, you can only have one task listening on a particular port. That's why I use so many ports (they're cheap). I will check-out that echo server example as well, however. As you see in the echo handler in that program, the answer is basically calling lo_message_get_source() in the handler. Wow. I did not know about that function (or maybe I simply forgot). I use broadcasts and OSC messages that exchange IP addresses to configure the OSC network (multi-subnet broadcasts work well in liblo). This might simplify my code. Thanks again, Stephen and Fernando. mark -----Original Message----- From: Fernando Carello [mailto:fca...@gm...] Sent: Friday, April 10, 2020 9:38 AM To: liblo development list Subject: Re: [liblo] Liblo client: how to receive replies from server? Hello Stephen, thanks for the head up; I'm still a bit confused about setting up a client *and* a server on the same port, but I'll study the echo server example to my best. Fernando Il giorno ven 10 apr 2020 alle ore 17:05 Stephen Sinclair < rad...@gm... <mailto:rad...@gm...> > ha scritto: Hi Fernando, Can you say if the TCP echo server example clarifies anything for you? http://liblo.sourceforge.net/examples/example_tcp_echo_server.c.html <" rel="nofollow">http://liblo.sourceforge.net/examples/example_tcp_echo_server.c.html> As you see in the echo handler in that program, the answer is basically calling lo_message_get_source() in the handler. Try changing LO_TCP to LO_UDP in that example, it should still work. You can find it here in ZynAddSubFx: https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare.c pp#L104 <https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare. cpp#L104> Steve On Fri, Apr 10, 2020 at 10:34 AM Fernando Carello < fca...@gm... <mailto:fca...@gm...> > wrote: > > Hello Mark and thanks a lot for your support. > > From what I've gathered, my client application should act both as a client and as a server (to catch replies). > What I can't seem to grasp, is how the "true" OSC server (which is ZynAddSubFx by the way; I did not write it) knows that the reply should go to my server (instead of my client). > > I mean: > > MyClient: lo_send(get_master_volume) to Zyn, (at localhost port 7777) > MyServer: waiting for reply on port...? > Zyn: reply(Master Volume = 87) to...? > > Sorry, I understand it's quite dumb a question...! Didn't find much docs about this reply catching mechanism. > > Thanks again, > Fernando > > > Il giorno ven 10 apr 2020 alle ore 07:48 Mark Hotchkiss < Ma...@re... <mailto:Ma...@re...> > ha scritto: >> >> Hi Fernando, >> >> Since I subscribed to this list after you posted your question, I never received it by email, so I'm not sure I'm responding correctly. I suspect it will end-up as a new thread, rather than added to your thread. I hope you receive it. >> >> Now my response: >> >> OSC creates unidirectional messages: from a client to a server. There isn't an explicit mechanism for a "reply" to a message. That needs to be implemented as an independent connection. >> >> Specifically for your use case: >> I may ask the server which is the current master volume and expect an integer value in return. >> When "I" (app1) sends the request, using lo_send(), to the "server" (app2), it uses the server's port address that app1 specified with lo_address_new(). App2 has reserved that port when it created its server with lo_server_thread_new(), so any traffic on that port will only go to app2. That port cannot be used for replies. >> >> If app2 (the server) needs to send a reply to app1, then app1 will need to create its own server with lo_server_thread_new(), with a different port address. App2 will need to specify a lo_address to that port with lo_address_new(). In other words, you need two ports, one in each direction. >> >> I use five ports, with the main "Server" accepting requests on port X, the replies going out on port X+1, the server receiving maintenance messages on port X+2, it replying to those on port X+3, and it broadcasts status messages on port X+4. Here are a couple of address patterns: >> >> Request to the server: /request/execute/ <function index> >> and it replies: /reply/execute/ACK >> >> I use a number of lo_server_thread_add_method() calls to route the messages to the various callback functions. >> >> I hope this helps. >> >> mark >> _______________________________________________ >> liblo-devel mailing list >> lib...@li... <mailto:lib...@li...> >> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> > > _______________________________________________ > liblo-devel mailing list > lib...@li... <mailto:lib...@li...> > https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> _______________________________________________ liblo-devel mailing list lib...@li... <mailto:lib...@li...> https://lists.sourceforge.net/lists/listinfo/liblo-devel <" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel> |
|
From: Mark H. <Ma...@re...> - 2020-04-10 20:09:30
|
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-androide abi-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-androide abi-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 |
|
From: Fernando C. <fca...@gm...> - 2020-04-10 16:49:51
|
Hi, Mark, Stephen
I managed to advance a little bit on Android build, by explicitely
specifying:
./configure --host=x86_64-pc-linux-gnu
Now I am facing another "configure" issue:
---
config.status: executing libtool commands
[liblo] Warning: Building without interface selection for multicast.
This is unusual on Linux, Windows, and OS X, so make sure you
know what you're doing! May be needed e.g. on Android.
---
I think it has a point about no multicast interface on Android; but then ,
when I try to build:
----------
make[3]: Entering directory '/home/fernando/src/liblo-0.31/src'
CC liblo_la-address.lo
CC liblo_la-send.lo
CC liblo_la-message.lo
CC liblo_la-server.lo
CC liblo_la-method.lo
CC liblo_la-blob.lo
CC liblo_la-bundle.lo
CC liblo_la-timetag.lo
CC liblo_la-pattern_match.lo
CC liblo_la-version.lo
CC liblo_la-server_thread.lo
CCLD liblo.la
CC testlo-testlo.o
CCLD testlo
./.libs/liblo.so: error: undefined reference to 'index'
./.libs/liblo.so: error: undefined reference to
'lo_server_new_multicast_iface'
collect2: error: ld returned 1 exit status
Makefile:752: recipe for target 'testlo' failed
make[3]: *** [testlo] Error 1
make[3]: Leaving directory '/home/fernando/src/liblo-0.31/src'
Makefile:965: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/fernando/src/liblo-0.31/src'
Makefile:470: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/fernando/src/liblo-0.31'
Makefile:379: recipe for target 'all' failed
make: *** [all] Error 2
---------
Suggestions?
Fernando
Il giorno ven 10 apr 2020 alle ore 17:13 Stephen Sinclair <
rad...@gm...> ha scritto:
> 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
>
|
|
From: Fernando C. <fca...@gm...> - 2020-04-10 16:37:41
|
Hello Stephen, thanks for the head up; I'm still a bit confused about setting up a client *and* a server on the same port, but I'll study the echo server example to my best. Fernando Il giorno ven 10 apr 2020 alle ore 17:05 Stephen Sinclair < rad...@gm...> ha scritto: > Hi Fernando, > > Can you say if the TCP echo server example clarifies anything for you? > > http://liblo.sourceforge.net/examples/example_tcp_echo_server.c.html > > As you see in the echo handler in that program, the answer is > basically calling lo_message_get_source() in the handler. > > Try changing LO_TCP to LO_UDP in that example, it should still work. > > You can find it here in ZynAddSubFx: > > https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Misc/MiddleWare.cpp#L104 > > Steve > > On Fri, Apr 10, 2020 at 10:34 AM Fernando Carello <fca...@gm...> > wrote: > > > > Hello Mark and thanks a lot for your support. > > > > From what I've gathered, my client application should act both as a > client and as a server (to catch replies). > > What I can't seem to grasp, is how the "true" OSC server (which is > ZynAddSubFx by the way; I did not write it) knows that the reply should go > to my server (instead of my client). > > > > I mean: > > > > MyClient: lo_send(get_master_volume) to Zyn, (at localhost port 7777) > > MyServer: waiting for reply on port...? > > Zyn: reply(Master Volume = 87) to...? > > > > Sorry, I understand it's quite dumb a question...! Didn't find much docs > about this reply catching mechanism. > > > > Thanks again, > > Fernando > > > > > > Il giorno ven 10 apr 2020 alle ore 07:48 Mark Hotchkiss < > Ma...@re...> ha scritto: > >> > >> Hi Fernando, > >> > >> Since I subscribed to this list after you posted your question, I never > received it by email, so I'm not sure I'm responding correctly. I suspect > it will end-up as a new thread, rather than added to your thread. I hope > you receive it. > >> > >> Now my response: > >> > >> OSC creates unidirectional messages: from a client to a server. There > isn't an explicit mechanism for a "reply" to a message. That needs to be > implemented as an independent connection. > >> > >> Specifically for your use case: > >> I may ask the server which is the current master volume and expect an > integer value in return. > >> When "I" (app1) sends the request, using lo_send(), to the "server" > (app2), it uses the server's port address that app1 specified with > lo_address_new(). App2 has reserved that port when it created its server > with lo_server_thread_new(), so any traffic on that port will only go to > app2. That port cannot be used for replies. > >> > >> If app2 (the server) needs to send a reply to app1, then app1 will need > to create its own server with lo_server_thread_new(), with a different port > address. App2 will need to specify a lo_address to that port with > lo_address_new(). In other words, you need two ports, one in each direction. > >> > >> I use five ports, with the main "Server" accepting requests on port X, > the replies going out on port X+1, the server receiving maintenance > messages on port X+2, it replying to those on port X+3, and it broadcasts > status messages on port X+4. Here are a couple of address patterns: > >> > >> Request to the server: /request/execute/ <function index> > >> and it replies: /reply/execute/ACK > >> > >> I use a number of lo_server_thread_add_method() calls to route the > messages to the various callback functions. > >> > >> I hope this helps. > >> > >> mark > >> _______________________________________________ > >> 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 > |
|
From: Stephen S. <rad...@gm...> - 2020-04-10 15:12:58
|
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 |