AdaCore / gnat-llvm

LLVM based GNAT compiler
179 stars 18 forks source link

During the make process period, GprConfig can't find a toolchain for the following configuration. #40

Closed wanglan0804 closed 4 months ago

wanglan0804 commented 4 months ago

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

  1. library project Libgnarl is |

    no compiler for language "Ada", cannot compile "s-tadeca.ads" gprbuild: compilation phase failed make[2]: [Makefile:251:quicklib] 错误 4 make[2]: 离开目录“/home/wanglan/gnat-llvm/llvm-interface” make[1]: [Makefile:219:gnatlib-automated] 错误 2 make[1]: 离开目录“/home/wanglan/gnat-llvm/llvm-interface” make: [Makefile:2:all] 错误 2

ArnaudCharlet commented 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?

wanglan0804 commented 4 months ago

$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.

wanglan0804 commented 4 months ago

$ 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)

ArnaudCharlet commented 4 months ago

$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

ArnaudCharlet commented 4 months ago

There's already gprbuild -v, so instead try gprbuild -vh to get the call to gprconfig

ArnaudCharlet commented 4 months ago

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)