AdaCore / gnat-llvm

LLVM based GNAT compiler
179 stars 18 forks source link

Compilation failure on Linux #22

Closed dde-cls closed 3 years ago

dde-cls commented 3 years ago

Hello,

I have cloned commit d447ac3 and have been able to get the compilation going rather far, apparently (see attached file gnat-llvm.log for a full log), yet it fails with the following message

PATH=/home/ddeharbe/dev/gnat-llvm/llvm-interface/bin:$PATH \
gprbuild -v -n -p --target=llvm -j0 -P/home/ddeharbe/dev/gnat-llvm/llvm-interface/lib/rts-native/adainclude/libada \
  -XCFLAGS="-O2 -g" \
  -XEXTRALIBFLAGS=" -gdwarf-aranges" \
  -XLIBRARY_KIND=static
gprconfig: can't find a toolchain for the following configuration:
gprconfig: language 'c', target 'llvm', default runtime
object directory "/home/ddeharbe/dev/gnat-llvm/llvm-interface/lib/rts-native/adainclude/../obj-static" created for project Libgnarl

Notice that earlier a file copy operation also produced an error message (sorry for the messages in French: basically it states that file system.ads was not found).

cp: impossible d'évaluer '/home/ddeharbe/dev/gnat-llvm/llvm-interface/gnat_src/libgnat/system.ads': Aucun fichier ou dossier de ce type

The attached file contains information about the different versions of some of the tools involved.

dde-cls commented 3 years ago

Here is the log (hopefully) : gnat-llvm.log

dde-cls commented 3 years ago

Got around this issue by performing installation on a fresh VM. I imagine what did the trick was to use the GNAT installer from AdaCore instead of the gnat package provided by the Linux distribution.

ArnaudCharlet commented 3 years ago

Great, thanks for letting us know and glad to hear that you solved the issue!

yuyichao commented 2 years ago

I've just hit this issue again and this was caused by (missing of) https://github.com/AdaCore/gprconfig_kb/commit/7f920ebd6cdf81789ee8ae2af30e685a40a2bcd3 . It seems that this fix wasn't released when this issue was reported and in my case I installed gprbuild from AUR and it was on the version 21 and I assume updating to version 22 should fix it (I patched it locally for now).

Running the gprconfig command with -v -v and looking for the config file where it specifies the regex to look for was how I figured this out...

ArnaudCharlet commented 2 years ago

Makes sense, thanks for sharing your findings, this may be useful for others!