spise | 30 Mar 08:00 2013
Picon

build fails with android-ndk-r8e

I download latest android-ndk-r8e
android-ndk-r8e-ma-linux-x86.7z from http://code.google.com/p/mingw-and-ndk/downloads/list

./configure -release -opensource -confirm-license -xplatform android-g++ -android-ndk /opt/android-ndk-r8e-ma -android-sdk /opt/android-sdk-linux \
 -nomake tests -nomake tools -nomake examples -nomake demos \
 -skip qtwebkit -skip qtwebkit-examples-and-demos -skip qtscript -skip qttools -skip qtdoc -skip qtqa -skip qtactiveqt -skip qtquick1

make

build fails

/opt/android-ndk-r8e-ma/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wno-psabi -W -D_REENTRANT -fPIC -DQT_NO_PRINTDIALOG -DQT_NO_LIBUDEV -DQT_NO_XCB -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_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 -DPCRE_HAVE_CONFIG_H -DQT_CORE_LIB -DQT_NO_DEBUG -I../../mkspecs/android-g++ -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.1.0 -I../../include/QtCore/5.1.0/QtCore -Iglobal -I../3rdparty/pcre -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I.moc/release-shared -I/opt/android-ndk-r8e-ma/sources/cxx-stl/gnu-libstdc++/4.7/include -I/opt/android-ndk-r8e-ma/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I/opt/android-ndk-r8e-ma/platforms/android-9/arch-arm/usr/include -o .obj/release-shared/qwaitcondition_unix.o thread/qwaitcondition_unix.cpp
thread/qwaitcondition_unix.cpp: In function 'void qt_initialize_pthread_cond(pthread_cond_t*, const char*)':
thread/qwaitcondition_unix.cpp:75:61: error: 'pthread_condattr_setclock' was not declared in this scope


--
You received this message because you are subscribed to the Google Groups "android-qt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-qt+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Ray Donnelly | 30 Mar 16:43 2013
Picon

Re: build fails with android-ndk-r8e

It seems that NDK r8e adds the following definition to sys/limits.h

#define  _POSIX_MONOTONIC_CLOCK     0    /* the monotonic clock may be available; ask sysconf */

and this is the root cause of the problem.

I've attached a patch to fix it which I will submit to the Qt-Project later.

Also, for anyone else who gets my r8e, I made a mistake in the Linux x86 version of compressing it using Windows 7z because it can create much smaller archives than 7za on Linux - I did this because I'm nearly out of space on my google code project - the downside being that the executable bit gets lost in the process. ... I will re-compress with xz instead.

For now to work around this, you can do something horrible like:

find android-ndk-r8e -exec chmod +x {} \;

Cheers,

Ray.

--
You received this message because you are subscribed to the Google Groups "android-qt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-qt+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
diff --git a/src/corelib/thread/qwaitcondition_unix.cpp b/src/corelib/thread/qwaitcondition_unix.cpp
index 9b5c8d0..e3f8b2f 100644
--- a/src/corelib/thread/qwaitcondition_unix.cpp
+++ b/src/corelib/thread/qwaitcondition_unix.cpp
 <at>  <at>  -70,7 +70,7  <at>  <at>  void qt_initialize_pthread_cond(pthread_cond_t *cond, const char *where)
     pthread_condattr_t condattr;

     pthread_condattr_init(&condattr);
-#if !defined(Q_OS_MAC) && (_POSIX_MONOTONIC_CLOCK-0 >= 0)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID) && (_POSIX_MONOTONIC_CLOCK-0 >= 0)
     if (QElapsedTimer::clockType() == QElapsedTimer::MonotonicClock)
         pthread_condattr_setclock(&condattr, CLOCK_MONOTONIC);
 #endif

Gmane