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.

Bug in cgtools 7.3.5 compiling libjpeg.

While trying to compile libjpeg for the c66x using CGT 7.3.5, I get the following error message when trying to compile jfdctint.c (I've attached the preprocessed source file to this post):

--- SNIP ---

cl6x --abi=coffabi -mv6600 -pden -pds 179 -pds 552 --gcc -o2 -c jfdctint.c
Renamed pair with base %s above window:                 DADD    .S1X    0,VRB2331:VRB2365,VRA2124:VRA2123       ; |206| Define a twin register
>> jfdctint.c, line 206: INTERNAL ERROR: Corrupted IR detected during
                         check_mve/spilling

This may be a serious problem.  Please contact customer support with a
description of this problem and a sample of the source files that caused this
INTERNAL ERROR message to appear.

Cannot continue compilation - ABORTING!


>> Compilation failure

--- SNIP ---

This problem does not occur when compiling with --abi=eabi, or when reducing optimization down to -o1. This may be a duplicate of bug SDSCM00042669, which was supposedly fixed in 7.3.3.

jfdctint.zip
  • Eric,

    Thank you for sharing the source file to reproduce this issue. I submitted a new bug against CGT 7.3.5. The tracking # is SDSCM00044183 and you may track the status of the bug using the SDOWP link in my signature.

  • Eric,

    The compiler development team is working on a fix for this bug and were wondering if you could provide a linkable test case that we can run to verify if the whole problem is fixed. Are you able to share the full project or a cutdown version of a builable project that reproduces the issue?

  • AartiG,

    I've cut down our project to just libjpeg6b. To compile, run the commands

    ./configure CC=cl6x_wrapper CFLAGS="--abi=coffabi -mv6600 --mem_model:data=far -mo -pden -pds 179 -pds 552 --gcc -o3 --symdebug:none

    and then

    make

    on a Linux system (cygwin may also work, but I haven't tested it). cl6x_wrapper is a simple Perl script that translates gcc command line options into the corresponding cl6x options (at least those required for configure to work). It assumes that cl6x can be found in the current PATH and C6X_C_DIR is set correctly.

    testcase.tar.gz
  • I cannot run the configure script on my linux machine, Here is what I got::

    [wzhao@dflvdt0024]testcase%./configure CC=cl6x_wrapper CFLAGS="--abi=coffabi -mv6600 --mem_model:data=far -mo -pden -pds 179 -pds 552 --gcc -o3 --symdebug:none

    >  

    It hangs there.

    Can you just give me a ready to run Makefile to try? I mean after the above ./configure

    Thanks,

    Wei

  • Looks like it needs a closing double-quote.

  • I add the closing double quote.

    Configure is done. And I type gmake, I got the following, any clue where it got wrong?

    cl6x_wrapper --abi=coffabi -mv6600 --mem_model:data=far -mo -pden -pds 179 -pds 552 --gcc -o3 --symdebug:none  -I.   -c -o wrjpgcom.o wrjpgcom.c
    --> cl6x --abi=coffabi -mv6600 --mem_model:data=far -mo -pden -pds 179 -pds 552 --gcc -o3 --symdebug:none -i. -c wrjpgcom.c -ft /tmp/cg6xtmp_dR6ySStR -eo=.o -fr /tmp/cg6xtmp_dR6ySStR
    --> mv "/tmp/cg6xtmp_dR6ySStR/wrjpgcom.o" "wrjpgcom.o"
    cl6x_wrapper  -o wrjpgcom wrjpgcom.o
    WARNING: "wrjpgcom" is in the list of programs that are not to be built.
    --> touch "wrjpgcom"
    [wzhao@dflvdt0024]testcase%ls -lt |more
    total 4000
    -rw-rw----  1 wzhao lang  15402 Oct 24 16:26 wrjpgcom.o
    -rw-rw----  1 wzhao lang  15871 Oct 24 16:25 rdjpgcom.o
    -rw-rw----  1 wzhao lang  23687 Oct 24 16:25 transupp.o
    -rw-rw----  1 wzhao lang      0 Oct 24 16:25 wrjpgcom
    -rw-rw----  1 wzhao lang      0 Oct 24 16:25 rdjpgcom
    -rw-rw----  1 wzhao lang      0 Oct 24 16:25 jpegtran
    -rw-rw----  1 wzhao lang  24113 Oct 24 16:25 jpegtran.o

  • This looks fine to me. What you should have (if everything went right) is a libjpeg.a - the example programs aren't linked because that would require a linker command file, and we don't need them in any case. The original bug was that compiling jfdctint.c for COFF with an optimization level >1 produced an internal compiler error - if this no longer occurs, then I would assume this bug has been fixed.

  • Eric,

    Get it to compiler is just one goal of this fix. I also would like to verifiy that the fix can get your code running correctly.

    So are you using 7.3.5 now? How about I give you a engineering release of the cg6x, you can place it in your bin/ directory and try to build and run your whole project. I want to make sure that this fix is validate.

    Thanks,

    Wei

  • Wei,

    I'm currently using 7.3.6, which can build a runable version of our code using the COFF object format. Building in ELF format fails due to a linker issue (this is SDSCM00044738 in TI's bug tracker). As our code is proprietary, I unfortunately cannot make it available to you for testing. If you have an engineering release you would like me to test, I can do that.

  • Eric,

    Try it and it should get your project build and then see if everything works.

    Any problem, please let me know.

    Wei

  • Eric,

     

    It seems I can not get the filed uploaded to the forum.

    Is there a way I can send the file to you via FTP or some other ways.

     

    Wei

  • Wei,

    the last time I got an engineering release from TI was via the ftp server ftppickup.ti.com. Perhaps this is an option ?

  • Eric,

    Can you tell me your Email address? I may just mail it to you. It is just 5 MB.

    Wei

  • Wei,

    I've attached my email address as a .png image (forgive my paranoia, but I don't want to make it too easy for spammers to harvest).