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.

error in compiling processor-dsk-linux examples

root@am:/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/example-applications/openmpacc-examples-1.3.2.0/printf_debug# make
clacc -v -k --hc="-O3 -Wall -Wextra -fopenmp" --tc="-O3" printf_debug_main.o printf_debug_target.c -o printf_debug
>> DEBUG: Extra host compiler options: -O3 -Wall -Wextra -fopenmp
>> DEBUG: Extra target compiler options: -O3
>> DEBUG: Executable binary name: printf_debug
>> DEBUG: Input files: printf_debug_main.o printf_debug_target.c
>> DEBUG: ARM object file or archive: printf_debug_main.o
>> DEBUG: Source code file: printf_debug_target.c
>> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc for HOST compilation.
>> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-g++ for HOST compilation.
>> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cl6x for TARGET compilation.
>> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cl6x for S2S compilation.
>> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/clocl for TARGET compilation.
cl6x --openmp:host -pds=1173 -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/include -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/ -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/include -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/include-fixed -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/include -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/usr/include printf_debug_target.c
cl6x --openmp:device -mv6600 -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/include -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/share/ti/openmpacc/dsp/include -O3 printf_debug_target.c
"/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/share/ti/openmpacc/dsp/include/omp.h", line 42: fatal error: cannot open source file "stdint.h"
1 catastrophic error detected in the compilation of "printf_debug_target.c".
Compilation terminated.

>> Compilation failure
>> ERROR: Target compilation of printf_debug_target.c failed.
make: *** [printf_debug] Error 1

It is impossible to execute a TI software unless you have errors. The above is another one. What should i do?

  • There are tens of errors:

    root@am:/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/example-applications/openmpacc-examples-1.3.2.0/printf_debug# make
    clacc -v -k --hc="-O3 -Wall -Wextra -fopenmp " --tc="-O3 -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/include/ -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/include/gnu/" printf_debug_main.o printf_debug_target.c -o printf_debug
    >> DEBUG: Extra host compiler options: -O3 -Wall -Wextra -fopenmp
    >> DEBUG: Extra target compiler options: -O3 -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/include/ -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/include/gnu/
    >> DEBUG: Executable binary name: printf_debug
    >> DEBUG: Input files: printf_debug_main.o printf_debug_target.c
    >> DEBUG: ARM object file or archive: printf_debug_main.o
    >> DEBUG: Source code file: printf_debug_target.c
    >> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc for HOST compilation.
    >> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-g++ for HOST compilation.
    >> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cl6x for TARGET compilation.
    >> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cl6x for S2S compilation.
    >> DEBUG: Using /opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/clocl for TARGET compilation.
    cl6x --openmp:host -pds=1173 -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/include -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/ -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/include -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/include-fixed -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/include -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/usr/include printf_debug_target.c
    cl6x --openmp:device -mv6600 -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/include -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/share/ti/openmpacc/dsp/include -O3 -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/include/ -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/include/gnu/ printf_debug_target.c
    "/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/include/gnu/stubs.h", line 7: fatal error: cannot open source file "gnu/stubs-soft.h"
    1 catastrophic error detected in the compilation of "printf_debug_target.c".
    Compilation terminated.

    >> Compilation failure
    >> ERROR: Target compilation of printf_debug_target.c failed.
    make: *** [printf_debug] Error 1
    root@am:/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/example-applications/openmpacc-examples-1.3.2.0/printf_debug# find /opt/ti/ -iname stubs-soft.h

    There is not a file named , stubs-soft.h!!!
    Wow!
  • cl6x --openmp:device -mv6600 -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/include -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS/usr/share/ti/openmpacc/dsp/include -O3 -I/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru/include/ printf_debug_target.c
    clocl -t -v __TI_CLACC_KERNEL.cl printf_debug_target.obj
    error #10008-D: cannot find file "rts6600_elf.lib"
    error #10010: errors encountered during linking; "__TI_CLACC_KERNEL.out" not
    built

    >> Compilation failure
    error: errors occurred while reading __TI_CLACC_KERNEL.out

    arm-linux-gnueabihf-g++ -O3 -Wall -Wextra -fopenmp -c __TI_CLACC_KERNEL.c
    arm-linux-gnueabihf-gcc -O3 -Wall -Wextra -fopenmp -c printf_debug_target.int.c
    printf_debug_target.int.c: In function '__omp_0_omp_runtime_functions_with_printf':
    printf_debug_target.int.c:916:7: warning: unused parameter 'omp_dp' [-Wunused-parameter]
    void *omp_dp)
    ^
    printf_debug_target.int.c: In function '__omp_1_omp_runtime_functions_with_printf':
    printf_debug_target.int.c:943:7: warning: unused parameter 'omp_dp' [-Wunused-parameter]
    void *omp_dp)
    ^
    arm-linux-gnueabihf-g++ -O3 -Wall -Wextra -fopenmp printf_debug_main.o __TI_CLACC_KERNEL.o printf_debug_target.int.o --sysroot=/opt/ti/ti-processor-sdk-linux-k2l-evm-03.00.00.04/targetNFS -lOpenMPAcc -lOpenCL -locl_util -o printf_debug
    >> DEBUG: Executable binary printf_debug created successfully.
  • root@k2l-evm:/home# ./printf_debug
    ERROR: CL_INVALID_VALUE
  • Hi,

    All of this seems to indicate that there is something wrong with the environment setup. You probably don't have the OpenMP
    Refer to this thread: e2e.ti.com/.../425691
    also the following wiki: processors.wiki.ti.com/.../MCSDK_HPC_3.x_Getting_Started_Guide

    You probably don't have the OpenMP & CGT package installed in your target FS directory in your host (you probably have no $TARGET_ROOTDIR/usr/share/ti/examples/openmpacc/).

    Best Regards,
    Yordan
  • it is OK now
  • I'm glad to hear you resolved your problem. Thanks for updating the thread.

    Best Regards,
    Yordan
  • It was because of one frightful environment variable! I changed it and it became OK. I do not know why?!! Now OpenMP examples are being executed on EVM but some have errors like:

    root@k2l-evm:/home# /usr/share/ti/examples/opencl/float_compute/float_compute

    This example computes y[i] = M[i] * x[i] + C on single precision floating point arrays of size 2097152
    - Computation on the ARM is parallelized across the A15s using OpenMP.
    - Computation on the DSP is performed by dispatching an OpenCL NDRange kernel across the compute units (C66x cores) in the compute de.

    RunningBinary read function failure
    terminate called after throwing an instance of 'std::length_error'
    what(): basic_string::_M_create


    Thank you so much for your valuable replies which are very helpful and useful all the time. (But why the above example could not be executed?!)
    Regards
  • Hi ali,

    Do you have the dsp_compute.out in the directory float_compute? There are several approaches to create an OpenCL program, see here
    In the example float_compute, by default without _TI_RTOS defined, it 'Create an OpenCL program from binary, with binary in a file', so the dsp_compute.out file must be provided.

    Regards,
    Garrett