Ubuntu distro uses dash instead of bash as shell, then change it to bash:
# cd /bin
# sudo rm sh
# sudo ln -s bash sh
Install all necessary packages by typing:
sudo apt-get install patch g++ rpm zlib1g-dev m4 bison libncurses5-dev libglib2.0-dev gettext \
build-essential tcl intltool libxml2-dev liborbit2-dev libx11-dev ccache flex uuid-dev liblzo2-dev
If under Ubuntu 64bit, install ia32-libs package:
sudo apt-get install ia32-libs
- If you will install Xorg in your ltib, you will need to install this package:
sudo apt-get install x11proto-core-dev
- If you will install gtk+ in your ltib, you will need to install the following packages:
sudo apt-get install libdbus-glib-1-dev libgtk2.0-dev libdbus-glib-1-dev
Configure visudo file, as root using the command "/usr/sbin/visudo", and add the following line in the User privilege section:
username ALL = NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm
Where username is your user name, the name you use to do logon in your system.
Classic Error messages and solutions under Ubuntu
Can't exec "mconf": No such file or directory at /home/tic/ltib/bin/Ltibutils.pm line 972.
exec: mconf /home/tic/ltib/config/main.lkc: No such file or directory at /home/tic/ltib/bin/Ltibutils.pm line 972.
traceback:
Ltibutils::system_nb:972
main::get_plat_dir:2947
main:548
Started: Tue Feb 16 18:01:38 2010
Ended: Tue Feb 16 18:59:26 2010
Elapsed: 3468 seconds
Build Failed
Solution: edit the ltib script
line 925:
# install the new package
$cmd = "$cf->{sudo} $cf->{rpm} ";
$cmd .= "--root $cf->{rpmroot} ";
$cmd .= "--dbpath $cf->{rpmdb} ";
$cmd .= "--prefix $cf->{rpmipfx} " if $cf->{rpmipfx};
$cmd .= "--ignorearch -ivh ";
$cmd .= "--force " unless $cf->{conflicts} || $cf->{hostinst};
$cmd .= "--replacepkgs --replacefiles " if $cf->{hostinst};
$cmd .= "--nodeps " if $cf->{nodeps};
$cmd .= "--excludedocs ";
+ $cmd .= "--force-debian " if $rpm =~ m/rpm-fs/ && `uname -a` =~ m/ubuntu/i;
$cmd .= "--define '_tmppath $cf->{tmppath}' ";
$cmd .= "$rpm";
error: cannot open Name index using db3 - No such file or directory (2)
error: cannot open Name index using db3 - No such file or directory (2)
sudo rpm --root / --dbpath /tmp/rpm-tic/rpmdb -e --allmatches --nodeps --define '_tmppath /home/tic/ltib/tmp' rpm-fs 2>/dev/null
sudo rpm --root / --dbpath /tmp/rpm-tic/rpmdb --ignorearch -ivh --force --nodeps --excludedocs --define '_tmppath /home/tic/ltib/tmp' /tmp/rpm-tic/RPMS/i686/rpm-fs-4.0.4-1.i686.rpm
rpm: please use alien to install rpm packages on Debian, if you are really sure use --force-debian switch. See README.Debian for more details.
sudo /opt/freescale/ltib/usr/bin/rpm --root / --dbpath /opt/freescale/ltib/var/lib/rpm -Uv --justdb --notriggers --noscripts --nodeps /tmp/rpm-tic/RPMS/i686/rpm-fs-4.0.4-1.i686.rpm
sudo: /opt/freescale/ltib/usr/bin/rpm: command not found
mkdir: cannot create directory `/opt/freescale': Permission denied
Cannot create the download directory:
/opt/freescale/pkgs
Either change to a global directory you have write permissions to,
or create it as root. Please set the permissions to 777
traceback:
main::check_dirs:2469
main::host_checks:1426
main:542
Started: Wed Nov 25 01:56:53 2009
Ended: Wed Nov 25 02:07:42 2009
Elapsed: 649 seconds
Build Failed
solution : sudo chmod 777 /opt
make[1]: Entering directory `/opt/freescale/ltib/usr/src/rpm/BUILD/texinfo-4.8'
Making all in tools
make[2]: Entering directory `/opt/freescale/ltib/usr/src/rpm/BUILD/texinfo-4.8/tools'
make[2]: *** No rule to make target `all'. Stop.
make[2]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/texinfo-4.8/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/texinfo-4.8'
make: *** [all] Error 2
error: Bad exit status from /home/tic/ltib/tmp/rpm-tmp.U8vEdX (%build)
RPM build errors:
Bad exit status from /home/tic/ltib/tmp/rpm-tmp.U8vEdX (%build)
Build time for texinfo: 55 seconds
Failed building texinfo
Died at ./ltib line 1380.
traceback:
main::build_host_rpms:1380
main::host_checks:1435
main:542
Started: Wed Nov 25 20:10:43 2009
Ended: Wed Nov 25 20:31:42 2009
Elapsed: 1259 seconds
These packages failed to build:
texinfo
Build Failed
solution : install ccache package in host
+ cd /opt/freescale/ltib/usr/src/rpm/BUILD
+ cd lkc-1.4
+ make -j1 conf mconf
gcc -O0 -Wall -g -fPIC -c conf.c -o conf.o
bison -l -b zconf -p zconf zconf.y
flex -L -Pzconf zconf.l
make: flex: Command not found
make: *** [lex.zconf.c] Error 127
error: Bad exit status from /home/tic/ltib/tmp/rpm-tmp.010CjL (%build)
RPM build errors:
Bad exit status from /home/tic/ltib/tmp/rpm-tmp.010CjL (%build)
Build time for lkc: 2 seconds
Failed building lkc
Died at ./ltib line 1380.
traceback:
main::build_host_rpms:1380
main::host_checks:1435
main:542
Started: Thu Nov 26 00:33:46 2009
Ended: Thu Nov 26 01:19:39 2009
Elapsed: 2753 seconds
These packages failed to build:
lkc
Build Failed
solution : install flex package in host
Making all in po
make[2]: Entering directory `/home/tic/ltib/rpm/BUILD/alsa-utils-1.0.11rc2/alsaconf/po'
mv: cannot stat `t-ja.gmo': No such file or directory
make[2]: *** [ja.gmo] Error 1
make[2]: *** Waiting for unfinished jobs....
mv: cannot stat `t-ru.gmo': No such file or directory
make[2]: *** [ru.gmo] Error 1
make[2]: Leaving directory `/home/tic/ltib/rpm/BUILD/alsa-utils-1.0.11rc2/alsaconf/po'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tic/ltib/rpm/BUILD/alsa-utils-1.0.11rc2/alsaconf'
make: *** [all-recursive] Error 1
error: Bad exit status from /home/tic/ltib/tmp/rpm-tmp.93730 (%build)
RPM build errors:
Bad exit status from /home/tic/ltib/tmp/rpm-tmp.93730 (%build)
Build time for alsa-utils: 84 seconds
Failed building alsa-utils
f_buildrpms() returned an error, exiting
traceback:
main:560
Started: Sat Nov 28 07:39:40 2009
Ended: Sat Nov 28 08:17:18 2009
Elapsed: 2258 seconds
These packages failed to build:
alsa-utils
Build Failed
Exiting on error or interrupt
solution : install package gettext and ja-trans
checking for glib-genmarshal... no
configure: error: Could not find a glib-genmarshal in your PATH
error: Bad exit status from /home/tic/ltib/tmp/rpm-tmp.13030 (%build)
RPM build errors:
Bad exit status from /home/tic/ltib/tmp/rpm-tmp.13030 (%build)
Build time for glib2: 107 seconds
Failed building glib2
f_buildrpms() returned an error, exiting
traceback:
main:560
Started: Sat Dec 5 03:19:36 2009
Ended: Sat Dec 5 03:29:46 2009
Elapsed: 610 seconds
These packages failed to build:
glib2
Build Failed
Exiting on error or interrupt
solution : install the package libglib2.0-dev