cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Platform for aarch64 processor to compile C SDK program

SS_10329829
4-Participant

Platform for aarch64 processor to compile C SDK program

Hello community,

 

I am newbie to C SDK. 

I am using Linux odroid 4.9.277-122 aarch64 GNU/Linux

I compile the C SDK program by using the following command.

 

 

 

make PLATFORM=gcc-linux-x86-64 BUILD=release

 

 

 

I got " unknown type " error in the twMessages.h, twMessaging.h, twApi.h  header files.

 

 

In file included from ../src/twMessages.h:13,
                 from ../src/twMessaging.h:7,
                 from ../src/twApi.h:21,
                 from ../src/main.c:99:
../src/twInfoTable.h:88:2: error: unknown type name 'twList'
   88 |  twList * aspects;   /**< A ::twList of the aspects associated with the                                                                              entry. **/
      |  ^~~~~~
../src/twInfoTable.h:186:2: error: unknown type name 'twList'
  186 |  twList * entries; /**< A list of the entries associated with the ::twDa                                                                             taShape **/
      |  ^~~~~~
../src/twInfoTable.h:303:2: error: unknown type name 'twList'
  303 |  twList * fieldEntries; /**< A ::twList of the entries associated with t                                                                             he ::twInfoTableRow. **/
      |  ^~~~~~
../src/twInfoTable.h:419:2: error: unknown type name 'twList'
  419 |  twList * rows;    /**< A ::twList of the ::twInfoTableRow entries assoc                                                                             iated with the ::twInfoTable. **/
      |  ^~~~~~
In file included from ../src/twMessaging.h:7,
                 from ../src/twApi.h:21,
                 from ../src/main.c:99:
../src/twMessages.h:68:2: error: unknown type name 'twList'
   68 |  twList * headers;
      |  ^~~~~~
In file included from ../src/twMessaging.h:7,
                 from ../src/twApi.h:21,
                 from ../src/main.c:99:
../src/twMessages.h:165:2: error: unknown type name 'twList'
  165 |  twList * multipartMessageList;
      |  ^~~~~~
In file included from ../src/twApi.h:21,
                 from ../src/main.c:99:
../src/twMessaging.h:53:2: error: unknown type name 'twList'
   53 |  twList * responseCallbackList;
      |  ^~~~~~
../src/twMessaging.h:54:2: error: unknown type name 'twList'
   54 |  twList * incomingRequestCallbacks;
      |  ^~~~~~
../src/twMessaging.h:55:2: error: unknown type name 'twList'
   55 |  twList * multipartMessageList;
      |  ^~~~~~
In file included from ../src/main.c:99:
../src/twApi.h:164:2: error: unknown type name 'twList'
  164 |  twList * callbackList;                   /**< Pointer to a ::twList of                                                                              callbacks. **/
      |  ^~~~~~
../src/twApi.h:165:2: error: unknown type name 'twList'
  165 |  twList * boundList;                      /**< Pointer to a ::twList of                                                                              bound entities. **/
      |  ^~~~~~
../src/twApi.h:166:2: error: unknown type name 'twList'
  166 |  twList * bindEventCallbackList;          /**< Pointer to a ::twList of                                                                              bind event callbacks. **/
      |  ^~~~~~
../src/twApi.h:175:2: error: unknown type name 'twList'
  175 |  twList * offlineMsgList;                 /**< Pointer to a ::twList of                                                                              offline messages. **/
      |  ^~~~~~
../src/twApi.h:927:1: note: in expansion of macro 'propertyList'
  927 | propertyList * twApi_CreatePropertyList(char * name, twPrimitive * value                                                                             , DATETIME timestamp);
      | ^~~~~~~~~~~~
../src/twApi.h:30:22: error: unknown type name 'twList'
   30 | #define propertyList twList /* A propertyList is a twList */
      |                      ^~~~~~
../src/twApi.h:938:30: note: in expansion of macro 'propertyList'
  938 | int twApi_DeletePropertyList(propertyList * list);
      |                              ^~~~~~~~~~~~
../src/twApi.h:30:22: error: unknown type name 'twList'
   30 | #define propertyList twList /* A propertyList is a twList */
      |                      ^~~~~~
../src/twApi.h:957:29: note: in expansion of macro 'propertyList'
  957 | int twApi_AddPropertyToList(propertyList * proplist, char * name, twPrim                                                                             itive * value, DATETIME timestamp);
      |                             ^~~~~~~~~~~~
../src/twApi.h:30:22: error: unknown type name 'twList'
   30 | #define propertyList twList /* A propertyList is a twList */
      |                      ^~~~~~
../src/twApi.h:1032:77: note: in expansion of macro 'propertyList'
 1032 | roperties(enum entityTypeEnum entityType, char * entityName, propertyLis                                                                             t * properties, int32_t timeout, char forceConnect);
      |                                                              ^~~~~~~~~~~                                                                             

 

 

 

May I know how can I solve the issue in 64bit processor (aarch64)?

 

I also compiled the C SDK program using "gcc-linux-arm" platform.

 

 

make PLATFORM=gcc-linux-arm BUILD=release

 

 

 

I got the following error:

 

 

/usr/bin/gcc -fvisibility=hidden  -DTW_OS_INCLUDE='"twLinux.h"' -Wall -mstructure-size-boundary=32 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCC_GNU -pthread -fPIC -ffunction-sections -fdata-sections -DENABLE_TASKER=1     -DOFFLINE_MSG_STORE=1  -Os -s -fno-asynchronous-unwind-tables -Wl,--strip-all -Wno-pointer-sign -I ../src -I ../src/api -I ../src/config -I ../src/fileTransfer -I ../src/messaging -I ../src/porting -I ../src/tls -I ../src/utils -I ../src/websocket -I ../src/tunneling -I ../src/subscribedProps -I ../src/stubs -I ../src/thirdParty/axTLS/ssl -I ../src/thirdParty/axTLS/crypto -I ../src/thirdParty/axTLS/config -I ../src/thirdParty/axTLS -I ../src/thirdParty/libcfu/src -I ../src/thirdParty/cJSON -I ../src/thirdParty/libcfu/src -I ../src/thirdParty/tomcrypt/src/headers -I ../src/thirdParty/ntlm -I ../src/thirdParty/wildcard                         -DLTC_NO_ROLC      -c ../src/thirdParty/axTLS/crypto/aes.c
gcc: error: unrecognized command line option '-mstructure-size-boundary=32'
make[1]: *** [Makefile:188: obj/release/../src/thirdParty/axTLS/crypto/aes.o] Error 1

 

 

 

May I know what platform should I choose to be able to compile C SDK program successfully in aarch64?

I got the following platforms:

 

 

win32-openssl
win32-dll
win32
gcc-osx-x86-64-openssl
gcc-osx-x86-64
gcc-linux-x86-64-openssl
gcc-linux-x86-64-cross-openssl
gcc-linux-x86-64-cross
gcc-linux-x86-32-openssl
gcc-linux-x86-32-cross-openssl
gcc-linux-x86-32-cross
gcc-linux-coldfire-cross
gcc-linux-arm-openssl
gcc-linux-arm-hwfpu-openssl
gcc-linux-arm-hwfpu-cross-openssl
gcc-linux-arm-hwfpu-cross
gcc-linux-arm-hwfpu
gcc-linux-arm-cross-openssl
gcc-linux-arm-cross
gcc-linux-arm

 

 

 

I compiled the same program in the 32 bit processor (armv71) using gcc-linux-arm platform. There is no error. 

 

Last but not least, may I know how can I check what version of CSDK and CMake am I using?

Thank you.

0 REPLIES 0
Announcements


Top Tags