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.

Compiler/TMS320C6678: Problems building Libc.a archive

Part Number: TMS320C6678

Tool/software: TI C/C++ Compiler

Hello
As part of introducing soem divide by zero workarounds we would like to compile the "libc.a" archive but we faced some issues during the compilation.

We used your walkthrough about the MKlib executable (http://processors.wiki.ti.com/index.php/Mklib) but after many attempts we cannot compile any libs belonging to “libc.a”.

 

Could you please provide us a support on this?

 

 Best Regards

Bob Bacon

  • Please understand that libc.a is not an object library, or a source code library.  It is an index library.  An index library is a collection of several object file library variants, which is useful when several variants of a library with different options are available.  It is created with the library information archiver libinfo6x.  Please read more about it in the section titled Library Information Archiver Description in the C6000 assembly language tools manual.

    If that doesn't clear things up, please show one example of what you attempted.  By copy-n-paste, show the exact command, and all the resulting diagnostics.

    Thanks and regards,

    -George

  • Hi George, I have to recompile the libraries contained into libc.a indexes because some files inside src folder (contained in cgt compiler lib) have been changed.
    Reading the Troubleshooting in processors.wiki.ti.com/.../Mklib page, I've found that when the *.lib are removed from lib folder, the compiler try to generate the new *.lib archive adding the new files contained in src folder. I try to remove the *.lib libraries and I've created a SYS/BIOS project in CCS IDE; the first step is to link the libc.a index library and compile the project... The compiler doesn't find the libraries specified (*.lib as rts6600_elf.lib) and using the gmake located in cgt compiler trying to regenerate but some errors occurred (it seems that che compiler is not compatible with the libraries). I also try to compile one single lib

    mklib.exe --pattern=rtd6600_elf.lib --gmake=ccsv7\utils\bin\gmake

    but it doesn't work.

    Thanks and regards,
    Vittorio
  • Please tell me more about your host environment.  Windows or Linux?  Do you build from within CCS?  Or on the command line?

    What version of the compiler?

    Please show all the system response to that mklib command.

    Thanks and regards,

    -George

  • Hi George,
    my compiler is the ti-cgt-c6000_8.1.3 on CCS IDE 7.2. I'm using Windows to generate the new libraries and this is the output generated by CCS console (that is the same when I try lo launch the manual command):

    >> ERROR: mklib: gmake error during rts6600_elf.lib build
    warning #10207-D: automatic RTS selection: resolving index library "libc.a" to "rts6600_elf.lib", but "rts6600_elf.lib" was not found
    error #10198-D: no input section is linked in
    warning #10062-D: entry-point symbol "_c_int00" undefined
    warning #10202-D: no suitable entry-point found; setting to 0

    INTERNAL ERROR: C:\ti_ccs7_2\ti-cgt-c6000_8.1.3\bin\lnk6x.exe experienced an unhandled exception

    This is caused by a defect in the compiler itself. TI Customer
    Support may be able to suggest a workaround to avoid this.

    Upgrading to the newest version of the compiler may fix this problem.

    Contact TI in the E2E support forums at http://e2e.ti.com under
    "Development Tools", "TI C/C++ Compiler". See the link titled
    "Submitting an issue". Include this ENTIRE error message and a
    copy of the .pp file created when option --preproc_with_comment
    (-ppc) is used.

    Thanks and regards,
    Vittorio
  • Okay, there are two distinct errors happening here:

    1. The library failed to build (evidenced by "ERROR: mklib: gmake error during ... build")
    2. The linker had an internal error

    We're not going to be able to address #2 until we get a complete, reproducable test case, so let's tackle #1

    You've given us just the last bit of the build log.  There must have been another error message earlier in the log.  Please attach the entire build console to this thread so that we can examine the errors.

  • console.logHi Archaeologist,

    in attach here is the requested log.

    Thanks and regards,

    Vittorio

  • The first error, and the cause of all the others, is "'[' is not recognized as an internal or external command"

    mklib uses gmake to build the libraries.  gmake invokes sh.exe.  '[' is a sh.exe built-in.  Thus, if '[' is not recognized, then this suggests that the make process is invoking the wrong version of gmake or sh.exe.

    Do you use Cygwin?  Do you use MSYS?  Do you use any other Unix-interface-providing utility on that Windows machine?

    Do you have a version of gmake or sh.exe installed other than the ones provided in the CCS distribution?  Does your PATH variable put these other versions before the ones in CCS?  You need %CCSROOT%\utils\bin\gmake.exe and %CCSROOT%\utils\cygwin\sh.exe to be found first.

    Do any of these things apply to you?

  • HI Archaeologist,

    as mentioned before, I've forced the mklib to use TI compiler (mklib.exe --pattern=rtd6600_elf.lib --gmake=ccsv7\utils\bin\gmake) also in CCS but it doesn't work.

    Any suggest about that?

    Thanks in advance,

    Vittorio

  • You should use the complete pathname for gmake, like so: --gmake=C:\ti\ccsv7\utils\bin\gmake.exe
    if you have installed ccsv7 in a different location, you'll need to adjust the path accordingly.

    When you say that specifying the gmake executable by using the --gmake option "doesn't work," what exactly do you mean? Exactly what error message do you get?

    I do also need to know if you use any of Cywgin, MSYS, SFU, or MKS
  • I've already used the complete path for --gmake=C:\ti\ccsv7\utils\bin\gmake.exe (my ccs7 folder is like a prefix containing the complete TI folder installation) but I have the same error.
  • Hi guys,
    we started from a brand new environment putting all the steps (described in the topic) in a script automatizing the process.

    Here is the batch script:

    REM customize the following variable with your TI installation
    set TI_INSTALL_DIR=C:\ti_ccs7_2
    set CCS_INSTALL_DIR=%TI_INSTALL_DIR%\ccsv7
    set TI_CGT_DIR=ti-cgt-c6000_8.1.3
    set TI_CGT_LIB_DIR=%TI_INSTALL_DIR%\%TI_CGT_DIR%\lib
    
    
    REM remove all other entry from PATH variable
    set PATH=%CCS_INSTALL_DIR%\utils\cygwin;%CCS_INSTALL_DIR%\utils\bin;%TI_INSTALL_DIR%\xdctools_3_32_02_25_core;%TI_INSTALL_DIR%\xdctools_3_32_02_25_core\bin;%CCS_INSTALL_DIR%\tools\compiler\ti-cgt-c6000_8.1.3\bin
    
    REM change on TI_CGT_LIB_DIR
    cd %TI_CGT_LIB_DIR%
    
    REM rebuild libraries
    mklib.exe --all

    The procedure was successful. In our environment the CCS compiler is not included in our PATH.


    Thanks in advance,
    Vittorio

  • I'm glad it worked out.  I suspect the problem was something in your PATH.  Completely specifying your PATH from scratch avoids it.

    I expect TI_CGT_LIB_DIR to be defined ...

    set TI_CGT_LIB_DIR=%CCS_INSTALL_DIR%\tools\compiler\%TI_CGT_DIR%\lib

    Otherwise it looks good.

    Thanks and regards,

    -George