I'm experiencing an issue with Qt Creator in Windows:
I made an application that is using QtSerialPort and QtSerialBus libraries, I built and deployed it for windows and everything went well.
Now I'm trying to built it for Android but those libraries are not available as the official documentation states.
I downloaded the sources of QtSerialPort and QtSerialBus from Github and I'm now trying to build them by myself for Android.
AFAIK the issue I'm encountering is in the make install step, and this is the message I get:
08:05:28: Starting: "C:\Android\ndk-bundle\prebuilt\windows-x86_64\bin\make.exe" "INSTALL_ROOT=C:\Users\giovanni.lucenti\Downloads\qtserialport\android-build" install
cd src\ && ( if not exist Makefile C:\Qt\5.14.2\android\bin\qmake.exe -o Makefile C:\Users\giovanni.lucenti\Downloads\qtserialport-dev\src\src.pro -spec android-clang "CONFIG+=qtquickcompiler" "ANDROID_ABIS=armeabi-v7a" ) && C:/Android/ndk-bundle/prebuilt/windows-x86_64/bin/make -f Makefile install
make[1]: Entering directory 'C:/Users/giovanni.lucenti/Downloads/qtserialport/src'
cd serialport\ && ( if not exist Makefile C:\Qt\5.14.2\android\bin\qmake.exe -o Makefile C:\Users\giovanni.lucenti\Downloads\qtserialport-dev\src\serialport\serialport.pro -spec android-clang "CONFIG+=qtquickcompiler" "ANDROID_ABIS=armeabi-v7a" ) && C:/Android/ndk-bundle/prebuilt/windows-x86_64/bin/make -f Makefile install
make[2]: Entering directory 'C:/Users/giovanni.lucenti/Downloads/qtserialport/src/serialport'
La sintassi del nome del file, della directory o del volume non Š corretta.
make[2]: *** [Makefile:639: install_target] Error 1
make[2]: Leaving directory 'C:/Users/giovanni.lucenti/Downloads/qtserialport/src/serialport'
make[1]: *** [Makefile:59: sub-serialport-install_subtargets] Error 2
make[1]: Leaving directory 'C:/Users/giovanni.lucenti/Downloads/qtserialport/src'
make: *** [Makefile:61: sub-src-install_subtargets] Error 2
08:05:30: The process "C:\Android\ndk-bundle\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
Error while building/deploying project qtserialport (kit: Android for armeabi-v7a,arm64-v8a,x86,x86_64 (Clang Qt 5.14.2 for Android))
When executing step "Copy application data"
08:05:30: Elapsed time: 00:23.
I already tried to move the folder in a shorter path (C:\tmpbuild) but everything goes the same.
Am I missing something?
Where am I supposed to set the make install target path?
These are my Qt Creator build settings
You can't use QSerialPort on Android, as it is not suported there.
Related
I have followed all the steps written in the pjsip-startup guide.
But the last step (make dep && make clean && make) is giving me the following errors. I am on Windows 7.
$ make dep && make clean && make
for dir in pjlib/build pjlib-util/build pjnath/build third_party/build pjmedia/b uild pjsip/build pjsip-apps/build ; do \
if make -C $dir dep; then \
true; \
else \
exit 1; \
fi; \
done
make[1]: Entering directory '/cygdrive/d/android/pjproject-2.2.1/pjlib/build'
make -f /cygdrive/d/android/pjproject-2.2.1/build/rules.mak APP=PJLIB app=pjlib depend
make[2]: Entering directory '/cygdrive/d/android/pjproject-2.2.1/pjlib/build'
.pjlib-arm-unknown-linux-androideabi.depend:1: *** multiple target patterns. St op.
make[2]: Leaving directory '/cygdrive/d/android/pjproject-2.2.1/pjlib/build'
Makefile:88: recipe for target 'depend' failed
make[1]: *** [depend] Error 2
make[1]: Leaving directory '/cygdrive/d/android/pjproject-2.2.1/pjlib/build'
Makefile:14: recipe for target 'dep' failed
make: *** [dep] Error 1
Can someone help me to resolve these errors? Thanks!
After some research I come to know that don't use WINDOWS for building the PJSIP v2.x version. Now I am going to install Ubuntu on my system.
The build system is known to work on the following hosts:
Linux, many types of distributions.
MacOS X 10.2 mingw (Win2K, XP)
FreeBSD (must use gmake instead of make)
Building Win32 applications with Cygwin is currently not supported by the autoconf script (there are some conflicts with Windows headers), but one can still use the old configure script by calling ./configure-legacy. More over, cross-compilations might also work with Cygwin using this build system.
See the link for details.
I need to customize the kernel of android to run on my Nexus S.
So I download the kernel with branch name "remotes/origin/android-samsung-2.6.35-gingerbread"
I tried to follow the instruction here http://source.android.com/source/building-kernels.html to build the kernel. To do this, I need the cross compile tool.In my target android source code version android-2.3.5_r1, there is no such tool(no prebuilts/ folder). So I downloaded the version 4.1.2 and set up the tool as path prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin .
Then I tried to build my kernel, but I got the following error:
[root#localhost samsung]# make
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC drivers/gpu/pvr/osfunc.o
In file included from drivers/gpu/pvr/osfunc.c:39:0:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: error: variable 'c' set but not used [-Werror=unused-but-set-variable]
drivers/gpu/pvr/osfunc.c: In function 'OSAccessOK':
drivers/gpu/pvr/osfunc.c:2144:13: error: variable 'linuxType' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[3]: *** [drivers/gpu/pvr/osfunc.o] Error 1
make[2]: *** [drivers/gpu/pvr] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
Should I just disable the "all warnings being treated as errors" to solve it? Or maybe I need a better toolchain?
PS: The tool chain of the master branch and branch 4.2 can not be used by me. Because it looks like they are made for a 64-bit OS while my linux is 32-bit
Do you have the path of ARCH=ARM and TOOLCHAIN pointing to the toolchain in \prebuilts folder?
make ARCH=ARM TOOLCHAIN=\<homeofAOSP>\prebuilt\.. herring_defconfig
make clean before you do the make
i have downloaded the latest android ndk r8b on my ubuntu 12.10 beta 2 .
i have included the ndk directory in the PATH variable (when i write ndk-b in terminal and hit tab it auto-completes it) .
but when i try :
cd android-ndk/samples/san-angeles/jni
ndk-build
i get this error:
make: /home/mixpro/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/mixpro/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
Compile thumb : sanangeles <= importgl.c
make: /home/mixpro/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: *** [/home/mixpro/Android/android-ndk/samples/san-angeles/obj/local/armeabi/objs/sanangeles/importgl.o] Error 127
when checking the /android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin directory using ls i get:
arm-linux-androideabi-addr2line arm-linux-androideabi-g++
arm-linux-androideabi-gdbtui arm-linux-androideabi-size
arm-linux-androideabi-c++filt arm-linux-androideabi-gcc-4.6.x-google
arm-linux-androideabi-gprof arm-linux-androideabi-strings
arm-linux-androideabi-cpp arm-linux-androideabi-gcov
arm-linux-androideabi-readelf arm-linux-androideabi-elfedit
arm-linux-androideabi-gdb arm-linux-androideabi-run
meaning there is no arm-linux-androideabi-gcc in the directory
I am afraid that somehow you got arm-linux-androideabi-addr2line arm-linux-androideabi-gcc deleted. On linux, it is just a symlink to arm-linux-androideabi-gcc-4.6.x-google, so it's very easy to restore it. But maybe, to be on the safe side, it's worthwhile to reinstall NDK.
you should create symbolic link like this : ln -s /usr/bin/arm-linux-gnueabi-gcc-4.7 "/home/sofien/Bureau/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc"
I'm trying to compile vlc using the following instructions http://wiki.videolan.org/AndroidCompile.
i get the vlc source using git but when i'm doing the next command:
cd extras/contrib
./bootstrap -t arm-eabi -d android
i'm getting this error:
[contrib] No install dir specified, using '/android-sdk-mac_x86/vlc-android/extras/contrib/hosts/arm-eabi'
[contrib] *****************************************************************
[contrib] * If you need contribs with all debug information, run this *
[contrib] * line and compile the libraries on your own. *
[contrib] * CONTRIBS_RELEASE=no ./bootstrap *
[contrib] *****************************************************************
[contrib] Using 1 processor(s)
when i make the next step that is 'make' i got the following failure;
make -C build-src tools
make[1]: Nothing to be done for `tools'.
make -C build-src
(cd zlib; CC="arm-linux-androideabi-gcc --sysroot=/android-ndk-r5b//platforms/android-9/arch-arm" CXX="arm-linux-androideabi-g++ --sysroot=/android-ndk-r5b//platforms/android-9/arch-arm" LD="arm-linux-androideabi-ld" RANLIB="arm-linux-androideabi-ranlib" AR="arm-linux-androideabi-ar" STRIP="arm-linux-androideabi-strip" ./configure --prefix=/android-sdk-mac_x86/vlc-android/extras/contrib/hosts/arm-eabi --static && make install)
Building static library libz.a version 1.2.5 with arm-linux-androideabi-gcc --sysroot=/android-ndk-r5b//platforms/android-9/arch-arm.
Checking for off64_t... No.
Checking for fseeko... No.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf().
Checking for snprintf() in stdio.h... No.
WARNING: snprintf() not found, falling back to sprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
Checking for return value of sprintf()... No.
WARNING: apparently sprintf() does not return a value. zlib
can build but will be open to possible string-format security
vulnerabilities.
arm-linux-androideabi-gcc --sysroot=/android-ndk-r5b//platforms/android-9/arch-arm -I/android-sdk-mac_x86/vlc-android/extras/contrib/hosts/arm-eabi/include -DNDEBUG -D__STDC_VERSION__=199901L -I/android-ndk-r5b//sources/cxx-stl/gnu-libstdc++/include -I/android-ndk-r5b//sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -isystem /android-sdk-mac_x86/vlc-android/extras/contrib/hosts/arm-eabi/include -I/android-ndk-r5b//platforms/android-9/arch-arm/usr/include -DNO_FSEEKO -DNO_snprintf -DHAS_sprintf_void -I/android-sdk-mac_x86/vlc-android/extras/contrib/hosts/arm-eabi/include -DNDEBUG -D__STDC_VERSION__=199901L -I/android-ndk-r5b//sources/cxx-stl/gnu-libstdc++/include -I/android-ndk-r5b//sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -isystem /android-sdk-mac_x86/vlc-android/extras/contrib/hosts/arm-eabi/include -I/android-ndk-r5b//platforms/android-9/arch-arm/usr/include -c -o adler32.o adler32.c
make[2]: arm-linux-androideabi-gcc: No such file or directory
make[2]: *** [adler32.o] Error 1
make[1]: *** [.zlib] Error 2
make: *** [using-src] Error 2
anyone can help? i'm using mac OS X 10.6.6
tnx
Given prior Linux CLI experience, the best I can tell you is that it doesn't look like your tool-chain is fully initialized and needs some setup. Below is a link that documents initialization for a MAC build environment:
http://source.android.com/source/initializing.html
You probably should have set your NDK installation properly.
Download the latest Android NDK.
Unzip and move the extracted “android-ndk-r6″ directory to “/Applications”, so you end up with “/Applications/android-ndk-r6″.
Edit “~/.profile” to add the following:
export ANDROID_NDK=/Applications/android-ndk-r5b
export PATH=$PATH:$ANDROID_NDK:$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin
The PATH was the key to solve this kind of problem to me. Because it makes possible to find and use "arm-linux-androideabi-gcc".
Refer to this web site.
http://www.doitscared.com/632/eclipse-indigo-for-android-development-on-mac-os-x-snow-leopard/
I'm trying to use OpenGL on Android using C. I'm following this excellent tutorial, but I've hit a wall.
I'm using an ARM compiler (arm-none-linux-gnueabi-ld) on Linux Mint 7 (Ubuntu 9.04 branch).
I can copy the compiled binary to the Android emulator just fine, it runs. But when I try to make it myself, I get the following error:
knight666#Desktop-Linux ~/Android/Test $ make
( for f in src; do ( cd $f ; make all ) || exit 1 ; done )
make[1]: Map '/home/knight666/Android/Test/src' wordt binnengegaan
arm-none-linux-gnueabi-ld --entry=_start --dynamic-linker ../../system/bin/linker -nostdlib -rpath ../../system/lib -rpath ../../system/lib -L ../../system/lib -lm -lc -lui -lGLES_CM main.o start.o -o ../test1
arm-none-linux-gnueabi-ld: cannot find -lGLES_CM
make[1]: *** [test1] Fout 1
make[1]: Map '/home/knight666/Android/Test/src' wordt verlaten
make: *** [all] Fout 1
It complains it can't find "GLES_CM". I'm at a loss as to what that is and where I can find it. A Google search comes up empty. There is also no man page for arm-none-linux-gnueabi-ld and I can't figure out what the -l flag is or does.
Has anyone done this kind of thing before or can you help me understand what I'm doing wrong?
Thanks in advance.
P.s. here's a small script I wrote to copy and run a compiled binary in the Android emulator:
#!/bin/sh
FILEPATH=`dirname $1`
adb push $FILEPATH/$1 /system/sbin/$1
adb shell chmod 777 /system/sbin/$1
adb shell /system/sbin/$1
GLES_CM is part of OpenGL ES libraries.
If you are working with NDK - OpenGL became available only in 1.6 builds.