测试gcc:
make -k check
安装:
make install
一些方便性的需求:
ln -sv ../usr/bin/cpp /lib
ln -sv gcc /usr/bin/cc
接下来,是通过编译一个程序,然后读取该程序的各个信息来确定gcc的正确性:
-
echo 'main(){}' > dummy.c
-
cc dummy.c -v -Wl,--verbose &> dummy.log
-
readelf -l a.out | grep ': /lib'
-
-
grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
-
-
grep -B4 '^ /usr/include' dummy.log
-
-
grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
-
-
grep "/lib.*/libc.so.6 " dummy.log
-
-
grep found dummy.log
一切正常,删除添加文件:
rm -v dummy.c a.out dummy.log
安装sed:
-
./configure --prefix=/usr --bindir=/bin --htmldir=/usr/share/doc/sed-4.2.1
-
make
-
make html
-
make check
-
make install
-
make -C doc install-html
安装pkg-config:
-
./configure --prefix=/usr
-
make
-
make check
-
make install
安装ncurses:
-
./configure --prefix=/usr --with-shared --without-debug --enable-widec
-
make
-
make install
-
-
一些方便性工作:(一些程序需要)
-
mv -v /usr/lib/libncursesw.so.5* /lib
-
ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so
-
for lib in ncurses form panel menu ; do \
-
rm -vf /usr/lib/lib${lib}.so ; \
-
echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
-
ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
-
done
-
ln -sfv libncurses++w.a /usr/lib/libncurses++.a
-
-
rm -vf /usr/lib/libcursesw.so
-
echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so
-
ln -sfv libncurses.so /usr/lib/libcurses.so
-
ln -sfv libncursesw.a /usr/lib/libcursesw.a
-
ln -sfv libncurses.a /usr/lib/libcurses.a
-
-
安装文档:
-
mkdir -v /usr/share/doc/ncurses-5.7
-
cp -v -R doc/* /usr/share/doc/ncurses-5.7
工作正常,无异常。
阅读(2311) | 评论(0) | 转发(0) |