I'll also note that this check is done in
build_common/iotivityconfig/__init__.py

This file (~line 100) checks to ensure that the _pthread files are legal
for the current platform.

It calls into build_common/iotivityconfig/compiler/configuration.py :68

This tries to compile the following code (same file, line 166) using the
current compiler's configuration:
  2         return """
  3 #include <unistd.h>
  4 #include <pthread.h>
  5 int main()
  6 {
  7     #ifndef _POSIX_THREADS
  8     # error POSIX Threads support not available
  9     #endif
 10     return 0;
 11 }
 12 """


This code will fail mainly on a platform for 1 of 2 reasons.  1:
pthread.h is not in its library, or it doesnt define _POSIX_THREADS.

-Erich


On Tue, 2015-06-02 at 23:21 +0000, Keane, Erich wrote:
> It doesn't seem to do this on master for me... I wonder if the 'cached'
> component on your version is the reason for this?
> 
> Can you try doing an rm -rf on the out directory and a scons -c and
> trying again?  
> 
> If it still does this, check out your config.log in the root directory,
> it'll tell you what it did the test on (often the failure is not for the
> reason being tested sadly).
> 
> Attach it if you'd like, and I can take a look.
> 
> On Tue, 2015-06-02 at 23:17 +0000, Naga Ashok Babu Jampani wrote:
> > Hi,
> > 
> > I have taken the latest code and trying to build android. Currently
> > the build is broken. I tried to identify the issue, myself.
> > 
> > I get the following print, in the SConscript :
> > 
> > Checking for POSIX Thread Support...(cached) no
> > 
> > Can someone point me what is causing this?
> > 
> > if POSIX_SUPPORTED is false,  cathreadpool_pthreads.c and
> > camutex_pthread.c are not inlcuded. 
> > 
> > I have temporarily fixed it in my local SConscript at
> > resource/csdk/connectivity/common/SConscript, to always include these
> > files in the build.
> > 
> >  
> > 
> > Best Regards,
> > 
> > Ashok JN
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > iotivity-dev mailing list
> > iotivity-dev at lists.iotivity.org
> > https://lists.iotivity.org/mailman/listinfo/iotivity-dev
> 
> _______________________________________________
> iotivity-dev mailing list
> iotivity-dev at lists.iotivity.org
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to