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.

DSPlib headers with Linux host compilation problem

Have a DSP C6X project using DSPlib version dsplib_c66x_3_2_0_1 from a RedHat CCSv5 Linux host.  Application compiles under similar windows system.  This was failing on a compile when it referenced a nested include file. 

The compiler complained upon not finding 

..\..\DSP_urand32\c66\DSP_urand32.h


I found a solution by modifying a few include files with details at the end. Attempted reinstallation of tools to confirm no issues with Linux installer. Not sure if there was anything that was supposed to be done from CCS for installation. Also not sure if this is the proper place to post bugs or issues with software.


Seems it was due to use of Windows relative path. Also issues with "sp" captitalization. Easily fixed as follows /* NOTE (sfp): replaced this due to problem with Linux (..\..\) */ //#include "..\..\DSP_urand32\c66\DSP_urand32.h" #include <ti/dsplib/src/DSP_urand32/c66/DSP_urand32.h> This was done on the following files (5): [sprause@smoke src]$ grep -n -r '..\\' * | grep include DSPF_sp_erand/c66/DSPF_sp_erand.h:51:#include "..\..\DSP_urand32\c66\DSP_urand32.h" DSPF_sp_fftSPxSP_r2c/c66/DSPF_sp_fftSPxSP_r2c.h:47:#include "..\..\DSPF_SP_fftSPxSP\c66\DSPF_SP_fftSPxSP.h" DSPF_sp_ifftSPxSP_c2r/c66/DSPF_sp_ifftSPxSP_c2r.h:47:#include "..\..\DSPF_SP_ifftSPxSP\c66\DSPF_SP_ifftSPxSP.h" DSPF_sp_nrand/c66/DSPF_sp_nrand.h:51:#include "..\..\DSP_urand32\c66\DSP_urand32.h" DSPF_sp_urand/c66/DSPF_sp_urand.h:51:#include "..\..\DSP_urand32\c66\DSP_urand32.h" [sprause@smoke dsplib_c66x_3_2_0_1]$ diff -r ./ ../.save/dsplib_c66x_3_2_0_1-save/ diff -r ./packages/ti/dsplib/src/DSPF_sp_erand/c66/DSPF_sp_erand.h ../.save/dsplib_c66x_3_2_0_1-save/packages/ti/dsplib/src/DSPF_sp_erand/c66/DSPF_sp_erand.h 51,53c51 < /* NOTE (sfp): replaced this due to problem with Linux (..\..\) */ < //#include "..\..\DSP_urand32\c66\DSP_urand32.h" < #include <ti/dsplib/src/DSP_urand32/c66/DSP_urand32.h> ---
#include "..\..\DSP_urand32\c66\DSP_urand32.h"
diff -r ./packages/ti/dsplib/src/DSPF_sp_fftSPxSP_r2c/c66/DSPF_sp_fftSPxSP_r2c.h ../.save/dsplib_c66x_3_2_0_1-save/packages/ti/dsplib/src/DSPF_sp_fftSPxSP_r2c/c66/DSPF_sp_fftSPxSP_r2c.h
47,49c47,48
<  /* NOTE (sfp):  replaced this due to problem with Linux (..\..\)  */
<  //#include "..\..\DSPF_SP_fftSPxSP\c66\DSPF_SP_fftSPxSP.h"
< #include <ti/dsplib/src/DSPF_sp_fftSPxSP/c66/DSPF_sp_fftSPxSP.h>
---
#include "..\..\DSPF_SP_fftSPxSP\c66\DSPF_SP_fftSPxSP.h"

diff -r ./packages/ti/dsplib/src/DSPF_sp_ifftSPxSP_c2r/c66/DSPF_sp_ifftSPxSP_c2r.h ../.save/dsplib_c66x_3_2_0_1-save/packages/ti/dsplib/src/DSPF_sp_ifftSPxSP_c2r/c66/DSPF_sp_ifftSPxSP_c2r.h
47,49c47
<  /* NOTE (sfp):  replaced this due to problem with Linux (..\..\)  */
<  //#include "..\..\DSPF_SP_ifftSPxSP\c66\DSPF_SP_ifftSPxSP.h"
< #include <ti/dsplib/src/DSPF_sp_ifftSPxSP/c66/DSPF_sp_ifftSPxSP.h>
---
#include "..\..\DSPF_SP_ifftSPxSP\c66\DSPF_SP_ifftSPxSP.h"
diff -r ./packages/ti/dsplib/src/DSPF_sp_nrand/c66/DSPF_sp_nrand.h ../.save/dsplib_c66x_3_2_0_1-save/packages/ti/dsplib/src/DSPF_sp_nrand/c66/DSPF_sp_nrand.h
51,53c51
<  /* NOTE (sfp):  replaced this due to problem with Linux (..\..\)  */
<  //#include "..\..\DSP_urand32\c66\DSP_urand32.h"
< #include <ti/dsplib/src/DSP_urand32/c66/DSP_urand32.h>
---
#include "..\..\DSP_urand32\c66\DSP_urand32.h"
diff -r ./packages/ti/dsplib/src/DSPF_sp_urand/c66/DSPF_sp_urand.h ../.save/dsplib_c66x_3_2_0_1-save/packages/ti/dsplib/src/DSPF_sp_urand/c66/DSPF_sp_urand.h
51,53c51
<  /* NOTE (sfp):  replaced this due to problem with Linux (..\..\)  */
<  //#include "..\..\DSP_urand32\c66\DSP_urand32.h"
< #include <ti/dsplib/src/DSP_urand32/c66/DSP_urand32.h>
---
#include "..\..\DSP_urand32\c66\DSP_urand32.h"



  • Thanks for the feedback.  I'll get this to the library developers.


    Regards,

    Travis

  • Sadly it seems the same problem is still present in dsplib 3.4.0.0 released in august 2014?
  • I'm seeing similar problems when compiling for C66 on a Linux host with dsplib version 3.4.0.0. Just to summarize everything that was said above, the issues are:

    1. Case sensitivity
      1. There are a small number of directories named C66, but the majority are named c66 and all of the header files' include directives specify c66
      2. All single-precision files are named sp (e.g. DSPF_sp_fftSPxSP.h) and most include directives are correct, but a few of them specify SP
    2. Windows path separators - there are a number of headers whose include directives use backslashes

    Since all of the include directives are consistent, 1a can be resolved by renaming the small number of C66 directories to c66. For example:

    find ~/ti/dsplib_c66x_3_4_0_0/packages/ -type d -name "C66" | xargs rename 's/C66/c66/'

    1b can be resolved by correcting the SP include directives:

    grep -P '#include\s+.*/DSPF_SP_.*' ~/ti/dsplib_c66x_3_4_0_0/packages/ti/dsplib/src/* -l | xargs perl -p -i -e 's/DSPF_SP/DSPF_sp/g'

    2 can be resolved by replacing all backslashes. As a general rule, even in Windows developers should avoid backslashes in paths at all times.

    grep -P '#include\s+.*[\\].*' ~/ti/dsplib_c66x_3_4_0_0/packages/ti/dsplib/src/* -l | xargs perl -p -i -e 's|\\|/|g'

    After resolving these issues, however, I still see the following errors when including ti/dsplib/dsplib.h:

    "/home/user/ti/dsplib_c66x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_erand/c66/../../DSP_urand32/c66/DSP_urand32.h", line 223: error: badly formed pragma
    "/home/user/ti/dsplib_c66x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_erand/c66/../../DSP_urand32/c66/DSP_urand32.h", line 224: error: expected a ")"
    "/home/user/ti/dsplib_c66x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_erand/c66/../../DSP_urand32/c66/DSP_urand32.h", line 268: error: badly formed pragma
    "/home/user/ti/dsplib_c66x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_erand/c66/../../DSP_urand32/c66/DSP_urand32.h", line 269: error: expected a ")"
    "/home/user/ti/dsplib_c66x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_erand/c66/../../DSP_urand32/c66/DSP_urand32.h", line 323: error: badly formed pragma
    "/home/user/ti/dsplib_c66x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_erand/c66/../../DSP_urand32/c66/DSP_urand32.h", line 324: error: expected a ")"
    5 errors detected in the compilation of "/home/user/project/my_source.cpp".
    Compilation terminated.

    Given that these are compiler errors and I don't know much about the TI c16x compiler, I'm basically at a loss at this point. Does anyone know what might be going on here? Has dsplib ever been used successfully for C66 from a Linux host (I'm not sure how it could have been given the issues above)?

    Is there any timeline for when a Linux-compatible version of dsplib will be made available? , any update on this? Your previous post was a while ago regarding version 3.2.0.1 and it doesn't look like there has been any progress unfortunately.

    This is currently a hard block for my project so I would really appreciate any help anyone can provide. 

    Thanks,

    Adam