Ubuntu12.04
安裝ltib遇到的問題及解決辦法
在ubuntu 12.04 上,參考《在 Ubuntu 12.04 上用
LTIB 編譯 linux BSP》,
編譯freescale LTIB
(L3.0.35_4.1.0_130816_source.tar.gz),還是遇到
了不少問題,下面列出了問題及解決辦法(很多都是google得來的)。
1.Error:
Failed building ncurses -- /bin/sh: ./gen: cannot execute binary
file
Solution:
Index: dist/lfs-5.1/ncurses/ncurses.spec
===================================================================
RCS file:
/sources/ltib/ltib/dist/lfs-5.1/ncurses/ncurses.spec,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 ncurses.spec
--- dist/lfs-5.1/ncurses/ncurses.spec 18 Mar
2009 17:53:25 -0000 1.1.1.5
+++ dist/lfs-5.1/ncurses/ncurses.spec 10 Jul
2009 09:19:46 -0000
@@ -31,11 +31,11 @@
then
./configure --prefix=%{_prefix} --host=$CFGHOST
--build=%{_build} \
--with-install-prefix=$RPM_BUILD_ROOT --mandir=%{_mandir} \
- --with-shared --without-debug
--without-cxx-binding
+ --with-shared --without-debug
--without-cxx-binding --without-ada
else
- --without-shared --without-debug
+ --without-shared --without-debug
fi
make -j1 HOSTCC="$BUILDCC"
2.Error:
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld:
cannot find -lgssapi_krb5
cannot find -lkrb5
cannot find -lk5crypto
collect2: ld returned 1 exit status
make[2]: *** [libftp.la] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/sftp-method.Tpo .deps/sftp-method.Plo
make[2]: Leaving directory
`/home/zhushangzhi/ltib/rpm/BUILD/gnome-vfs-2.24.1/modules‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/zhushangzhi/ltib/rpm/BUILD/gnome-vfs-2.24.1‘
make: *** [all] Error 2
error: Bad exit status from /home/zhushangzhi/ltib/tmp/rpm-tmp.11198
(%build)
RPM build errors:
Bad exit status from
/home/zhushangzhi/ltib/tmp/rpm-tmp.11198 (%build)
Build time for gnome-vfs: 418 seconds
Failed building gnome-vfs
Solution:
sudo apt-get remove krb5-multidev
3.Error:
checking for new_panel in -lpanel... no
configure: error: panel library not found
error: Bad exit status from /home/zhushangzhi/ltib/tmp/rpm-tmp.16521
/home/zhushangzhi/ltib/tmp/rpm-tmp.16521 (%build)
Build time for alsa-utils: 22 seconds
Failed building alsa-utils
1). Make sure if libncurses.so exist in ltib/rootfs/usr/lib/, if not,
build it with command “$ ./ltib -p ncurse”.
2). Create soft link libtinfo.so to libncurse.so
$ cd rootfs/usr/lib
$ sudo ln -s libncurses.so libtinfo.so
4.Error:
gcc fbset.o modes.tab.o lex.yy.o -o fbset
fbset.o: In function `main‘:
fbset.c:(.text.startup+0x11c): undefined reference to `yyparse‘
lex.yy.o: In function `yylex‘:
lex.yy.c:(.text+0xf50): undefined reference to `yylval‘
make: *** [fbset] Error 1
Delete ltib/rpm/BUILD/fbset-2.1 , and run ./ltib again.
5.Error:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such
file or directory.
sudo apt-get install gcc-multilib
6.Error:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such
file or directory
You‘re missing the 32 bit libc dev package:
On Ubuntu it‘s called libc6-dev-i386 -
do sudo apt-get install libc6-dev-i386. See below for extra
instructions for Ubuntu 12.04.
On Red Hat distros, the package name
is glibc-devel.i686 (Thanks to David Gardner‘s comment)
On CentOS 5.8, the package name
is glibc-devel.i386 (Thanks to JimKleck‘s comment)
On CentOS 6.3, the package name
is glibc-devel.i686.
On SLES it‘s called glibc-devel-32bit -
do zypper in glibc-devel-32bit
Are you using Ubuntu 12.04? There is . You‘ll need
to do:
export LIBRARY_PATH=/usr/lib/$(gcc -print-multiarch)
export C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)
export CPLUS_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)
somewhere before you build (say in your .bashrc).
If you are also compiling C++ code, you will also need the 32 bit
stdc++ library. If you see this warning:
.... /usr/bin/ld: cannot find -lstdc++ ....
On Ubuntu you will need to do sudo
apt-get install g++-multilib
On CentOS 5 you will need to do yum
install libstdc++-devel.i386
On CentOS 6 you will need to do yum
install libstdc++-devel.i686
Please feel free to edit in the packages for other systems.
7.Error:
/usr/include/i386-linux-gnu/bits/mathinline.h error: impossible
constraint in ‘asm‘
将上面加進/etc/bash.bashrc 的
去掉,然後重新開機ubuntu,重新./ltib即可。