Hi Ashok, others,
I am trying to build the connectivity directory for android following the
instructions in (resource/csdk/connectivity/build/How_To_Build.txt). I am doing
this for armeabi.
There are 2 problems ?
1. I notice that in connectivity/build/android/SConscript, there is a hardcoded
reference to use toolchain for x86 for android-19 (line # 51) ? meaning it
never chooses the TARGET_ARCH I specify:
env.AppendUnique(CPPPATH = [android_ndk +
'/platforms/android-19/arch-x86/usr/include/'])
2. On changing ?arch-x86? to ?arch-arm?, I am seeing the following error
message:
android-ndk-r10d/platforms/android-19/arch-arm/usr/include/stdint.h:174:0:
warning: "__UINT64_C" redefined [enabled by default]
#define __UINT64_C(c) c ## ULL
^
lib/libcoap-4.1.1/net.c:1:0: note: this is the location of the previous
definition
/* net.c -- CoAP network interface
^
lib/libcoap-4.1.1/net.c: Assembler messages:
lib/libcoap-4.1.1/net.c:1621: Error: no such instruction: `rev16 %dx,%dx'
scons: *** [out/android/armeabi/release/lib/libcoap-4.1.1/libcoap_net.o]
Error 1
scons: building terminated because of errors
Has anybody encountered this error before?
I tried by using /platforms/android-21/arch-arm/?, but that?s giving me other
errors:
android-ndk-r10d/platforms/android-21/arch-arm/usr/include/asm/signal.h:101:22:
error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
#define sa_handler _u._sa_handler
android-ndk-r10d/platforms/android-21/arch-arm/usr/include/signal.h:86:18:
note: in expansion of macro 'sa_handler'
sighandler_t sa_handler;
^
common/src/logger.c:56:22: warning: 'LEVEL_XTABLE' defined but not used
[-Wunused-variable]
static oic_log_level LEVEL_XTABLE[] =
^
scons: *** [out/android/armeabi/release/common/src/logger.os] Error 1
thanks,
rahul
From: Naga Ashok Babu Jampani [mailto:[email protected]]
Sent: Thursday, April 09, 2015 6:03 PM
To: Rahul, Rahul; ASHOKBABU CHANNA; Lankswert, Patrick; Keane, Erich; Uze Choi
Cc: iotivity-dev at lists.iotivity.org
Subject: Re: RE: RE: RE: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
Hi Rahul,
Now the patch set is merged. I would like to Thank you for your Support.
Thanks to everyone for your inputs and comments, that helpmed me improve the
patchset.
Best Regards,
Ashok JN
------- Original Message -------
Sender : Rahul, Rahul<rahul.rahul at intel.com<mailto:rahul.rahul at intel.com>>
Date : Apr 09, 2015 20:55 (GMT+09:00)
Title : RE: RE: RE: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
<!--[if mso 9]-->
Hi Ashok,
Thanks for the email. I verified that the latest patch builds as you mentioned.
The instructions need to be updated as I didn?t have to make changes to the
resource/csdk/connectivity/common/SConscript file as there is no ?glib_dir?
reference there.
scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=WIFI
? it generates libconnectivity_abstraction.so, liboctbstack.so and libcoap.a
files.
I will look at the sconscript changes you have made later today and try it and
provide an update.
Thanks,
Rahul
From: Naga Ashok Babu Jampani [mailto:[email protected]]
Sent: Thursday, April 09, 2015 3:43 AM
To: Rahul, Rahul; ASHOKBABU CHANNA; Lankswert, Patrick; Keane, Erich; Uze Choi
Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at
lists.iotivity.org>
Subject: Re: RE: RE: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
Hi Rahul,
We have resolved the linking issues for CA along with RI layer.
Build was successful and built liboctbstack.so. Here is the build summary :
Install file:
"out/android/armeabi/release/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap.a"
as "out/android/armeabi/release/libcoap.a"
Install file:
"out/android/armeabi/release/resource/csdk/connectivity/src/libconnectivity_abstraction.so"
as "out/android/armeabi/release/libconnectivity_abstraction.so"
Install file: "out/android/armeabi/release/resource/csdk/liboctbstack.so" as
"out/android/armeabi/release/liboctbstack.so"
I have ensured to add the platform specific abstraction as well. Please build
and let us know the result.
We have restricted some of SConscripts, as we have problems in building these.
Please remove those based on your requirement.
In the CA branch Ethernet and BLE are not supported. I have added build error
to not allow TARGET_TRANSPORT=ALL option.
Please mention WIFI, ETHERNET or both, while building for Android.
Best Regards,
Ashok
------- Original Message -------
Sender : Rahul, Rahul<rahul.rahul at intel.com<mailto:rahul.rahul at intel.com>>
Date : Apr 09, 2015 09:56 (GMT+09:00)
Title : RE: RE: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
<!--[if mso 9]-->
Hi Ashok,
This is the multiple definition error I am running into:
/home/rahul/androidTest/android-ndk-r10d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
error:
out/android/armeabi/release/resource/csdk/connectivity/src/bt_le_adapter/android/caleadapter.os:
multiple definition of 'CAReadLEData'
/home/rahul/androidTest/android-ndk-r10d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
out/android/armeabi/release/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.os:
previous definition here
Thanks,
Rahul
From: Naga Ashok Babu Jampani [mailto:[email protected]]
Sent: Wednesday, April 08, 2015 8:33 AM
To: Rahul, Rahul; ASHOKBABU CHANNA; Lankswert, Patrick; Keane, Erich; Uze Choi
Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at
lists.iotivity.org>
Subject: Re: RE: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
Dear Rahul,
We have pushed our changes in gerrit commit:
Now we are able build connectivity abstraction, libcoap and glib libraries as
.so?s
For RI to build, there are two options
1) RI source code need to modified to build as .so and load all
.so?s(ri.so,ca.so,glib.so,coap.so -using load library) in android Java
application.
2) RI source need to modified to build a single .so ( binding
ca.a,glib.a,coap.a statically) and load in the android java application( using
the load library)
For first options, above CA changes are enough. So please modify RI layer to
make .so to avoid the undefined references. And for android, we should avoid
the linux RI samples as they will not work for android system.
Let us know if you have any queries.
Regards,
Ashok JN
------- Original Message -------
Sender : Rahul, Rahul<rahul.rahul at intel.com<mailto:rahul.rahul at intel.com>>
Date : Apr 08, 2015 17:55 (GMT+09:00)
Title : RE: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
<!--[if mso 9]-->
Hi Ashok,
I got past the glib error but I am running into these now with patchset 5:
out/android/armeabi/release/resource/csdk/stack/src/ocstack.os:ocstack.c:function
SendResponse: error: undefined reference to 'CASendResponse'
out/android/armeabi/release/resource/csdk/stack/src/ocstack.os:ocstack.c:function
OCProcessPresence: error: undefined reference to 'CACreateRemoteEndpoint'
out/android/armeabi/release/resource/csdk/stack/src/ocstack.os:ocstack.c:function
OCProcessPresence: error: undefined reference to 'CASendRequest'
out/android/armeabi/release/resource/csdk/stack/src/ocstack.os:ocstack.c:function
OCProcessPresence: error: undefined reference to 'CADestroyRemoteEndpoint'
?
?
out/android/armeabi/release/resource/csdk/stack/src/ocserverrequest.os:ocserverrequest.c:function
HandleSingleResponse: error: undefined reference to 'CASendResponse'
out/android/armeabi/release/resource/csdk/logger/src/logger.os:logger.c:function
OCLog: error: undefined reference to '__android_log_write' collect2: error: ld
returned 1 exit status scons: ***
[out/android/armeabi/release/resource/csdk/liboctbstack.so] Error 1
Thanks,
Rahul
From: iotivity-dev-bounces at lists.iotivity.org<mailto:iotivity-dev-bounces at
lists.iotivity.org> [mailto:[email protected]] On Behalf
Of Rahul, Rahul
Sent: Monday, April 06, 2015 11:46 AM
To: jn.ashok at samsung.com<mailto:jn.ashok at samsung.com>; ASHOKBABU CHANNA;
Lankswert, Patrick; Keane, Erich; Uze Choi
Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at
lists.iotivity.org>
Subject: Re: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
Hi Ashok,
I still see the same glib error when building with scons with the latest patch.
Did it build for you?
Compiling
out/android/armeabi/release/resource/csdk/connectivity/common/src/umutex.o
resource/csdk/connectivity/common/src/umutex.c:27:18: fatal error: glib.h: No
such file or directory
#include <glib.h>
Also, in the glib_build.sh, ?set NDK_PATH? should instead be ?export NDK_PATH?
Thanks,
rahul
From: Naga Ashok Babu Jampani [mailto:[email protected]]
Sent: Monday, April 06, 2015 9:15 AM
To: Rahul, Rahul; ASHOKBABU CHANNA; Lankswert, Patrick; Keane, Erich; Uze Choi
Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at
lists.iotivity.org>
Subject: Re: Re: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
Hi Rahul,
I have just uploaded the patch to fix the Scons build. Please go through the
changes :
https://gerrit.iotivity.org/gerrit/#/c/623/.
Let me know if you have any issues.
Best Regards,
Ashok
------- Original Message -------
Sender : Naga Ashok Babu Jampani<jn.ashok at samsung.com<mailto:jn.ashok at
samsung.com>> Senior Engineer/IoT Solution Lab./Samsung Electronics
Date : Apr 07, 2015 00:20 (GMT+09:00)
Title : Re: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
Hi Rahul,
I am currently working on the SCons script. I was able to fix the glib linking
but, currenlty facing issues with libcoap. I will fix it by tomorrow and upload
the patch by tomorrow evening.
Meanwhile can you please update me how to resolve the boost error? I tried to
go through the Read me files, but could not find much information.
Best Regards,
Ashok.
------- Original Message -------
Sender : Rahul, Rahul<rahul.rahul at intel.com<mailto:rahul.rahul at intel.com>>
Date : Apr 04, 2015 08:43 (GMT+09:00)
Title : Re: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
Hi Ashok,
I was trying to build the CA branch with patchset 623 but am running into
issues.
I cloned the latest iotivity and changed to CA branch. Then I applied the
patchset 623 and followed the instructions. It generated the libglib-2.40.2.so
and libgthread-2.40.2.so, which were copied to
?resource/csdk/connectivity/lib/android?, as mentioned in the Readme.
Next, I tried to build iotivity using scons by going to the project root and
trying:
scons TARGET_OS=android TARGET_ARCH=armeabi.
First I got a boost error (I don?t see a boost directory under extlibs). I got
past this error by copying boost from another location.
Once past this, I got the glib error again:
resource/csdk/connectivity/common/src/umutex.c:27:18: fatal error: glib.h: No
such file or directory
#include <glib.h>
^
Could you tell me if I am missing anything? Or is there a different way to
build iotivity (not using scons) for android?
Thanks,
rahul
From: iotivity-dev-bounces at lists.iotivity.org<mailto:iotivity-dev-bounces at
lists.iotivity.org> [mailto:[email protected]] On Behalf
Of ASHOKBABU CHANNA
Sent: Wednesday, April 01, 2015 7:38 PM
To: Lankswert, Patrick; Keane, Erich; Uze Choi
Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at
lists.iotivity.org>
Subject: Re: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
Dear Pat,
I completely agree that merging CA should not break any thing in master.
Point is, we are discussing two different topics which are independent.
1) Publishing the APIs:
Mr.Uze Choi has requested to publish the APIs for easy primitive
service modification and Vijay published the APIs yesterday. Thanks Vijay. It
is not blocked as I mentioned in my previous mail.
2) Merging CA to master:
As CA is a multi-thread (Rich), single-thread (Lite) and RI is Single
thread, there is a dependency with glib library on android (For Linux/Tizen it
will link automatically)
We created a build instructions and patch file @
https://gerrit.iotivity.org/gerrit/#/c/623/ about how to build in android and
make glib library. This allows building in android.
I have one question. Is the cstack tested on android in master or in ca branch
? We tested CA in android but did not see any comments on CA android version so
curious about it.
Regards,
Ashok
------- Original Message -------
Sender : Lankswert, Patrick<patrick.lankswert at
intel.com<mailto:patrick.lankswert at intel.com>>
Date : Apr 02, 2015 00:31 (GMT+09:00)
Title : RE: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
<!--[if mso 9]-->
Ashok,
Erich is right. If it worked on master, we need to fix it on CA before merging.
Since merge is my #1 priority, it is important to fix.
Pat
From: iotivity-dev-bounces at lists.iotivity.org<mailto:iotivity-dev-bounces at
lists.iotivity.org> [mailto:[email protected]] On Behalf
Of Keane, Erich
Sent: Wednesday, April 01, 2015 11:14 AM
To: ashok.channa at samsung.com<mailto:ashok.channa at samsung.com>; Uze Choi
Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at
lists.iotivity.org>
Subject: Re: [dev] [API change info sharing request] RE: Change in
iotivity[master]: Redefine and implement findResource API
This was ultimately my understanding, that we don?t to break anything that is
currently working. A simple scons TARGET_OS=android should properly build on
all branches.
It would be up to Pat to decide on this, so I?m awaiting his clarification.
From: ASHOKBABU CHANNA [mailto:[email protected]]
Sent: Tuesday, March 31, 2015 5:58 PM
To: Keane, Erich; Uze Choi
Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at
lists.iotivity.org>
Subject: [API change info sharing request] RE: Change in iotivity[master]:
Redefine and implement findResource API
Dear Erich,
We did not understand how CA android build issue is blocking ?publishing of
API changes in base stack?.
I think these two are separate issues to deal with.
Frankly, if you are ready, you can still go-ahead with publishing the APIs.
It helps Primitive services to make changes and be ready for v0.9.
Current CA Android build will work fine if glib-gnome is built with ndk-build.
We are making it easier by providing the patch file and build instructions.
We already responded to Vijay?s mail regarding the integration of two adapters
and proposed connectivity name.
Regards,
Ashok
------- Original Message -------
Sender : Keane, Erich<erich.keane at intel.com<mailto:erich.keane at intel.com>>
Date : Apr 01, 2015 01:45 (GMT+09:00)
Title : Re: [dev] Asking regarding CA Branch merging Detail: [API change info
sharing request] RE: Change in iotivity[master]: Redefine and implement
findResource API
My understanding is that we are still held up on Vijay's list. One
significant outstanding item that I see is the Android build on CA,
which does not properly build using SCONS, which I believe is considered
a blocker.
I'd emailed both Ashoks earlier last week, though I didn't hear anything
back.
On Tue, 2015-03-31 at 19:27 +0900, ???(Uze Choi) wrote:
> Hi Pat,
>
> As far as I know, you will merge the CA code into master at the end of this
> week.
> For smooth integration, we are now changing the primitive service source code
> for changed base layer APIs.
> And have the plan to push the code into the CA branch.
> However, there are lots of discrepancy between CA and master branch including
> bugfix and so on from the primitive service point of view.
>
> So that I wish you merge the CA code into the master with auto-merge command,
> which make sure the latest committed primitive source code into master.
> Please share the plan of merge detail.
>
> BR, Uze Choi
> -----Original Message-----
> From: ???(Uze Choi) [mailto:uzchoi at samsung.com]
> Sent: Monday, March 30, 2015 2:28 PM
> To: 'Kesavan, Vijay S'
> Cc: 'Lankswert, Patrick'; 'iotivity-dev at lists.iotivity.org'
> Subject: RE: [API change info sharing request] RE: Change in
> iotivity[master]: Redefine and implement findResource API
>
> Hi Vijay,
>
> "Early next week we will send an email to the reflector outlining the changes
> and actions that have to be taken by those using the APIs."
> >> Could you share the API change context ASAP?
> To prepare the April release, primitive service should integrate with
> updated base layer by CA branch.
> Thank you for your information sharing in advance.
>
> BR, Uze Choi
> -----Original Message-----
> From: Kesavan, Vijay S [mailto:vijay.s.kesavan at intel.com]
> Sent: Friday, March 20, 2015 9:55 AM
> To: uzchoi at samsung.com<mailto:uzchoi at samsung.com>
> Cc: Lankswert, Patrick; iotivity-dev at
> lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>
> Subject: RE: [API change info sharing request] RE: Change in
> iotivity[master]: Redefine and implement findResource API
>
> Uze,
>
> With regards to your questions, as discussed previously, the first version of
> Iotivity with CA will support selecting the connection type in relevant APIs.
> Additionally, there will be support to distinguish the same resource
> discovered on multiple interfaces using a unique identifier, the server ID.
> These features along with sample applications are already implemented in the
> CA branch.
>
> Yes, there are differences between the master and CA APIs (C & C++), not very
> extensive, and when CA is merged with master the APIs will need update.
> Early next week we will send an email to the reflector outlining the changes
> and actions that have to be taken by those using the APIs.
>
> On an unrelated but relevant note, perhaps you are following the discussion
> threads in the mailing list suggesting how to handle multiple interfaces.
> Some of the suggestion are reasonable and when incorporated are expected to
> result in additional API changes.
>
> Regards,
> --Vijay
>
> -----Original Message-----
> From: ???(Uze Choi) [mailto:uzchoi at samsung.com]
> Sent: Wednesday, March 18, 2015 8:54 PM
> To: Kesavan, Vijay S
> Cc: Lankswert, Patrick; iotivity-dev at
> lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>
> Subject: RE: [API change info sharing request] RE: Change in
> iotivity[master]: Redefine and implement findResource API
>
> Hi, Vijay
>
> Regarding the previous question, I haven't got the response yet.
> May I expect your explanation?
> First of all, please Let me clear there is any difference the base layer API
> between the master branch and connectivity abstraction branch.
>
> BR, Uze Choi
> -----Original Message-----
> From: ???(Uze Choi) [mailto:uzchoi at samsung.com]
> Sent: Friday, February 13, 2015 1:06 PM
> To: Kesavan, Vijay S (vijay.s.kesavan at intel.com<mailto:vijay.s.kesavan at
> intel.com>)
> Cc: 'Patrick Lankswert'; iotivity-dev at
> lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>
> Subject: [API change info sharing request] RE: Change in iotivity[master]:
> Redefine and implement findResource API
>
> Hi Vijay,
>
> Could you share the Base Layer API change according to the CA layer merging?
> As far as I know, two feature were discussed.
> - connectivity selection
> - host parameter to identify the Resource Server/Clients are same one
> according to the different connectivity.
> And status together whether implemented or be planned.
>
> BR, Uze Choi
> -----Original Message-----
> From: Gerrit Code Review [mailto:gerrit at iotivity.org]
> Sent: Wednesday, February 11, 2015 2:52 AM
> To: Caiwen Zhang
> Cc: Uze Choi; Patrick Lankswert; jenkins-iotivity
> Subject: Change in iotivity[master]: Redefine and implement findResource API
>
> From Erich Keane :
>
> Erich Keane has posted comments on this change.
>
> Change subject: Redefine and implement findResource API
> ......................................................................
>
>
> Patch Set 1:
>
> The parameters are all supposed to be part of the spec, I don't think they
> were ever implemented correctly in the C stack however, so the C++ stack
> kinda punted.
>
> We definitely need to revisit this and see whats up.
>
> --
> To view, visit https://gerrit.iotivity.org/gerrit/321
> To unsubscribe, visit https://gerrit.iotivity.org/gerrit/settings
>
> Gerrit-MessageType: comment
> Gerrit-Change-Id: I1ca7ea0ec6114b661aee7c83f0fe4567784b3a56
> Gerrit-PatchSet: 1
> Gerrit-Project: iotivity
> Gerrit-Branch: master
> Gerrit-Owner: Caiwen Zhang
> Gerrit-Reviewer: Erich Keane
> Gerrit-Reviewer: Patrick Lankswert
> Gerrit-Reviewer: Uze Choi
> Gerrit-Reviewer: jenkins-iotivity
> Gerrit-HasComments: No
>
>
> _______________________________________________
> iotivity-dev mailing list
> iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev
_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>
https://lists.iotivity.org/mailman/listinfo/iotivity-dev
[cid:image001.gif at 01D07378.58679EC0]
[http://ext.samsung.net/mailcheck/SeenTimeChecker?do=d083a0c0528fae52e3c44e240cb174afd52ddef88f7ca1dd82319505f2f3cbd2947314416f8c071f09060032c89b30e00407d1a278fe738d3298a32fe7c0f484cf878f9a26ce15a0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150410/907c0d8d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13168 bytes
Desc: image001.gif
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150410/907c0d8d/attachment.gif>