I have made some progress, though I am having problems with running the gr-template app on my Android device, a Nexus 6 running Android version 5.1 and API level 22.
Although, now that I think about it, there's no reason to SWIG gr-grand. >> You'll never use that in Python on Android; we only use the c++ library >> out, and specifically the static libgnuradio-grand.a library. >> >> Maybe try adding the flag -DENABLE_PYTHON=False to the cmake line? >> > ENABLE_PYTHON is not an available option, and there is no option to > disable Python or SWIG (the cmake user settable variables can be listed > using -LAH). > I was able to get CMake to disable SWIG by adding -DSWIG_DIR=SWIG_DIR-NOTFOUND this will cause CMake to fail to find SWIG and disable it. With this I was able to successfully build GNU Radio for Android on OS X. To summarize what I had to do to build GNU Radio for Android on OS X: - When building boost add toolset=gcc-android as an option. I did this for both stage and install, though I am not sure if this is necessary for install. - I changed -DPYTHON_EXECUTABLE=/usr/bin/python to -DPYTHON_EXECUTABLE=/opt/local/bin/python so the correct Python version is used. This is /opt/local/bin/python for MacPorts. UHD also needs Cheetah to be installed to build it. - When configuring gr-grand I disabled SWIG to fix problems with Python by passing -DSWIG_DIR=SWIG_DIR-NOTFOUND to CMake. - I added the -DENABLE_AIRSPY=False -DENABLE_PYTHON=False options when configuring gr-osmosdr to disable Airspy and SWIG. I am able to build the GrTemplate example, but when running it gets stuck when calling FgStart() on a Nexus 6 running. This causes problems with https://github.com/trondeau/GrTemplate/blob/master/app/src/main/java/org/gnuradio/grtemplate/GrTemplate.java#L18 This covers my problems with Ubuntu, though I have not done any more work with this since I was able to successfully build GNU Radio for Android on OS X. > The real problem here is that android-toolchain/arm-linux-androideabi/bin/ > is empty and not symlinked to the tools in android-toolchain/bin/ like it > normally is. I have tried rebuilding the toolchain multiple times, but it > is not making the symlinks. I just copied the symlinks from OS X and it > works on Ubuntu 14.04 (tested for FFTW). > I also had a similar problem when running ndk-build for libusb. I just symlinked android-toolchain/bin/arm-arm-linux-androideabi-ld.gold to ld with android-toolchain/bin in the path, and was able to build libusb successfully. On Fri, Sep 25, 2015 at 7:01 AM, Tom Rondeau <t...@trondeau.com> wrote: > Hey Schuyler, > > Any progress on your side of things? I've been busy with other aspects of > the project and haven't been able to get back to this. However, I just > picked up a new Android device, so I'm going to try to start from scratch > with that and a VM to walk through the instructions and see what might need > tuning or fixing. I'm on the road the next two weeks, but hope I can get > this done when I'm settled for a bit in Dublin the week after next. > > Tom > > > On Fri, Aug 21, 2015 at 3:34 PM, Schuyler St. Leger < > schuyler.st.le...@gmail.com> wrote: > >> Although, now that I think about it, there's no reason to SWIG gr-grand. >>> You'll never use that in Python on Android; we only use the c++ library >>> out, and specifically the static libgnuradio-grand.a library. >>> >>> Maybe try adding the flag -DENABLE_PYTHON=False to the cmake line? >>> >> ENABLE_PYTHON is not an available option, and there is no option to >> disable Python or SWIG (the cmake user settable variables can be listed >> using -LAH). >> >> >> Are you sure you want armv7-m? Most of what we're using is armv7-a. But >>> you might just try "armv7" instead to use a more generic v7 architecture. >>> Take a look at the gcc man page for a list of supported machines. This >>> might be something you'll need to play around with. >>> >> I made a mistake in copying the error, here is the correct error. >> Assembler messages: >> Fatal error: invalid -march= option: `armv7-a' >> >> I was able to get Boost to build. The problem is that when >> arm-linux-androideabi-g++ calls the assembler it looks in the path for as the >> problem with this is that the assembler for Android is named >> arm-linux-androideabi-as . To fix this I symlinked >> arm-linux-androideabi-as to as and android-toolchain/bin needs to be in >> your path (it should be from setting up the android toolchain). However >> this must be done after running bootstrap.sh or Boost will fail to build >> Boost.Build. Running hash -r may be required to get bash to find the >> correct assembler. >> >> The real problem here is that >> android-toolchain/arm-linux-androideabi/bin/ is empty and not symlinked to >> the tools in android-toolchain/bin/ like it normally is. I have tried >> rebuilding the toolchain multiple times, but it is not making the symlinks. >> I just copied the symlinks from OS X and it works on Ubuntu 14.04 (tested >> for FFTW). >> >> >> Yeah, when this is right, you should see 'yes' for 32-bit and arm. >>> >> That is what I got when using OS X with Boost and specifying >> toolset=gcc-android . >> >> How hard would it be to get fosphor working on Android? >> >> Schuyler, there might have been a change in something in Android (they >>> really don't care about changing things between versions) when building the >>> standalone SDK. Take a look at the options you passed when building that >>> part of the project. Also, make sure you are using GCC 4.8 and NOT 4.9. We >>> have other issues with 4.9. >>> >> I am using GCC 4.8. >> >> _______________________________________________ >> Discuss-gnuradio mailing list >> Discuss-gnuradio@gnu.org >> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio >> >> >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio