如何解决错误:无法计算目标文件的后缀:在将OpenACC支持卸载到Nvidia GPU的情况下构建GCC 10时无法编译
我正在尝试在Ubuntu 20.04上为Nvidia PTX安装GCC 10,以便可以将openACC负载卸载到Nvidia GPU。
我正在按照link
中给出的步骤进行操作- 安装nvptx工具
git clone https://github.com/MentorEmbedded/nvptx-tools.git
./configure
make -j #Generates nvptx-none-as,nvptx-none-ld
make install DESTDIR=/install
导出了路径export PATH=/install/usr/local/bin:$PATH
-
克隆了newlib-cygwin,
git clone git://sourceware.org/git/newlib-cygwin.git
-
下载GCC 10源文件
wget https://ftpmirror.gnu.org/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz
tar xf gcc-10.1.0.tar.xz
cd gcc-10.1.0
./contrib/download_prerequisites
cd ..
mkdir build_gcc10 && cd build_gcc10
../gcc-10.1.0/configure --target=nvptx-none --enable-as-accelerator-for=x86_64-pc-linux-gnu --with-build-time-tools=/install/usr/local/nvptx-none/bin --disable-sjlj-exceptions --enable-newlib-io-long-long
- 我还导出了gmp,mpfr,mpc的lib运行时路径
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
我遇到以下错误
错误:
checking for suffix of object files... configure: error: in `/home/gcc-10.1.0/build/nvptx-none/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make[1]: *** [Makefile:13187: configure-target-libgcc] Error 1
make[1]: Leaving directory '/home/gcc-10.1.0/build'
make: *** [Makefile:947: all] Error 2
当我检查/home/gcc-10.1.0/build/nvptx-none/libgcc/config.log文件时,错误是由于此原因
configure:3535: /home/build_gcc10/./gcc/xgcc -B/home/build_gcc10/./gcc/ -nostdinc -B/home/build_gcc10/nvptx-none/newlib/ -isystem /home/build_gcc10/nvptx-none/newlib/targ-include -isystem /home/gcc-10.1.0/newlib/libc/include -B/usr/local/nvptx-none/bin/ -B/usr/local/nvptx-none/lib/ -isystem /usr/local/nvptx-none/include -isystem /usr/local/nvptx-none/sys-include -V >&5
xgcc: error: unrecognized command-line option '-V'
xgcc: Fatal error: no input files
compilation terminated.
configure:3546: $? = 1
configure:3535: /home/build_gcc10/./gcc/xgcc -B/home/build_gcc10/./gcc/ -nostdinc -B/home/build_gcc10/nvptx-none/newlib/ -isystem /home/build_gcc10/nvptx-none/newlib/targ-include -isystem /home/gcc-10.1.0/newlib/libc/include -B/usr/local/nvptx-none/bin/ -B/usr/local/nvptx-none/lib/ -isystem /usr/local/nvptx-none/include -isystem /usr/local/nvptx-none/sys-include -qversion >&5
xgcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
xgcc: Fatal error: no input files
compilation terminated.
请向我建议如何进行。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。