Building libusb on Ubuntu with android-ndk - android-ndk

I am trying to build libusb with android ndk on Ubuntu 12.10.
I type in the ndk-build command and it fails on compiling io.c with the following error.
jni/libusb/io.c:34:25: fatal error: sys/timerfd.h: No such file or directory
Where can I get timerfd.h? Isn't it supposed to come with Linux kernel

the function that you are searching has nothing to do with the "Linux-kernel"!
This funktion belongs to the C-language.
On Android devices the clib is crippled ( sorry: stripped ) down to the minimum
and is called bionic.
Check the net for more infos on that toppic
Good luck
Martin

Related

Can't run the prepare.py script on linphone-android project

I want to build linphone for android on android studio,
I follow the guide on https://github.com/BelledonneCommunications/linphone-android,
but on step 3, I keep getting exception:
CMake Error: CMake was unable to find a build program corresponding to
"Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need
to select a different build tool. CMake Error: CMAKE_C_COMPILER not
set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set,
after EnableLanguage
-- Configuring incomplete, errors occurred!
Did I miss any setting on cMake? I just wanna make it work on android studio.
Update my final solution:
Those make/build libraries all from Linux kernel, so I finally giving up to build linphone on Windows and it works like a charm on Linux.

how to configure QT creator cross compiling

Actually i installed QT creator in my debian linux system which is having i386 processor.Now i need to cross compile the QT for debian linux with ARM processor.
So for this cross compile process i installed the compiler arm-linux-gnueabi-gcc-4.4 manually and add it in the QT creator "Tools->Options->Build&Run-->Compiler".
After that i have no idea of how to configure the installed (arm-linux-gnueabi-gcc-4.4) compiler in kit option. Because in kit option "Device Type" , it is expecting for the Qmake file of arm-linux-gnueabi-gcc-4.4.Here my doubt is
Is it possible to create Qmake file for the compiler (arm-linux-gnueabi-gcc-4.4)
If that case what is the procedure to create Qmake file for the compiler (arm-linux-gnueabi-gcc-4.4)
If not in the case any dependencies need to install.
By googling around for this solution finally i felt my head rotate because in QT documentQT document they mention 5 steps.Among 5 steps i stuck in 2nd step itself (./configure -embedded arm -xplatform qws/linux-arm-g++ ).In this step im not able to understand what is configure , embedded, arm, xplatform etc...
In some link link number 2 they suggested to install bitbake and some steps.Here im not able to install bitbake also.
In some qt documents they mentioned embedded linux (is embedded linux is a OS like debian) and mkspecs etc..
Finally i decided to create Qmake file for the compiler arm-linux-gnueabi-gcc-4.4 but not having the single clue also.So if anybody knows what exactly i need to configure QT creator (either Qmake for compiler arm-linux-gnueabi-4.4 or something else ) so that i will follow exactly the required thing without any confusion.
Qt cross compiling for arm based board can be sucessfully done using Angstrom cross compiler. Just download Angstrom cross compiler as per your board configuration , unpack it and create cross compiler using that package.

Input/output error using Android ndk-build

Using Android NDK R10E, I am trying to build a shared library for all supported ABI's and I am getting the following error for some but not all ABI's:
[armeabi] SharedLibrary : libMyLib.so /home/user/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
fatal error: /home/user/source/MyLib/obj/local/armeabi/libMyLib.so: Input/output error
The project successfully builds for arm64-v8a, mips and mips64 but fails with the above error for armeabi, armeabi-v7a, x86 and x86_64.
I have a static library project and another shared library project and they both build successfully for all 7 ABI's.
If I compare the contents of obj/local/ for an ABI that builds and one that does not, they both contain all the same files except for libMyLib.so.
The difference between those two sets of ABIs is that the failing ones link using ld.gold and the working ones use ld.bfd.
Two things to try:
Use the 4.9 toolchain. It hopefully has the bug fix.
If that doesn't work, you can add -fuse-ld=bfd to your ldflags to use bfd even on the architectures that default to gold.
Same issue happened to me in r15c.
The fix was to copy
android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin/ld.bfd over ld.
I had to copy it because I could not easily find a way to specify this flag to CMake to use it while detecting the compiler features.

Missing net_4_5\mscorlib.dll.so when compiling Mono source

I'm trying to get the latest mono (version 3.12.0) to compile on my raspberry pi 2 running raspbian linux (based on debian).
I've downloaded the mono source and compiling seems to be going well then I hit an error when compiling 'mcs/class/aot-compiler'
the error is that it cannot find './../../class/lib/net_4_5/mscorlib.dll.so'
I've checked the directory and I see that mscorlib.dll was compiled along with an .mdb file but I do not see an so file.
Do I need to specify a switch or something to build the so file? (I'm a linux newb)
Where is the make file that's building mscorlib? compiling is taking forever for the whole source, can I just recompile mscorlib and have an so file emitted somehow?

Can't install Vision Workbench

I am trying to install the Vision Workbench on my computer, following the instructions from this homepage: http://lunokhod.org/?p=13. I have installed all dependencies but I have libboost1.54-all-dev instead since I am using Mint 17 (Ubuntu 14.4).
After that I have created the config.options file I do ./autogen and ./configure.
However, I get the following in the logfile:
configure:20861: /usr/include/boost is missing these required libraries: BOOST_PROGRAM_OPTIONS BOOST_FILESYSTEM BOOST_THREAD
Checking for a boost in /usr/include/boost-*
Checking for a boost in /usr/local/cuda/include
Checking for a boost in /usr/local/cuda/include/boost-*
configure:20875: checking for package BOOST
HAVE_PKG_BOOST=no
However, in /usr/include/boost/ I have booth program_options, filesystem and thread.
The .so files are under /usr/lib/x86_64-linux-gnu/ for opencv, boost and flann, but somehow it can only find flann.
Does anyone have an idea about where the error might be?
EDIT: In the log-file I saw that the program looked for cxcore when it searched for opencv, but in the new version it is called opencv_core so I did a symbolic link from cxcore to opencv_core and then ./configure finds opencv. However, boost is still a problem and is necessary to build the program.
EDIT2:
I have now downloaded an earlier version of boost (1.42), and almost all boost programs are found except BOOST_THREAD. When I install the boost library I get the following messages:
error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
/ Erik
try running
./configure --with-boost="path/to/boost"
if you have more than one version of boost installed, you may need to also set environment variables
HAVE_PKG_BOOST=yes
PKG_BOOST_CPPFLAGS=/path/to/boost
PKG_BOOST_LDFLAGS=/path/to/boost

Resources