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.

syslink 2.0.0.67 unable to build user demos. can't find stdio.h using ezsdk 5.0.0.11

Expert 2220 points


Hello,

I am trying to build the syslink demos in syslink 2.0.0.67. So far i have been able to build syslink.ko and the kernel samples. I am currently stuck trying to build the user examples (found on page 9 of SysLink 02.00.00.67 alph2 InstallGuide Linux TI81XX). When i call the makefile I get the following:

oot@BensLinux:/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/notify/usr/Linux# make
Building /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples/notifyapp (debug, release)
mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/lib
mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/.objs/usr
mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples
mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples/notifyapp
mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/bin/TI816X/samples
Compiling: /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/notify/NotifyApp.c
In file included from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/Std.h:55,
                 from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/notify/NotifyApp.c:52:
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/inc/usr/Linux/std_linux.h:54:19: error: stdio.h: No such file or directory
In file included from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/Memory.h:64,
                 from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/notify/NotifyApp.c:57:
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h: In function 'IHeap_alloc':
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h:205: error: 'NULL' undeclared (first use in this function)
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h:205: error: (Each undeclared identifier is reported only once
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h:205: error: for each function it appears in.)
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h: In function 'IHeap_free':
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h:224: error: 'NULL' undeclared (first use in this function)
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h: In function 'IHeap_getStats':
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h:240: error: 'NULL' undeclared (first use in this function)
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h: In function 'IHeap_isBlocking':
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h:258: error: 'NULL' undeclared (first use in this function)
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h: In function 'IHeap_getKnlHandle':
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/utils/IHeap.h:278: error: 'NULL' undeclared (first use in this function)
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/notify/NotifyApp.c:60:30: error: ti/ipc/MultiProc.h: No such file or directory
/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/notify/NotifyApp.c:61:27: error: ti/ipc/Notify.h: No such file or directory

and so on for a few pages.

Obviously there are paths to header files that to be defined somewhere but i really have no clue where. Anyone have any recommendations?

Thanks,

Ben

  • I forgot to mention that I am using ezsdk 5.0.0.11

  • Did you properly set SYSLINK_PKGPATH?

    The Install Guide mentions doing so on the make command line:
    $ make TOOLCHAIN_PREFIX=/db/psp_git/syslink_toolchains/arm-2009q1/bin/arm-none-linux-gnueabi- SYSLINK_PKGPATH="/toolchains/IPC/ipc_<version>/packages;$HOME/syslink"

    Every directory in $SYSLINK_PKGPATH is added to the compile command with a preceding "-I".  This won't cover your problem of not finding stdio.h, but will probably help with the subsequent problems of not finding Notify.h and MultiProc.h (which are in the Ipc installation).

    As for stdio.h, I don't think there's anything in the SysLink build system to add the codegen tools' <...>/usr/include location to the -I entries for the compile command.  This leads me to believe that codegen is expected to add it automatically, and if so, it's possible that you are using a codegen suite that doesn't automatically do this, or perhaps has been "told" not to.  If not, the codegen's "usr/include" location needs to be added to SYSLINK_PKGPATH so that it gets automatically added by the SysLink build system.

    You can see the exact compile command being issued by doing:
        % make V=1
    This will show you all the explicit -I settings.

    What are your code generation tools in use?

    Regards,

    - Rob

  • Hi Rob, thank you very much for your help. Let me give you a little more info. First, let me give you a little more info.

     

    I am able to successfully build the syslink.ko module on page 6 on the syslink install guide.

    I am also able to build the kernel samples on page 6-7

    I then can build the syslink User library on page 7

    Since I could build all of those it would seem that my paths would be pretty much fine. However when I try to build the user side:

    $ cd $SYSLINK_ROOT/ti/syslink/samples/hlos/procMgr/usr/Linux
    $ make

    that is when the error occurred. At first i got the error that it could find "cc1" which is also found in the build tools. I added the path to this in PATH and that went away. That is when the "can't find stdio.h" error came up. I went into the makefile and added

    COMPILE_FLAGS += -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include
    COMPILE_FLAGS += -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/linux
    COMPILE_FLAGS += -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/include/c++/4.3.3/tr1
    COMPILE_FLAGS += -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/include/c++/4.3.3

    to include files that it could not find, stdio.h, cstarg.h and a couple others.

    now i get to the point where i call make V=1

    root@BensLinux:/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/procMgr/usr/Linux# make V=1
    Building /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples/procmgrapp.o (debug, release)
    mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/lib
    mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples
    mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples/procmgrapp
    mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/bin/TI816X/samples
    Building /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples/procmgrapp (debug, release)
    mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/lib
    mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples
    mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples/procmgrapp
    mkdir -p /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/bin/TI816X/samples
    Compiling: /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/procMgr/ProcMgrApp.c
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/bin/gcc  -Wall -ffloat-store -D_REENTRANT -DSYSLINK_PLATFORM_TI81XX -DTI81XX_VIDEOM3 -DSYSLINK_BUILDOS_LINUX -DSYSLINK_BUILD_DEBUG -DSYSLINK_TRACE_ENABLE

    -I/opt/new_netra_sdk/ipc_1_22_03_23/packages -I/opt/new_netra_sdk/syslink_02_00_00_67 -I/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/inc

    -I/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/inc/usr -I/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/inc/usr/Linux

    -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include

    -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/linux

    -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/include/c++/4.3.3/tr1

    -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/include/c++/4.3.3

      -O0 -ggdb -D DEBUG -c -o /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples/procmgrapp/ProcMgrApp.odebug  /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/procMgr/ProcMgrApp.c
    In file included from /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:75,
                     from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/inc/usr/Linux/std_linux.h:54,
                     from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/Std.h:55,
                     from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/procMgr/ProcMgrApp.c:52:
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h:332: error: expected specifier-qualifier-list before 'size_t'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h:364: error: expected declaration specifiers or '...' before 'size_t'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h:373: error: expected declaration specifiers or '...' before 'size_t'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h:489: error: expected declaration specifiers or '...' before '__gnuc_va_list'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h:491: error: expected declaration specifiers or '...' before '__gnuc_va_list'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h:493: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_IO_sgetn'
    In file included from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/inc/usr/Linux/std_linux.h:54,
                     from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/Std.h:55,
                     from /opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/samples/hlos/procMgr/ProcMgrApp.c:52:
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:312: error: expected declaration specifiers or '...' before 'size_t'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:319: error: expected declaration specifiers or '...' before 'size_t'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:347: error: expected declaration specifiers or '...' before '__gnuc_va_list'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:346: warning: conflicting types for built-in function 'vfprintf'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:352: error: expected declaration specifiers or '...' before '__gnuc_va_list'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:352: warning: conflicting types for built-in function 'vprintf'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:355: error: expected declaration specifiers or '...' before '__gnuc_va_list'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:354: warning: conflicting types for built-in function 'vsprintf'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:361: error: expected declaration specifiers or '...' before 'size_t'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:363: error: format string argument not a string type
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:361: warning: conflicting types for built-in function 'snprintf'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:365: error: expected declaration specifiers or '...' before 'size_t'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:366: error: expected declaration specifiers or '...' before '__gnuc_va_list'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:367: error: format string argument not a string type
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:365: warning: conflicting types for built-in function 'vsnprintf'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:678: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:684: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:706: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread_unlocked'
    /home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h:708: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite_unlocked'
    make: *** [/opt/new_netra_sdk/syslink_02_00_00_67/ti/syslink/obj/TI816X/samples/procmgrapp/ProcMgrApp.odebug] Error 1

     

     

    I am using Codesourcery spring 2009 for ARM GNU/Linux included with the dm8168 evm. I have also had a terrible time building the codec engine demos and gotten similar "can't find header file" errors. It really seems like there is a problem with my paths but i really have no clue what to set them to. maybe i should reinstall my build tools.

     

    Thanks,

     

    Ben

  • Ben,

    I don't have any good ideas to help at this point.  All those errors are probably caused by one thing that's throwing the parser into a tizzy.

    The only thing that concerns me, and perhaps it's not an issue if you think not, is the use of C++ include directories.  The directories

    BenM said:
    COMPILE_FLAGS += -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/include/c++/4.3.3/tr1
    COMPILE_FLAGS += -I/home/benmcgee/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/include/c++/4.3.3

    are C++ only ones, and could be getting in the way of building straight C files.

    Can you somehow tell gcc to not support C++?

    Regards,

    - Rob