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/AM5728: IPC build error

Part Number: AM5728

Tool/software: Linux

Hi - I recently encountered this known issue (Perl in linux-devkit of the 4.1/4.2 SDK release packages are not relocatable) when building under Processor SDK for Linux:

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/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/lib/perl/vendor_perl/5.22.1/ /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/lib/perl/vendor_perl/5.22.1 /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/lib/perl/5.22.1/ /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/lib/perl/5.22.1 /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/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.
lib/Makefile:220: recipe for target 'lib/oid_registry_data.c' failed
make[2]: *** [lib/oid_registry_data.c] Error 2
make[2]: *** Waiting for unfinished jobs....

I implemented this workaround:

make ARCH=arm CROSS_COMPILE=../../linux-devkit/sysroot/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- zImage" (or even the full path to arm-linux-gnueabihf-)

Now I can build the kernel out but if I try to build ti-ipc-linux I get the following error:

make ARCH=arm CROSS_COMPILE=~/ti-processor-sdk-linux-am57xx-evm-04.01.00.06/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- ti-ipc-linux
or 
make ARCH=arm CROSS_COMPILE=../../linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- ti-ipc-linux

libtool: compile: arm-linux-gnueabihf-gcc "-DPACKAGE_NAME=\"TI IPC\"" -DPACKAGE_TARNAME=\"ti-ipc\" -DPACKAGE_VERSION=\"3.0.0\" "-DPACKAGE_STRING=\"TI IPC 3.0.0\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ti-ipc\" -DVERSION=\"3.0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -I. -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard --sysroot=/home/dmurphy/ti-processor-sdk-linux-am57xx-evm-04.01.00.06/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi -I../../../hlos_common/include -D_GNU_SOURCE -Wall -I../../../linux/include -I../../../packages -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard --sysroot=/home/dmurphy/ti-processor-sdk-linux-am57xx-evm-04.01.00.06/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi -MT LAD_client.lo -MD -MP -MF .deps/LAD_client.Tpo -c LAD_client.c -fPIC -DPIC -o .libs/LAD_client.o
../../../libtool: line 1111: arm-linux-gnueabihf-gcc: command not found

Just to confirm, I have also removed the compiler path from $PATH as per the workaround.


dmurphy@tibuilder:~/ti-processor-sdk-linux-am57xx-evm-04.01.00.06$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Any help or recommendation would be much appreciated!

Thanks,

Dermot

 

  • Hello Dermot,

    When you hit the "Can't locate strict.pm" module issue, you do not need to do any workaround. You just need to install the strict module. Then continue to build the ti-ipc-linux by using the top-level makefile

    sudo apt-get install --reinstall --purge perl-base
    sudo apt-get install --reinstall --purge perl-modules-5.22

    or export PERL5LIB if you want to use the strict module from Processor SDK's linux-devkit.

    export PERL5LIB=<Processor SDK install path>/linux-devkit/sysroots/x86_64-arago-linux/usr/lib/perl

    Best regards,
    Kemal

  • Hi Kemal,

    This fix didn't work for my particular issue but I found the root cause. I discovered that using "sudo make linux" to build out the linux kernel did work OK.

    This led me to think that there might be an environment configuation issue.  Doing "which perl" under both root and build user showed that root was using /usr/bin/perl while the build user was using perl from the sysroot folder because of the step to include the cross compiler in the path...

    dmurphy@tibuilder:~$ sudo which perl
    /usr/bin/perl
    dmurphy@tibuilder:~$ which perl
    /home/dmurphy/ti-processor-sdk-linux-am57xx-evm-04.01.00.06/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/perl

    So putting /usr/bin at the beginning of $PATH appears to work OK for me. I guess the root cause is possible "environment contamination" from processors.wiki.ti.com/.../Processor_SDK_IPC_Quick_Start_Guide which requires cross compiler to be added to $PATH when building out ti-ipc_linux?

    Thanks,
    Dermot

  • Yes, cross compiler $PATH must be added when you are building out of ti-ipc_linux.
  • Thanks Kemal - I guess it just highlights the importance of starting new builds in a clean bash shell and also of not adding too many env configuration variables into ~/.bashrc!