我试图通过遵循this来编译gcc-4.8.3
用于LFS。
当使用make
时,我得到以下错误:
checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build'
make: *** [all] Error 2
字符串
配置选项:
../configure \
--target=$LFS_TGT \
--prefix=/tools \
--with-glibc-version=2.11 \
--with-sysroot=$LFS \
--with-newlib \
--without-headers \
--with-local-prefix=/tools \
--with-native-system-header-dir=/tools/include \
--disable-nls \
--disable-shared \
--disable-multilib \
--disable-decimal-float \
--disable-threads \
--disable-libatomic \
--disable-libgomp \
--disable-libmpx \
--disable-libquadmath \
--disable-libssp \
--disable-libvtv \
--disable-libstdcxx \
--enable-languages=c,c++
型
其中$LFS_TGT
是x86_64-lfs-linux-gnu
。config.log
在PasteBin上。
最后几行输出:
checking if /mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/xgcc -B/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include supports -fno-rtti -fno-exceptions... no
checking for /mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/xgcc -B/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include option to produce PIC... -fPIC -DPIC
checking if /mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/xgcc -B/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include PIC flag -fPIC -DPIC works... yes
checking if /mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/xgcc -B/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include static flag -static works... no
checking if /mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/xgcc -B/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include supports -c -o file.o... yes
checking if /mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/xgcc -B/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include supports -c -o file.o... (cached) yes
checking whether the /mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/xgcc -B/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/ -B/tools/x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64-lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include linker (/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build/./gcc/collect-ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/mnt/c/Users/admin/Desktop/Projects/AssaultArchitecture/sources/gcc-4.8.3/build'
make: *** [all] Error 2
型
4条答案
按热度按时间wfauudbj1#
如果你在一台
x86_64
机器上构建它,并将x86_64
作为目标,那么你实际上并不是在构建一个交叉编译器。你似乎正在构建一个 *isolated stage1编译器 *,所以你必须添加
--disable-bootstrap
标志。如果你的构建目标平台不是本地平台(交叉编译器),GCC默认禁用引导。fxnxkyjh2#
此处涵盖了完全相同的问题:
https://gcc.gnu.org/ml/gcc-help/2012-07/msg00018.html
建议可能缺少适当的
glibc
(目标为x86_64-lfs-linux-gnu
),需要安装。HTH的。
zphenhs43#
您需要检查
config.log
以找出configure
尝试运行的命令;例如:字符串
在这种情况下,手动运行
/usr/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64
。它可能会产生如下结果:型
所以在这种情况下,你会知道
libz.so.1
找不到。wgmfuz8q4#
如果你正在构建LFS,你应该检查你正在使用的用户,并确保它不是root。