Buld linux kernel from sources

Hello. I had the following problem. I’m trying to build the Linux kernel from the sources on my computer, guided by this article link text. But I get an error “Can’t locate strict.pm in @INC” What can I do with this?

make -j3 uImage LOADADDR=10008000 2>&1 | tee build.log
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  GEN     lib/oid_registry_data.c
Can't locate strict.pm in @INC (you may need to install the strict module) (@INC contains: /home/dima/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/site_perl/5.22.1/ //usr/lib/perl/site_perl/5.22.1 //usr/lib/perl/vendor_perl/5.22.1 //usr/lib/perl/5.22.1 /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/site_perl/5.22.1/ /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/site_perl/5.22.1 /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/vendor_perl/5.22.1/ /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/vendor_perl/5.22.1 /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/5.22.1/ /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/5.22.1 /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-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
make: *** Waiting for unfinished jobs....


Could you provide the version of the Bsp you are compiling? Which host distribution are u using?


Could you try using gcc6 instead of gcc5 as written in the article you are following to compile the kernel?

Image Version - 2.7 Kernel Git Branch - toradex_4.1-2.0.x-imx
Distro: angstrom
Distro Version: v2016.12
Metadata Revision: ddf907ca95a19f54785079b4396935273b3747f6
Timestamp: 20170629045849

Thanks for the Bsp version, but i wanted additionally Information about your Host. Thiis the PC you are using to compile the linux kernel and which you are using to connect to the target (module).

Further, Could you try using gcc6 instead of gcc5 as written in the article you are following to compile the kernel?

Thanks for the Bsp version of the module. Could you provide also details about your Host?
Could you use GCC6 instead of GCC5 to compile the Linux Kernel?

For building kernel I use

$ arm-angstrom-linux-gnueabi-gcc --version
arm-angstrom-linux-gnueabi-gcc (Linaro GCC 6.2-2016.11) 6.2.1

Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A

And this is my $PATH

$ echo $PATH

environment variables:

    $ cat ~/export_compiler_imx6 
    export ARCH=arm
    export PATH=/home/dima/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin:/home/dima/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/arm-angstrom-linux-gnueabi/:$PATH
    export CROSS_COMPILE=arm-angstrom-linux-gnueabi-

To start building I use this command:

make apalis_imx6_defconfig
make -j3 uImage LOADADDR=10008000 2>&1 | tee build.log

What’s wrong?


Note that building the kernel with an OE SDK that way works here. So the answer to Jasky’s question on the build host’s distribution might shed some light.

Also what is the output of the following:

find /usr/ -name strict.pm -exec ls -l {} \; 2>/dev/zero

And what is the output of the following (after sourcing your environment script):

echo "use strict;" > hello.pl
echo 'print "Hello World!\n";' >> hello.pl
perl hello.pl
/usr/bin/perl hello.pl


I had found the reason, no longer relevant for me. Excuse for troubling.

Thanks for the feedback. What was the issue?