Cross compiling native c and c++ code using pepper_63 toolchain for smartTV

Hi,

I’m trying to cross compile my sample application code which is written in c for ARM target using pepper_63 toolchain downloaded from samsung developer site.

But, while cross compiling the source with my make file, i’m seeing lot of issues

  1. Predefined macros like unix, unix, __unix etc are unavailable which is causing compilation issues.
  2. Getting lot of warnings for system functions like socket, connect etc.
    [root@localhost pepper_63]# toolchain/linux_arm_glibc/bin/arm-nacl-gcc -g -o SAM server.c
    /tmp/ccVJDzPF.o: In function `main’:
    /home/arisanka/tizen/pepper_63/server.c:51: warning: accept is not implemented and will always fail
    /home/arisanka/tizen/pepper_63/server.c:40: warning: bind is not implemented and will always fail
    /home/arisanka/tizen/pepper_63/server.c:46: warning: listen is not implemented and will always fail
    /home/arisanka/tizen/pepper_63/server.c:59: warning: send is not implemented and will always fail
    /home/arisanka/tizen/pepper_63/server.c:29: warning: setsockopt is not implemented and will always fail
    /home/arisanka/tizen/pepper_63/server.c:22: warning: socket is not implemented and will always fail
    i don’t know what this warning means. I could see the symbols for these system functions are present in the libc.so for the target
    [root@localhost pepper_63]# toolchain/linux_arm_glibc/bin/arm-nacl-readelf -a toolchain/linux_arm_glibc/arm-nacl/lib/libc-2.23.so | grep socket
    48: 001229d0 56 FUNC WEAK DEFAULT 2 socket@@GLIBC_2.22
    466: 00122a10 56 FUNC GLOBAL DEFAULT 2 socketpair@@GLIBC_2.22
    1675: 001229d0 56 FUNC GLOBAL DEFAULT 2 __socket@@GLIBC_PRIVATE
    9490: 00000000 0 FILE LOCAL DEFAULT ABS socket.c
    9496: 00000000 0 FILE LOCAL DEFAULT ABS socketpair.c
    13867: 001229d0 56 FUNC LOCAL DEFAULT 2 __GI___socket
    14680: 00122a10 56 FUNC GLOBAL DEFAULT 2 socketpair
    14889: 001229d0 56 FUNC GLOBAL DEFAULT 2 __socket
    15168: 001229d0 56 FUNC WEAK DEFAULT 2 socket
  3. Network related headers are missing like
    …/protolib/src/linux/linuxCap.cpp:26:30: fatal error: netpacket/packet.h: No such file or directory
    #include <netpacket/packet.h>
    I can see the headers present in x86 target but not for ARM
    [root@localhost pepper_63]# find . -name packet.h
    ./toolchain/linux_x86_glibc/x86_64-nacl/include/netpacket/packet.h
    ./toolchain/win_x86_glibc/x86_64-nacl/include/netpacket/packet.h
    ./toolchain/mac_x86_glibc/x86_64-nacl/include/netpacket/packet.h
    ./include/nacl_io/socket/packet.h

Appreciate any help or support on this.
Regards,
S.Arivazhagan