stdexcept On Android - android

I'm trying to compile SoundTouch on Android. I started with this configure line:
./configure CPPFLAGS="-I/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/include/" LDFLAGS="-Wl,-rpath-link=/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/lib -L/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/lib -nostdlib -lc" --host=arm-eabi --enable-shared=yes CFLAGS="-nostdlib -O3 -mandroid" host_alias=arm-eabi --no-create --no-recursion
Because the Android NDK targets ARM, I also had to change the Makefile to remove the -msse2 flags to progress.
When I run 'make', I get:
/bin/sh ../../libtool --tag=CXX --mode=compile arm-eabi-g++ -DHAVE_CONFIG_H -I. -I../../include -I../../include -I/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/include/ -O3 -fcheck-new -I../../include -g -O2 -MT FIRFilter.lo -MD -MP -MF .deps/FIRFilter.Tpo -c -o FIRFilter.lo FIRFilter.cpp
libtool: compile: arm-eabi-g++ -DHAVE_CONFIG_H -I. -I../../include -I../../include -I/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/include/ -O3 -fcheck-new -I../../include -g -O2 -MT FIRFilter.lo -MD -MP -MF .deps/FIRFilter.Tpo -c FIRFilter.cpp -o FIRFilter.o
FIRFilter.cpp:46:21: error: stdexcept: No such file or directory
FIRFilter.cpp: In member function 'virtual void soundtouch::FIRFilter::setCoefficients(const soundtouch::SAMPLETYPE*, uint, uint)':
FIRFilter.cpp:177: error: 'runtime_error' is not a member of 'std'
FIRFilter.cpp: In static member function 'static void* soundtouch::FIRFilter::operator new(size_t)':
FIRFilter.cpp:225: error: 'runtime_error' is not a member of 'std'
make[2]: *** [FIRFilter.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
This isn't very surprising, since the -nostdlib flag was required. Android seems to have neither stdexcept nor stdlib. How can I get past this block of compiling SoundTouch?
At a guess, there may be some flag I don't know about that I should use. I could refactor the code not to use stdexcept. There may be a way to pull in the original stdexcept source and reference that. I might be able to link to a precompiled stdexcept library.

The default provided gcc version provided with the android ndk does not support exceptions. See http://www.crystax.net/android/ndk.php for an alternative build which does.

Related

Qt build static library for all architectures

I try build static library for Android (*.a). My pro-file:
QT -= gui
TEMPLATE = lib
CONFIG += staticlib
CONFIG += c++11
DEFINES += QT_DEPRECATED_WARNINGS
ANDROID_ABIS = armeabi-v7a arm64-v8a x86 x86_64
SOURCES += \
untitled3.cpp
HEADERS += \
untitled3.h
Files untitled3.cpp and untitled3.h very simple. When I build project I get the only one library *.a, but expected get four libs for all architectures: armeabi-v7a arm64-v8a x86 x86_64
When I build at first, compilation finished with error:
10:13:57: Running steps for project untitled3...
10:13:57: Starting: "C:\Qt\Qt5.14.1\5.14.1\android\bin\qmake.exe" C:\Users\range\Documents\untitled3\untitled3.pro -spec android-clang "CONFIG+=debug" "CONFIG+=qml_debug" ANDROID_ABIS="armeabi-v7a arm64-v8a x86 x86_64"
Info: creating stash file C:\Users\range\Documents\andr_out\.qmake.stash
WARNING: Targets of builds 'Armeabi-v7a' and 'Arm64-v8a' conflict: libuntitled3.a.
10:13:57: The process "C:\Qt\Qt5.14.1\5.14.1\android\bin\qmake.exe" exited normally.
10:13:57: Starting: "C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669\prebuilt\windows-x86_64\bin\make.exe" -f C:/Users/range/Documents/andr_out/Makefile qmake_all
make: Nothing to be done for 'qmake_all'.
10:13:57: The process "C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669\prebuilt\windows-x86_64\bin\make.exe" exited normally.
10:13:57: Starting: "C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669\prebuilt\windows-x86_64\bin\make.exe" -j12
C:/Users/range/AppData/Local/Android/Sdk/ndk/21.0.6113669/prebuilt/windows-x86_64/bin/make -f Makefile.Armeabi-v7a all
C:/Users/range/AppData/Local/Android/Sdk/ndk/21.0.6113669/prebuilt/windows-x86_64/bin/make -f Makefile.Arm64-v8a all
C:/Users/range/AppData/Local/Android/Sdk/ndk/21.0.6113669/prebuilt/windows-x86_64/bin/make -f Makefile.X86 all
C:/Users/range/AppData/Local/Android/Sdk/ndk/21.0.6113669/prebuilt/windows-x86_64/bin/make -f Makefile.X86_64 all
make[1]: Entering directory 'C:/Users/range/Documents/andr_out'
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -c -target armv7a-linux-androideabi21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -g -marm -O0 -fPIC -std=gnu++11 -Wall -W -D_REENTRANT -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I..\untitled3 -I. -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\include -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\include\QtCore -Iarmeabi-v7a -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\mkspecs\android-clang -o armeabi-v7a\untitled3.obj ..\untitled3\untitled3.cpp
make[1]: Entering directory 'C:/Users/range/Documents/andr_out'
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -c -target aarch64-linux-android21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -g -fPIC -std=gnu++11 -Wall -W -D_REENTRANT -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I..\untitled3 -I. -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\include -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\include\QtCore -Iarm64-v8a -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\mkspecs\android-clang -o arm64-v8a\untitled3.obj ..\untitled3\untitled3.cpp
make[1]: Entering directory 'C:/Users/range/Documents/andr_out'
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -c -target i686-linux-android21 -mstackrealign -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -g -fPIC -std=gnu++11 -Wall -W -D_REENTRANT -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I..\untitled3 -I. -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\include -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\include\QtCore -Ix86 -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\mkspecs\android-clang -o x86\untitled3.obj ..\untitled3\untitled3.cpp
make[1]: Entering directory 'C:/Users/range/Documents/andr_out'
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -c -target x86_64-linux-android21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -g -fPIC -std=gnu++11 -Wall -W -D_REENTRANT -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I..\untitled3 -I. -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\include -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\include\QtCore -Ix86_64 -I..\..\..\..\Qt\Qt5.14.1\5.14.1\android\mkspecs\android-clang -o x86_64\untitled3.obj ..\untitled3\untitled3.cpp
del libuntitled3.a
del libuntitled3.a
del libuntitled3.a
del libuntitled3.a
ЌҐ г¤ Ґвбп ©вЁ C:\Users\range\Documents\andr_out\libuntitled3.a
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar cqs libuntitled3.a arm64-v8a\untitled3.obj
ЌҐ г¤ Ґвбп ©вЁ C:\Users\range\Documents\andr_out\libuntitled3.a
ЌҐ г¤ Ґвбп ©вЁ C:\Users\range\Documents\andr_out\libuntitled3.a
ЌҐ г¤ Ґвбп ©вЁ C:\Users\range\Documents\andr_out\libuntitled3.a
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar cqs libuntitled3.a armeabi-v7a\untitled3.obj
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar cqs libuntitled3.a x86\untitled3.obj
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar cqs libuntitled3.a x86_64\untitled3.obj
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib libuntitled3.a
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android-ranlib libuntitled3.a
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib: libuntitled3.a: Permission denied
make[1]: *** [Makefile.Arm64-v8a:67: libuntitled3.a] Error 1
make: *** [Makefile:62: arm64-v8a-all] Error 2
make: *** Waiting for unfinished jobs....
make[1]: Leaving directory 'C:/Users/range/Documents/andr_out'
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/i686-linux-android-ranlib libuntitled3.a
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ranlib libuntitled3.a
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android-ranlib: unable to rename 'libuntitled3.a'; reason: File exists
make[1]: *** [Makefile.X86_64:67: libuntitled3.a] Error 1
make[1]: Leaving directory 'C:/Users/range/Documents/andr_out'
make: *** [Makefile:90: x86_64-all] Error 2
C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/bin/i686-linux-android-ranlib: unable to rename 'libuntitled3.a'; reason: File exists
make[1]: *** [Makefile.X86:67: libuntitled3.a] Error 1
make: *** [Makefile:76: x86-all] Error 2
make[1]: Leaving directory 'C:/Users/range/Documents/andr_out'
make[1]: Leaving directory 'C:/Users/range/Documents/andr_out'
10:13:58: The process "C:\Users\range\AppData\Local\Android\Sdk\ndk\21.0.6113669\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
Error while building/deploying project untitled3 (kit: Android for armeabi-v7a,arm64-v8a,x86,x86_64 (Clang Qt 5.14.1 for Android))
When executing step "Make"
10:13:58: Elapsed time: 00:01.
When I build at second, compilation finished successfully, but in output dir I find one *.a - lib:
In folders armeabi-v7a arm64-v8a x86 x86_64 exist only *.obj - files, but not exist .a - files.
My question: how correct build static library (.a) for android for all (4) architectures?
P.S.: Qt version for Android: 5.14.1; Qt Creator version: 4.11.0, based on Qt version: 5.14.0
have you tried building 4 seperate projects for each android architecture (a .pro for each architecture) to see what the result is? it’s obviously not ideal when the project gets larger, but from diagnostics point of view it’s worth a try.

bz2 module fails when building Python 3.7

I'm trying to cross compile Python 3.7 for Android. I see in my output that bz2 if failing with the following error
building '_bz2' extension
/home/dematic/SPE/python3-android/sdk/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -isystem /home/dematic/SPE/python3-android/build/19c-22-aarch64-linux-androideabi-4.9/include -isystem /home/dematic/SPE/python3-android/build/19c-22-aarch64-linux-androideabi-4.9/include/openssl -no-integrated-as -I. -I./Include -target aarch64-none-linux-androideabi22 -target aarch64-none-linux-androideabi22 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I./Include -I. -I/home/dematic/SPE/python3-android/src/Python-3.7.3/Include -I/home/dematic/SPE/python3-android/src/Python-3.7.3 -c /home/dematic/SPE/python3-android/src/Python-3.7.3/Modules/_bz2module.c -o build/temp.linux-aarch64-3.7/home/dematic/SPE/python3-android/src/Python-3.7.3/Modules/_bz2module.o
/home/dematic/SPE/python3-android/sdk/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -isystem /home/dematic/SPE/python3-android/build/19c-22-aarch64-linux-androideabi-4.9/include -isystem /home/dematic/SPE/python3-android/build/19c-22-aarch64-linux-androideabi-4.9/include/openssl -no-integrated-as -shared -target aarch64-none-linux-androideabi22 -fuse-ld=lld -L /home/dematic/SPE/python3-android/build/19c-22-aarch64-linux-androideabi-4.9/lib -target aarch64-none-linux-androideabi22 -fuse-ld=lld -L /home/dematic/SPE/python3-android/build/19c-22-aarch64-linux-androideabi-4.9/lib -target aarch64-none-linux-androideabi22 -fuse-ld=lld -L /home/dematic/SPE/python3-android/build/19c-22-aarch64-linux-androideabi-4.9/lib -fPIC -target aarch64-none-linux-androideabi22 build/temp.linux-aarch64-3.7/home/dematic/SPE/python3-android/src/Python-3.7.3/Modules/_bz2module.o -L. -L/home/dematic/SPE/python3-android/build/19c-22-aarch64-linux-androideabi-4.9/lib -lbz2 -lpython3.7m -o build/lib.linux-aarch64-3.7/_bz2.cpython-37m.so
ld.lld: error: /home/dematic/SPE/python3-android/build/19c-22-aarch64-linux-androideabi-4.9/lib/libbz2.a(bzlib.o) is incompatible with aarch64linux
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am building bzip2 1.0.6 without any issues, but I assume I'm not linking to it correctly or some other issue. Is there some sort of other architecture I'm supposed to be building?
This is the project I'm trying to build with
https://github.com/GRRedWings/python3-android
I'm trying to cross compile Python 3.7 for Android. I see in my output that bz2 if failing with the following error
The Bzip2 makefiles are not written for cross-compiles. They effectively ignore a user's flags like CFLAGS and LDFLAGS. The makefiles actually blows away a user's CFLAGS and sets it to CFLAGS=-Wall -Winline -O2 -g $(BIGFILES). Your flags like -target aarch64-none-linux-androideabi22 are not used.
There are two Makefiles in play. One is called Makefile and it builds the static library, if I recall correctly. The second is Makefile-libbz2_so, and it build the shared object. You need to fix the omissions and apply the fixes to both makefiles.
You should probably use a patched Bzip like bzip2-noloader. It honors a user's CFLAGS, CXXFLAGS, LDFLAGS, etc. The check-in of interest is Commit 34d170f31106.
The makefile recipes in bzip2-noloader look similar to the following. They preserve Seward's original settings in BZIP_CFLAGS. But they also utilize CPPFLAGS and allow a user override in CFLAGS. The override will pickup your flags like -target aarch64-none-linux-androideabi22.
blocksort.o: blocksort.c
$(CC) $(CPPFLAGS) $(BZIP_CFLAGS) $(CFLAGS) -c blocksort.c
Programs use LDFLAGS as expected:
bzip2: libbz2.a bzip2.o
$(CC) $(CPPFLAGS) $(BZIP_CFLAGS) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
Finally, the bzip2-noloader fork also honor's PREFIX, DESTDIR, etc. So you can perform staged installs, too.
I am building bzip2 1.0.6 without any issues ...
You are probably building for i686 or x86_64, and not Aarch64. The problem does not surface until link time. You can use objdump to inspect the object files, if interested.
Also note the makefile does this:
CC=gcc
AR=ar
RANLIB=ranlib
LDFLAGS=
You may need to tweak those variable assignments, too. Sometimes ar and ranlib use unusual names, like ranlib-5.0. And also be sure the tools are on-path.
The way to write makefiles to avoid these sorts of problems is detailed at 7.2.3 Variables for Specifying Commands in the GNU Coding Standards. The short of it is, (1) leave CFLAGS (and friends) for the user; and (2) if a flag is needed, then always supply it.
The GNU Coding Standards uses this as an example:
CFLAGS = -g
ALL_CFLAGS = -I. $(CFLAGS)
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
Users can override the default CFLAGS of -g, and -I is always added because it is needed for the compile.

"qmake" and "make" QtRemoteObjects (from git) for Qt 5.7 Android on Windows 7 does not work

I have cloned the QtRemoteObjects repository from: http://code.qt.io/cgit/playground/qtremoteobjects.git/
on my Windows 7 using GitBash.exe.
The project files are download to "D:\Daten\Android\qtremoteobjects\". Based on the article on this website: https://www.kdab.com/qt-android-create-android-service-using-qt/ I run this command in GitBash:
$ cd d:/Daten/Android/qtremoteobjects/
$ git c:/Qt5.7.0/5.7/android_armv7/bin/qmake -r && make && make install
QMAKE PART
For the qmake part these errors show up:
Reading D:/Daten/Android/qtremoteobjects/tests/auto/cmake/cmake.pro
Das System kann den angegebenen Pfad nicht finden.
meaning the system could not find the given path. And the next two errors are:
WARNING: Failure to find: rep_server_source.h
Project MESSAGE: cmake executable not found. Not running CMake unit tests
First question: Why doesnt the system find the path for cmake.pro and rep_server_source.h and why isnt the cmake executable not found even though I have separately installed CMake.
MAKE PART
The next error that shows up is:
bash: make: command not found
As a solution to this I separated the qmake and make process. I first just ran qmake
$ git c:/Qt5.7.0/5.7/android_armv7/bin/qmake -r
and when qmake is finished (and the same errors as above still show up) i run mingw32-make.exe from Qt5.7->Tools in the qtremoteobjects folder:
$ c:/Qt5.7.0/Tools/mingw530_32/bin/mingw32-make.exe
and this is the result:
cd src/ && ( test -e Makefile || C:/Qt5.7.0/5.7/android_x86/bin/qmake.exe
D:/Daten/Android/qtremoteobjects/src/src.pro -o Makefile ) && C:/Qt5.7.0/Tools/mingw530_32/bin/mingw32-make -f Makefile
mingw32-make[1]: Entering directory 'D:/Daten/Android/qtremoteobjects/src'
cd remoteobjects/ && ( test -e Makefile || C:/Qt5.7.0/5.7/android_x86/bin/qmake.exe D:/Daten/Android/qtremoteobjects/src/remoteobjects/remoteobjects.pro -o Makefile ) && C:/Qt5.7.0/Tools/mingw530_32/bin/mingw32-make -f Makefile
mingw32-make[2]: Entering directory 'D:/Daten/Android/qtremoteobjects/src/remoteobjects'
D:\Daten\Android\android-ndk-r10e/toolchains/x86-4.9/prebuilt/windows/bin/i686-linux-android-g++ -c -ffunction-sections -funwind-tables -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -DANDROID -Wa,--noexecstack -std=c++11 -mfpmath=sse -O2 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wno-psabi -W -Wvla -D_REENTRANT -fPIC -DQT_NO_XKBCOMMON -DQT_BUILD_REMOTEOBJECTS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_URL_CAST_FROM_STRING -DQT_BUILD_REMOTEOBJECTS_LIB -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ic:/utils/openssl-android-master/include -I../../include -I../../include/QtRemoteObjects -I../../include/QtRemoteObjects/5.6.1 -I../../include/QtRemoteObjects/5.6.1/QtRemoteObjects -I. -IC:/Qt5.7.0/5.7/android_x86/include -IC:/Qt5.7.0/5.7/android_x86/include/QtNetwork -IC:/Qt5.7.0/5.7/android_x86/include/QtCore/5.7.0 -IC:/Qt5.7.0/5.7/android_x86/include/QtCore/5.7.0/QtCore -IC:/Qt5.7.0/5.7/android_x86/include/QtCore -I.moc -isystem D:/Daten/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem D:/Daten/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include -isystem D:/Daten/Android/android-ndk-r10e/platforms/android-9/arch-x86/usr/include -IC:/Qt5.7.0/5.7/android_x86/mkspecs/android-g++ -o .obj/qconnection_local_backend.obj qconnection_local_backend.cpp
Makefile:1720: recipe for target '.obj/qconnection_local_backend.obj' failed
process_begin: CreateProcess(NULL, D:\Daten\Android\android-ndk-r10e/toolchains/x86-4.9/prebuilt/windows/bin/i686-linux-android-g++ -c -ffunction-sections -funwind-tables -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -DANDROID -Wa,--noexecstack -std=c++11 -mfpmath=sse -O2 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wno-psabi -W -Wvla -D_REENTRANT -fPIC -DQT_NO_XKBCOMMON -DQT_BUILD_REMOTEOBJECTS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_URL_CAST_FROM_STRING -DQT_BUILD_REMOTEOBJECTS_LIB -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ic:/utils/openssl-android-master/include -I../../include -I../../include/QtRemoteObjects -I../../include/QtRemoteObjects/5.6.1 -I../../include/QtRemoteObjects/5.6.1/QtRemoteObjects -I. -IC:/Qt5.7.0/5.7/android_x86/include -IC:/Qt5.7.0/5.7/android_x86/include/QtNetwork -IC:/Qt5.7.0/5.7/android_x86/include/QtCore/5.7.0 -IC:/Qt5.7.0/5.7/android_x86/include/QtCore/5.7.0/QtCore -IC:/Qt5.7.0/5.7/android_x86/include/QtCore -I.moc -isystem D:/Daten/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem D:/Daten/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include -isystem D:/Daten/Android/android-ndk-r10e/platforms/android-9/arch-x86/usr/include -IC:/Qt5.7.0/5.7/android_x86/mkspecs/android-g++ -o .obj/qconnection_local_backend.obj qconnection_local_backend.cpp, ...) failed.
make (e=2): Das System kann die angegebene Datei nicht finden.
mingw32-make[2]: *** [.obj/qconnection_local_backend.obj] Error 2
mingw32-make[2]: Leaving directory 'D:/Daten/Android/qtremoteobjects/src/remoteobjects'
Makefile:44: recipe for target 'sub-remoteobjects-make_first-ordered' failed
mingw32-make[1]: *** [sub-remoteobjects-make_first-ordered] Error 2
mingw32-make[1]: Leaving directory 'D:/Daten/Android/qtremoteobjects/src'
Makefile:46: recipe for target 'sub-src-make_first' failed
mingw32-make: *** [sub-src-make_first] Error 2
Second Question Why is make not successful here? what do these errors mean? What is wrong with '.obj/qconnection_local_backend.obj'
Is it because I am running make on Windows?
Thanks,

Error when compiling OpenSSH for android

I'm trying to cross-compile OpenSSH for an Android Plateform (Armv7) using the Android-NDK. To do this, I followed instructions based on this post : Cross Compile OpenSSH for ARM.
I replace the "arm-linux-gnueabi-gcc" by the android equivalent : "arm-linux-androideabi-gcc". I managed to compile zlib and openssl, but when it comes to openssh, things become more complicated ...
Here is what I've done :
export HOST=arm-linux-androideabi
./configure --host=$HOST --target=$HOST --prefix=$HOME/OpenSSH/opensshArm
After that I had the following output : 
configure: error: *** OpenSSL headers missing - please install first or check config.log ***
So I modified my ./configure by this one :
./configure --host=$HOST --target=$HOST --prefix=$HOME/OpenSSH/opensshArm --with-ssl-dir=$HOME/OpenSSH/out/usr
Where $HOME/out/ is the output directory used to compile zlib and openssl.
Here is where I'm stuck : I launch the "make" and here is thi output : 
make[1]: Entering directory `/home/test/OpenSSH/openssh-6.4p1/openbsd-compat'
arm-linux-androideabi-gcc -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wno-pointer-sign -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -fno-builtin-memset -I. -I.. -I. -I./.. -I/home/test/OpenSSH/out/usr/include -DHAVE_CONFIG_H -c bsd-arc4random.c
In file included from /home/test/OpenSSH/out/usr/include/openssl/crypto.h:120,
from /home/test/OpenSSH/out/usr/include/openssl/bn.h:133,
from ../buffer.h:49,
from ../entropy.h:30,
from ../includes.h:177,
from bsd-arc4random.c:17:
/home/test/toolchain/bin/../sysroot/usr/include/stdlib.h:168: error: expected identifier or '(' before numeric constant
make[1]: *** [bsd-arc4random.o] Error 1
make[1]: Leaving directory `/home/test/OpenSSH/openssh-6.4p1/openbsd-compat'
make: *** [openbsd-compat/libopenbsd-compat.a] Error 2
Any helps ?

Use build_libstagefright in ffmpeg to build file .so for android

In order to use ffmpeg in android , I tried to build ffmpeg by using build_libstagefright in
ffmpeg/tools/lib_stagefright
but it alwalys appear a error which i coundn't solve it.
the message in the bottom of ffmpeg/config.log is
arm-linux-androideabi-g++ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I../android-source/frameworks/base/include -I../android-source/system/core/include -I../android-source/frameworks/base/media/libstagefright -I../android-source/frameworks/base/include/media/stagefright/openmax -I/home/user/android-ndk/sources/cxx-stl/gnu-libstdc++/include -I/home/user/android-ndk/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include -march=armv7-a -mfloat-abi=softfp -mfpu=neon -march=armv7-a -std=c99 -fomit-frame-pointer -fPIC -marm -Wno-multichar -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -c -o /tmp/ffconf.6ZzEMs87.o /tmp/ffconf.5jbfvJxK.cpp
./configure: line 701: /home/user/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: cannot execute binary file
ERROR: libstagefright_h264 not found
Anyone have the solution of this ??
my Build Environment is
Window 7
Cygwin
android-NDK-r8b linux version
I found a method ,let me cross this error.
In file of ffmpeg/configure
origin :
enabled libstagefright_h264 && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h
fixed :
enabled libstagefright && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h
When I fix libstagefright_h264 to libstagefright here, it seems be normal until the next error.
CC libavcodec/lagarithrac.o
CC libavcodec/latm_parser.o
CXX libavcodec/libstagefright.o
/bin/sh: /home/user/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux- x86/bin/arm-linux-androideabi-g++: cannot execute binary file
CC libavcodec/lcldec.o
common.mak:51: recipe for target `libavcodec/libstagefright.o' failed
make: *** [libavcodec/libstagefright.o] Error 126
make: *** Waiting for unfinished jobs....
PS: ffmpeg version is 1.0
Take a look at ffmpeg/config.log - there has to be an error description on the last line.
PS. On windows i used MinGW|MSYS to successfully compile ffmpeg

Categories

Resources