This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Building Z-Stack Linux Gateway on x86 Linux Machine

Other Parts Discussed in Thread: Z-STACK

Hi All,

I want the start a new thread on the steps necessary in building the the Z-Stack Linux Gateway source package on x86 Linux machines (i.e. Ubuntu 16.04):. 

The included source code from the gateway installer can be rebuild for ARMv7 linux (i.e Beagle Bone Black) using Linaro Tool chain, I have done it without any problem. However, I am having troubles in building the source package for x86 Ubuntu 16.04 after modifying the package builder. Here are several high level questions:

  1. Where should the PATH and TCLIB variable point to?
  2. Should the C++ Protocol Buffer library (protobuf-c ) be build for x86? (as oppose to using the one included in the source, the file attributes says v7 for tag_CPU_arch in the included protobuf-c).  
  3. If the answer is yes to question 2, should .pb-c.c and .pb-c.h file be re-compiled using the Protocol Buffer compiler. (In this case, server.proto and zstack.proto are missing from the source).

Detailed steps are welcome. Thanks!

Z-Stack Linux Ubuntu Gateway Installer: http://www.ti.com/tool/z-stack-archive 

source code released: https://e2e.ti.com/support/wireless_connectivity/zigbee_6lowpan_802-15-4_mac/f/158/p/531192/2084135

Similar post without anwer:  https://e2e.ti.com/support/wireless_connectivity/zigbee_6lowpan_802-15-4_mac/f/158/p/397651/1592017#pi319568=1 

protobuf-c: https://github.com/google/protobuf/blob/master/src/README.md 

  • Hi YK,

    Thank you. I follow the steps outlined in the blog post above. However running into some errors mainly coming from /zstackpb/zstack.pb-c.c. Can you please take a look the error log attached. I appreciate all your help.

    a snippet:

    In file included from ../zstackpb/zstack.pb-c.c:8:0:
    ../zstackpb/zstack.pb-c.h:11:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
    typedef struct _AFAddr AFAddr;
    ^
    ../zstackpb/zstack.pb-c.h:498:3: error: unknown type name ‘AFAddr’
    AFAddr *dstaddr;
    ^
    ../zstackpb/zstack.pb-c.h:617:3: error: unknown type name ‘AFAddr’
    AFAddr *dstaddr;

    error.txt

  • I don't see this issue when I build it on my Ubuntu x86 32 bit system. What is your Linux version?

  • YiKai, thanks for the reply. I am using Ubuntu 16.04.4 32 bit and gcc version 5.4.0. what about you?

    For protobuf-c, Did you only installed the compiler? Do you have to modify the library path in build_all?  Also, did you specify TCLIB or path? I am not sure what I am missing here since you were able to built it. Did you perform any other steps besides those outlined in the blog?

    Thank you!

  • My Ubuntu version is 14.04.3 LTS 32 bit and gcc version is 4.8.4. I don't specify TCLIB or path. Just do the steps in blog and it builds and runs successfully.

  • Hi YiKai,

    I tried on 14.04 32 bit (14.04.5 LTS 32 bit to be exact) with default gcc (4.8.4), and it worked. Thank you!

     You do have to specify TCLIB to pass error check for some of makefile, but it can be pointed anywhere for x86 and has no impact. 

    I think the problem may not be 16.04 but rather GCC. I haven't test it on 16.04 with old version of gcc yet.  

    Q