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.

Failure to build libraries

Following a hardware failure I have had to reinstall CCS V5.

When I try to compile a program, I get the following errors for all the libraries (just one shown here):

warning: automatic library build: using library
   "C:\ti\ccsv5\tools\compiler\c6000_7.4.4\lib\rts6700.lib" for the first time,
   so it must be built.  This may take a few minutes.
'[' is not recognized as an internal or external command,
operable program or batch file.
'[' is not recognized as an internal or external command,
operable program or batch file.
gmake.exe: Do not specify -j or --jobs if sh.exe is not available.
gmake.exe: Resetting make for single job mode.
error: function _sin in file sin.c : invalid instruction schedule generated;
   try reducing speed optimization levels
error: function _tanh in file tanh.c : invalid instruction schedule generated;
   try reducing speed optimization levels
The filename, directory name, or volume label syntax is incorrect.
gmake.exe: *** [library] Error 1
>> ERROR: mklib: gmake error during rts6700.lib build

I have checked that sh.exe is there and works.

How do I fix this?

  • Peter Robertson said:
    >> ERROR: mklib: gmake error during rts6700.lib build

    It is the automatic building of the run time library which is failing.

    Do you have MKS or Cygwin tools in your path, as this has been known to cause a failure?

    See MKS or Cygwin tools in your path

  • I understand what it is trying to do.

    Previously the build was failing because it cound't find sh.exe, so I put the version from C:\ti\ccsv5\utils\cygwin on the path.

    That is clearly wrong, so how do I let the build process known where sh.exe is?

    Why does the installation of CCS5 not set up all the tools it needs?

    I do not have MKS or Cygwin on my path.

  • Peter Robertson said:
    That is clearly wrong, so how do I let the build process known where sh.exe is?

    According to Required non-Texas Instruments Software the mklib program uses the CCS_UTILS_DIR environment variable to locate the sh.exe.

    Looking at a CCS v6 example which successfully uses mklib to build a RTS library shows CCS_UTILS_DIR being set in the system variables:

    Has your project which fails to build the RTS library got a CCS_UTILS_DIR in the system variables?

    Peter Robertson said:
    Why does the installation of CCS5 not set up all the tools it needs?

    I am not sure what to suggest, as have never had to set anything manually to get CCS to execute mklib - it has always worked.

  • I have tried defining CCS_UTILS_DIR - it makes no difference.

    I have tried removing and reinstalling CCS - it makes no difference.

    (I am not using CCS to build programs. I am invoking the compiler and linker from the command line).

    How do I find which file is giving the '[' is not recognized error?

  • This has brought all work to a complete standstill.

    To recreate the problem, just compile a trivial program to test.obj:

    main() {

    }

    Then link it:


    E:\temp>lnk6x test.obj -l rts6700.lib
    warning: automatic library build: using library
       "C:\ti\ccsv5\tools\compiler\c6000_7.4.4\lib\rts6700.lib" for the first time,
       so it must be built.  This may take a few minutes.
    '[' is not recognized as an internal or external command,
    operable program or batch file.
    '[' is not recognized as an internal or external command,
    operable program or batch file.
    gmake.exe: Do not specify -j or --jobs if sh.exe is not available.
    gmake.exe: Resetting make for single job mode.
    error: function _sin in file sin.c : invalid instruction schedule generated;
       try reducing speed optimization levels
    error: function _tanh in file tanh.c : invalid instruction schedule generated;
       try reducing speed optimization levels
    The filename, directory name, or volume label syntax is incorrect.
    gmake.exe: *** [library] Error 1
    >> ERROR: mklib: gmake error during rts6700.lib build
    warning: automatic library build: using library
       "C:\ti\ccsv5\tools\compiler\c6000_7.4.4\lib\rts6700.lib" for the first time,
       so it must be built.  This may take a few minutes.
    '[' is not recognized as an internal or external command,
    operable program or batch file.
    '[' is not recognized as an internal or external command,
    operable program or batch file.

    ... and so on, over and over

    If this is the wrong place to look for help, please let me know where I should go.

  • Peter,

    This type of error usually occurs when there is an incompatible version of gmake.exe or sh.exe in the path. Could you please take a closer look at your PATH environment variable and check if that might be the case?

    A couple of related threads with similar errors:
    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/229585.aspx
    http://e2e.ti.com/support/development_tools/compiler/f/343/t/196615.aspx

  • This was the first mention of gmake.exe and that was the cause of the problem.

    It seems that there are several issues like this that can cause grief, so perhaps TI could collect them somewhere where they could be easily found.

    Thanks for the assistance.