Closed wanglan0804 closed 4 months ago
I suspect your version of gprbuild is too old and doesn't support GNAT LLVM. Which version of gprbuild are you using? And which version of GNAT/GCC are you using to build GNAT LLVM?
$gprbuild --version GPRBUILD Community 2021 (20210519) (x86_64-pc-linux-gnu) Copyright (C) 2004-2021, AdaCore This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none Target: x86_64-pc-linux-gnu Configured with: ../src/configure --enable-languages=ada,c,c++ --enable-checking=release --enable-dual-exceptions --enable-offload-targets=nvptx-none --enable-_cxa_atexit --enable-threads=posix --with-bugurl=URL:mailto:report@adacore.com --disable-nls --without-libiconv-prefix --disable-libstdcxx-pch --disable-libada --disable-multilib --enable-libstdcxx --with-mpfr=/it/sbx/a2c2/x86_64-linux/mpfr-3.1.5/install --with-gmp=/it/sbx/a2c2/x86_64-linux/gmp-6.1.2/install --with-mpc=/it/sbx/a2c2/x86_64-linux/mpc-1.0.3/install --with-build-time-tools=/it/sbx/a2c2/x86_64-linux/gcc-c/build/buildtools/bin --prefix=/it/sbx/a2c2/x86_64-linux/gcc-c/pkg --build=x86_64-pc-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.3.1 20210520 (for GNAT Community 2021 20210519) (GCC)
$gprbuild --version GPRBUILD Community 2021 (20210519) (x86_64-pc-linux-gnu) Copyright (C) 2004-2021, AdaCore This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
OK, I suspect you will need a more recent version of gprbuild, although I'd recommend first running the displayed gprbuild command with the -v switch, and then run the displayed gprconfig command by hand with -v to get more info about why the toolchain isn't found. The simplest would be to use a more recent version of gprbuild though.
Arno
There's already gprbuild -v, so instead try gprbuild -vh to get the call to gprconfig
Same recommendation for your version of GNAT/GCC: 2021 is now getting old, and there is no guarantee that GNAT LLVM will continue being buildable with it.
You'll find more recent versions via Alire.
$ gcc -v gcc version 10.3.1 20210520 (for GNAT Community 2021 20210519) (GCC)
PATH=/home/wanglan/gnat-llvm/llvm-interface/bin:$PATH \ gprbuild -v -n -p --target=llvm -j0 -P/home/wanglan/gnat-llvm/llvm-interface/lib/rts-native/adainclude/libada \ -XCFLAGS="-O2 -g -Wno-implicit-function-declaration -I/home/wanglan/gnat-llvm/llvm/llvm-project-16.0.6.src/llvm/include" \ -XEXTRALIBFLAGS=" -gdwarf-aranges" \ -XLIBRARY_KIND=static gprconfig: can't find a toolchain for the following configuration: gprconfig: language 'ada', target 'llvm', default runtime object directory "/home/wanglan/gnat-llvm/llvm-interface/lib/rts-native/adainclude/../obj-static" created for project Libgnarl
==============Messages for file: /home/wanglan/gnat-llvm/llvm-interface/lib/rts-native/adainclude/libgnarl.gpr