顯示具有 Toolchain 標籤的文章。 顯示所有文章
顯示具有 Toolchain 標籤的文章。 顯示所有文章

2013年8月19日 星期一

FIX: libmpfr.so.4: cannot open shared object file: No such file or directory

在ubuntu上使用toolchain產生zlib-1.2.5時發生了問題,在使用configure出現了:
======================================================
Checking for shared library support...
Tested arm-buildroot-linux-uclibcgnueabi-gcc -w -c -O ztest17184.c
/home/ken/WrkSrc/toolchain/buildroot-2012.11.1/output/host/usr/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabi/4.4.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
Tested cc -shared -O -o ztest17184.so ztest17184.o
cc: error: ztest17184.o: No such file or directory
cc: fatal error: no input files
compilation terminated.
======================================================

可是當初在fedora 11上使用時卻沒有出現這樣的問題(
======================================================
Checking for shared library support...
Building shared library libz.so.1.2.5 with arm-buildroot-linux-uclibcgnueabi-gcc.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
======================================================

所以上google搜尋,發現了以下的網頁
其中有類似的問題,然而解決的方式是:宣告 "LD_LIBRARY_PATH",所以嘗試 "LD_LIBRABY_PATH" 指向到 toolchain 的 lib 目錄後就可以正常 configure。


PS:
當以上步驟做完後,可以一起解決"lzp=2.04" configure遇到的問題。
cd lzo-2.04; CC=arm-buildroot-linux-uclibcgnueabi-gcc RANLIB=/home/ken/WrkSrc/toolchain/buildroot-2012.11.1/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-ranlib ./configure --host=arm-buildroot-linux-uclibcgnueabi --prefix=/home/ken/WrkSrc/toolchain/buildroot-2012.11.1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/
configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
configure: Configuring LZO 2.04
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-buildroot-linux-uclibcgnueabi
checking target system type... arm-buildroot-linux-uclibcgnueabi
checking whether to enable maintainer-specific portions of Makefiles... no
checking for arm-buildroot-linux-uclibcgnueabi-gcc... arm-buildroot-linux-uclibcgnueabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/ken/WrkSrc/svn/grain/platform/faraday/toolchain_lib/lzo-2.04':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [prebuild] Error 77

2008年11月6日 星期四

Troule Shooting:tail: 無法開啟 ‘+43’ 來讀取資料

問題:
在FC下装arm-elf-tools-20040427.sh的时候出现
# ./arm-elf-tools-20040427.sh
tail: 无法打开 “+43” 读取数据: 没有那个文件或目录
gunzip: stdin: not in gzip format

方案一:
#tail -n+43 arm-elf-tools-20040427.sh >> 1.tar.gz
#tar zxvf 1.tar.gz
这样子你会得到一个usr的文件夹。。
然后: cp -R usr /
方案二:
这是由于脚本中的tail没写对,必须加一个 -n 参数。
#vi arm-elf-tools-20040427.sh
将第39行的代码:
tail +${SKIP} ${SCRIPT} | gunzip | tar xvf -
改成如下:
tail -n +${SKIP} ${SCRIPT} | gunzip | tar xvf