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.

PROCESSOR-SDK-J722S: zlib is not built

Part Number: PROCESSOR-SDK-J722S

Tool/software:

Hello TI,

I'm working on an application on J722s2(Linux), which requires zlib library for compression, de-compression etc. Im getting build error, the log isshown below.

/home/raju/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/raju/TI_SDK/J722s/ti-processor-sdk-rtos-j722s-evm-09_02_00_05/vision_apps/out/J722S/A53/LINUX/release/module/apps.dl_demos.klemove_app_tidl_od_cam/logger/logger_zip.o: in function `LoggerZip_Compress':
logger_zip.c:(.text+0x20): undefined reference to `compress'
collect2: error: ld returned 1 exit status

Note:

1)I have zlib library libz.a at /usr/lib/x86_64-linux-gnu/ and zlib.h at /usr/include/

2)I have included above paths in my app concerto file and zlib.h file in my app.c file

3)I didn't get any issue, when the module is built for J721E (Linux) and J721s2( QNX). 

Kindly guide me regarding this.

Thanks,

Seetharama Raju.

  • Hi Seetharama,

    If you follow the steps for the linux-devkit toolchains here: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-j722s/10_00_00_08/exports/docs/linux/Overview/GCC_ToolChain.html?#linux-devkit 

    Are you able to build your application?

    Best,
    Jared

  • Hi sir,

    I forgot to mention the SDK version I'm working with. It is 09_02_00_05. The link you provided is for SDK 10.

    In that case I assume I can check with the link https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-j722s/09_02_00_05/exports/docs/linux/Overview/GCC_ToolChain.html#linux-devkit.

    Kindly confirm me.

    Thanks,

    Seetharama Raju.

  • Hi Seetharama,

    Yes.

    Best,
    Jared

  • Hi sir,

    Yes, I followed the steps mentioned in the link to ensure the particular file.c is compiled or not using cross compiler.

    Please find the text file attached for the commands and Log obtained. I can see the code is not built properly. As I'm using the files installed from SDK, I assume I should not be getting build errors. I'm not sure about this issue.

    TI_zlib_response1.txt
    raju@raju:~/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit$ export CROSS_COMPILE_64="/home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-"
    raju@raju:~/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit$ export SYSROOT_64="/home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/aarch64-oe-linux"
    raju@raju:~/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit$ export CC_64="${CROSS_COMPILE_64}gcc --sysroot=${SYSROOT_64}"
    raju@raju:~/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit$ ls $SYSROOT_64/usr/lib | grep z
    ls $SYSROOT_64/usr/include | grep zlib.h
    libbz2.so
    libbz2.so.1
    libbz2.so.1.0.8
    libharfbuzz-gobject.so
    libharfbuzz-gobject.so.0
    libharfbuzz-gobject.so.0.40001.0
    libharfbuzz.so
    libharfbuzz.so.0
    libharfbuzz.so.0.40001.0
    libharfbuzz-subset.so
    libharfbuzz-subset.so.0
    libharfbuzz-subset.so.0.40001.0
    liblzma.so
    liblzma.so.5
    liblzma.so.5.2.6
    liblzo2.so
    liblzo2.so.2
    liblzo2.so.2.0.0
    libz.so
    libzstd.so
    libzstd.so.1
    libzstd.so.1.5.2
    bzlib.h
    zlib.h
    
    raju@raju:~/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit$ cd /home/raju/Documents/test/
    raju@raju:~/Documents/test$ export PATH=$PATH:/home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux
    raju@raju:~/Documents/test$ aarch64-oe-linux-gcc -lz logger_zip.c -o log
    In file included from /home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/x86_64-arago-linux/usr/lib/aarch64-oe-linux/gcc/aarch64-oe-linux/11.4.0/include-fixed/syslimits.h:7,
                     from /home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/x86_64-arago-linux/usr/lib/aarch64-oe-linux/gcc/aarch64-oe-linux/11.4.0/include-fixed/limits.h:34,
                     from /home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/aarch64-oe-linux/usr/include/zconf.h:418,
                     from /home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/aarch64-oe-linux/usr/include/zlib.h:34,
                     from logger_zip.c:5:
    /home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/x86_64-arago-linux/usr/lib/aarch64-oe-linux/gcc/aarch64-oe-linux/11.4.0/include-fixed/limits.h:203:75: error: no include path in which to search for limits.h
      203 | #include_next <limits.h>                /* recurse down to the real one */
          |                                                                           ^
    In file included from /home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/aarch64-oe-linux/usr/include/zlib.h:34,
                     from logger_zip.c:5:
    /home/raju/TI_SDK/J722s/ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05/linux-devkit/sysroots/aarch64-oe-linux/usr/include/zconf.h:444:14: fatal error: sys/types.h: No such file or directory
      444 | #    include <sys/types.h>      /* for off_t */
          |              ^~~~~~~~~~~~~
    compilation terminated.
    

    Kindly guide me accordingly.

    Thanks,

    Seetharama Raju

  • Hi Seetharama,

    Should limits.h be an absolute path?

    Ist types.h located in the sysroot /usr/include directory?

    Best,
    Jared