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.

Linux/PROCESSOR-SDK-AM437X: Out of box build error

Part Number: PROCESSOR-SDK-AM437X

Tool/software: Linux

Support,

I am building the out-of-box SDK 4.01.00.06, i have changed nothing and i'm following : http://processors.wiki.ti.com/index.php/Linux_Kernel_Users_Guide.

I get to step : make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage and getting the following error?

...
...
Can't locate strict.pm in @INC (you may need to install the strict module) (@INC contains: //usr/lib/perl/site_perl/5.22.1 //usr/lib/perl/vendor_perl/5.22.1 //usr/lib/perl/5.22.1 /tmp/x
...
...
CC lib/dynamic_queue_limits.o

CC lib/glob.o
CC lib/strncpy_from_user.o
CC lib/strnlen_user.o
CC lib/net_utils.o
CC lib/sg_split.o
CC lib/sg_pool.o
GEN lib/oid_registry_data.c
Can't locate strict.pm in @INC (you may need to install the strict module) (@INC contains: //usr/lib/perl/site_perl/5.22.1 //usr/lib/perl/vendor_perl/5.22.1 //usr/lib/perl/5.22.1 /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/lib/perl/site_perl/5.22.1/ /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/lib/perl/site_perl/5.22.1 /tmp/xxxxx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xxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/lib/perl/5.22.1 .) at ./lib/build_OID_registry line 14.
BEGIN failed--compilation aborted at ./lib/build_OID_registry line 14.
make[1]: *** [lib/oid_registry_data.c] Error 2
make: *** [lib] Error 2
marcus@ubuntu:~/ti-am437x_sdk4.0.01.06/board-support/linux-4.9.41+gitAUTOINC+e3a80a1c5c-ge3a80a1c5c$ cd lib/

  • Hi Mark,

    I suggest you to check permissions of strict.pm script. Check whether your user is owner.

    BR
    Tsvetolin Shulev
  • Tsvetolin,

    strict.pm is /ti-sdk/linux-devkit/sysroots/x86_64-arago-linux/usr/lib/perl/5.22.1
    I have ownership.

    drwxr-xr-x 2 marcus marcus 4096 Nov 6 06:04 Pod/
    -r--r--r-- 1 marcus marcus 17999 Nov 6 06:04 POSIX.pm
    -r--r--r-- 1 marcus marcus 22364 Nov 6 06:04 re.pm
    drwxr-xr-x 2 marcus marcus 4096 Nov 6 06:04 Scalar/
    -r--r--r-- 1 marcus marcus 1076 Nov 6 06:04 SelectSaver.pm
    -r--r--r-- 1 marcus marcus 4433 Nov 6 06:04 strict.pm
    -r--r--r-- 1 marcus marcus 4794 Nov 6 06:04 Symbol.pm
    drwxr-xr-x 2 marcus marcus 4096 Nov 6 06:04 Term/
    drwxr-xr-x 2 marcus marcus 4096 Nov 6 06:04 Text/
    drwxr-xr-x 2 marcus marcus 4096 Nov 6 06:04 Thread/

    BR
    Marc
  • I found the fix. Not sure why it happened on a new SDK install?

    error : arago-linux/usr/lib/perl/5.22.1 .) at ./lib/build_OID_registry line 14.
    edit ~/ti-am437x_sdk4.0.01.06/board-support/linux-4.9.41+gitAUTOINC+e3a80a1c5c-ge3a80a1c5c/lib/build_OID_registry
    comment out line 14 : #use strict;

    Then 'make zImage' worked

    BR,
    Marc
  • (updated 2/21, 5/8)

    Please do NOT modify the kernel sources as indicated in the answer on 11/7/2017. This is the TI suggested workaround for Processor SDK 4.1, 4.2, 4.3:

    Set CROSS_COMPILE to include the path to the toolchain, but do NOT add the linux-devkit to the PATH.

    Command-line example (using beaglebone black):

    $ # do NOT export linux-devkit to PATH 
    $ make distclean
    $ make ARCH=arm CROSS_COMPILE=$HOME/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- tisdk_am335x-evm_defconfig
    $ make ARCH=arm CROSS_COMPILE=$HOME/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- zImage

    Script example (using beaglebone black):

    #! /bin/bash
    
    # do NOT add linux-devkit to PATH
    #export PATH=$HOME/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    
    export ARCH=arm
    
    # set CROSS_COMPILE to include the path to the toolchain
    #export CROSS_COMPILE=arm-linux-gnueabihf-
    export CROSS_COMPILE=$HOME/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-
    
    # delete previous binaries
    make distclean
    
    # pass in defconfig file
    make tisdk_am335x-evm_defconfig
    
    # make the kernel
    make zImage

    In other words,

    IGNORE the "Compiler" step in the Linux Kernel User's Guide that involves changing the PATH, and update your CROSS_COMPILE. 

    This path will not work, because it has the linux-devkit in the path:

    This path will work:

    This workaround should work for Processor SDK 4.1, 4.2, and 4.3.

    Regards, 

    Nick (updated 2/21 for clarity & 5/8 for SDK 4.3)


  • I tried that, did not seem to make a difference.  Removing "use strict" however removed the problem.

  • Same here. I have the exact same problem compiling the source code for am335x ICEv2 straight out of box. The workaround doesn't work at all. Removing "use strict" works.
  • Hello Martin & Cody,

    Thank you for giving feedback!

    1) Did you make sure that the path doesn't have linux-devkit in it? Here's what the path looks like on my machine:

    2) I posted a general version of the code, did you customize it for your system? Here's the commands I used for BeagleBoneBlack and AM57xx EVM:

    $ make ARCH=arm CROSS_COMPILE=$HOME/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-  zImage
    $ make ARCH=arm CROSS_COMPILE=$HOME/ti-processor-sdk-linux-am57xx-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-  zImage

    Regards, 

    Nick

  • Hi Nick,

    I wrote a build script to automate the process.  Part of my script is follow

    #!/bin/bash

    set -e

    ...

    export PATH=$HOME/ti-processor-sdk-linux-rt-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH

    export ARCH=arm

    export CROSS_COMPILE=$HOME/ti-processor-sdk-linux-rt-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-

    ...

    make zImage

    ...

    Initially I used export CROSS_COMPILE=arm-linux-gnueabihf-, but that didn't work either, however it works fine on ti-processor-sdk-linux-rt-am335x-evm-03.01.00.06.

    Before executing the script my $PATH variable is followed:

    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/opt/GitEye

    Regards

    Cody

  • Hello Cody,

    Thanks for the reply. The export PATH= line in your script adds linux-devkit to the path before building zImage. Could you comment that line out for me and see if the workaround works now?

    Here's my script:

    #! /bin/bash
    
    # do NOT add linux-devkit to path
    #export PATH=$HOME/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    
    export ARCH=arm
    
    # set CROSS_COMPILE to include the path to the toolchain
    #export CROSS_COMPILE=arm-linux-gnueabihf-
    export CROSS_COMPILE=$HOME/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-
    
    ...
    
    # make the kernel. zImage is default that uboot expects
    make zImage

    Regards,
    Nick

  • Hi,
    Simple solution is to run "make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage" commad as sudo as below.

    sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage

    Regards,
    Sumitkumar Nagar
  • I cannot replicate your results.

    # this code results in build errors 
    
    $ export PATH=$HOME/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    $ make distclean
    $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig
    $ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage

    TI suggested workaround has been updated above to reflect feedback of the last couple posts: https://e2e.ti.com/support/arm/sitara_arm/f/791/p/637451/2433985#2433985 

    Regards,

    Nick

  • Hi Nick,

    I can confirm commenting out export PATH=.... resolves the issue.

    Thanks for the help.

    Regards

    Cody
  • Hello Nick,
    Sorry for late reply.

    Below commands are working fine for kernel compilation for BeagleBone Black.

    # this code results in build with out any error

    $ export PATH=$HOME/ti-processor-sdk-linux-am335x-evm-04.02.00.09/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    $ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
    $ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig
    $ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage

    Regards,
    Sumitkumar Nagar
  • Hello Sumitkumar,

    Be careful if using sudo to compile the kernel - as a general rule, we don't compile the kernel using sudo commands. That said, the code you posted still results in build errors on my machine, so maybe it works in your environment but not on others. Readers are advised to use the TI suggested workaround:

    e2e.ti.com/.../2433985

    Regards,
    Nick

  • Hello Nick,
    Understood, thanks for providing information.

    Regards,
    Sumitkumar Nagar
  • This issue also affects Processor SDK 4.3. The answer at e2e.ti.com/.../2433985 has been updated accordingly.

    Regards,
    Nick