IMX Ltib common errors

These are the common errors you may encounter while building Ltib

  • Ltib Zlib not installed error

While building ltib it may report zlib packages are missing

zlib

The reason is zlib path is changed
Edit bin/Ltibutils.pm inside ltib folder in zlib section add one line

zlib => sub { my @f = (glob('/usr/lib/libz.so*'),
glob('/lib/libz.so*'),
glob('/lib/i386-linux-gnu/libz.so*'),
glob('/lib64/libz.so*'),
glob('/usr/lib/i386-linux-gnu/libz.so*'),
glob('/usr/lib32/libz.so*'),
  • Failed building wget” undefined reference to `SSLv2_client_method’

sslerror

To eliminate this error edit ltib/dist/lfs-5.1/wget/wget.spec file and add “–without-ssl” to ./configure section

ssloption

After adding this you need to manually remove the wgest file from BUILD (/opt/freescale/ltib/usr/src/rpm/BUILD) directory then again compile

  • /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-12.09.01/common/stdafx.h:30:36: fatal error: /usr/include/sys/types.h: No such file or directory

elftosb

The error is that there is no types.h usr/include/sys directory its in /usr/incude/i386-linux-gnu/sys

To fix this error

sudo ln -s i386-linux-gnu/sys sys
  • /usr/bin/ld: ElftosbAST.o: undefined reference to symbol ‘powf@@GLIBC_2.0’

powf

To avoid this error you need to edit makefile.rules of elftosb-2.6.35.3-1.1.0.tar.gz

cp /opt/freescale/pkgs/elftosb-2.6.35.3-1.1.0.tar.gz ~/Desktop
tar -zxvf elftosb-2.6.35.3-1.1.0.tar.gz
cd elftosb-2.6.35.3-1.1.0/
vim makefile.rules

Inside that file there is a line that reads

LIBS = -lstdc++

change it to

LIBS = -lstdc++ -lm

to add the standard math library to the build.

make

After editing compress the folder back to tar.gz and place it in pkgs folder

tar -zcvf elftosb-2.6.35.3-1.1.0.tar.gz elftosb-2.6.35.3-1.1.0/
cp  ~/Desktop/elftosb-2.6.35.3-1.1.0.tar.gz /opt/freescale/pkgs/elftosb-2.6.35.3-1.1.0.tar.gz

Now delete the old file from BUILD folder.Else you will get an error saying delete that file.

rm -rf /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-2.6.35.3-1.1.0.tar.gz

Happy Hacking 🙂