在Ubuntu 20.04 编译LFS 10.1 的"交叉编译临时工具" 中的 File-5.39工具报错:
Making all in magic
make[2]: Entering directory '/mnt/lfs/sources/file-5.39/magic'
../src/file -C -m magic
/mnt/lfs/sources/file-5.39/src/.libs/lt-file: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /mnt/lfs/sources/file-5.39/src/.libs/libmagic.so.1) make[2]: *** [Makefile:834: magic.mgc] Error 1 make[2]: Leaving directory '/mnt/lfs/sources/file-5.39/magic' make[1]: *** [Makefile:459: all-recursive] Error 1 make[1]: Leaving directory '/mnt/lfs/sources/file-5.39' make: *** [Makefile:368: all] Error 2 Making install in src make[1]: Entering directory '/mnt/lfs/sources/file-5.39/src' make install-am make[2]: Entering directory '/mnt/lfs/sources/file-5.39/src' make[3]: Entering directory '/mnt/lfs/sources/file-5.39/src' /usr/bin/mkdir -p '/mnt/lfs/usr/lib' /usr/bin/mkdir -p '/mnt/lfs/usr/include' /bin/sh ../libtool --mode=install /usr/bin/install -c libmagic.la '/mnt/lfs/usr/lib' /usr/bin/install -c -m 644 magic.h '/mnt/lfs/usr/include' libtool: install: /usr/bin/install -c .libs/libmagic.so.1.0.0 /mnt/lfs/usr/lib/libmagic.so.1.0.0 libtool: install: (cd /mnt/lfs/usr/lib && { ln -s -f libmagic.so.1.0.0 libmagic.so.1 || { rm -f libmagic.so.1 && ln -s libmagic.so.1.0.0 libmagic.so.1; }; }) libtool: install: (cd /mnt/lfs/usr/lib && { ln -s -f libmagic.so.1.0.0 libmagic.so || { rm -f libmagic.so && ln -s libmagic.so.1.0.0 libmagic.so; }; }) libtool: install: /usr/bin/install -c .libs/libmagic.lai /mnt/lfs/usr/lib/libmagic.la libtool: warning: remember to run 'libtool --finish /usr/lib' /usr/bin/mkdir -p '/mnt/lfs/usr/bin' /bin/sh ../libtool --mode=install /usr/bin/install -c file '/mnt/lfs/usr/bin' libtool: warning: 'libmagic.la' has not been installed in '/usr/lib' libtool: install: /usr/bin/install -c .libs/file /mnt/lfs/usr/bin/file make[3]: Leaving directory '/mnt/lfs/sources/file-5.39/src' make[2]: Leaving directory '/mnt/lfs/sources/file-5.39/src' make[1]: Leaving directory '/mnt/lfs/sources/file-5.39/src' Making install in magic make[1]: Entering directory '/mnt/lfs/sources/file-5.39/magic' ../src/file -C -m magic /mnt/lfs/sources/file-5.39/src/.libs/lt-file: /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_2.33' not found (required by /mnt/lfs/sources/file-5.39/src/.libs/libmagic.so.1)
make[1]: *** [Makefile:834: magic.mgc] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/file-5.39/magic'
make: *** [Makefile:459: install-recursive] Error 1
所用的编译脚本指令:
tar xvf file-5.39.tar.gz
cd file-5.39
./configure --prefix=/usr --host=$LFS_TGT
make
make DESTDIR=$LFS install
cd ..
rm -rf file-5.39