Closed Alex-Gamper closed 3 years ago
For the back_end.adb error, you indeed need to use a slightly older version of GNAT sources, until the next sync, e.g. stop at commit acf190b208ae6883e94b.
The llvm_wrapper.cc issue is unrelated, and most likely due to a LLVM version mismatch: GNAT LLVM currently requires LLVM 10.0.x, you are probably using 11.0. Upgrade to 11.0.1 will be done in the coming weeks.
Arno
Hi Arno
Understood, and thanks for the quick response !
Alex
For your information, the latest GCC master sources should now be usable again.
Hi AdaCore
The latest build of Gnat-llvm fails under msys2/mingw64. Below is the log> Note that the undefined SO_Ref symbols are related to removal of unused functions in GCC (specifically repinfo.ads/adb) which was commited to Git on 17th Dec 2020 "[Ada] Remove unused subprograms in validsw". So their seems to be a disjoint between GCC and gnat-LLVM ??. The issue with LLVM_wrapper.cc seems to be with my LLVM environment, which I think I can resolve
gnatllvm-environment.ads:137:31: "Dynamic_SO_Ref" is undefined (more references follow) gnatllvm-types.ads:694:31: "SO_Ref" is undefined gnatllvm-types.ads:695:13: "Is_Static_SO_Ref" is undefined C:\msys64\home\alexg\gnat-llvm\llvm-interface\llvm_wrapper.cc: In function 'unsigned int Get_Stack_Alignment(llvm::DataLayout)': C:\msys64\home\alexg\gnat-llvm\llvm-interface\llvm_wrapper.cc:254:35: error: request for member 'value' in 'dl->llvm::DataLayout::getStackAlignment()', which is of non-class type 'unsigned int' 254 | return dl->getStackAlignment ().value (); | ^~~~~ C:\msys64\home\alexg\gnat-llvm\llvm-interface\llvm_wrapper.cc: In function 'llvm::Value Build_MemCpy(llvm::IRBuilder<>, llvm::Value, unsigned int, llvm::Value, unsigned int, llvm::Value, bool, llvm::MDNode, llvm::MDNode, llvm::MDNode, llvm::MDNode)': C:\msys64\home\alexg\gnat-llvm\llvm-interface\llvm_wrapper.cc:341:34: error: 'MaybeAlign' was not declared in this scope 341 | return bld->CreateMemCpy (Dst, MaybeAlign (DstAlign), Src, | ^
~~~~~ C:\msys64\home\alexg\gnat-llvm\llvm-interface\llvm_wrapper.cc: In function 'llvm::Value Build_MemMove(llvm::IRBuilder<>, llvm::Value, unsigned int, llvm::Value, unsigned int, llvm::Value, bool, llvm::MDNode, llvm::MDNode, llvm::MDNode)': C:\msys64\home\alexg\gnat-llvm\llvm-interface\llvm_wrapper.cc:352:35: error: 'MaybeAlign' was not declared in this scope 352 | return bld->CreateMemMove (Dst, MaybeAlign (DstAlign), Src, | ^~~~~~ C:\msys64\home\alexg\gnat-llvm\llvm-interface\llvm_wrapper.cc: In function 'llvm::Value Build_MemSet(llvm::IRBuilder<>, llvm::Value, llvm::Value, llvm::Value, unsigned int, bool, llvm::MDNode, llvm::MDNode, llvm::MDNode)': C:\msys64\home\alexg\gnat-llvm\llvm-interface\llvm_wrapper.cc:363:45: error: 'MaybeAlign' was not declared in this scope 363 | return bld->CreateMemSet (Ptr, Val, Size, MaybeAlign (align), isVolatile, | ^~~~~~compilation of back_end.adb failed compilation of llvm_wrapper.cc failed
gprbuild: compilation phase failed make[1]: [Makefile:71: build] Error 4 make[1]: Leaving directory '/home/alexg/gnat-llvm/llvm-interface' make: *** [Makefile:2: all] Error 2
Thanks Alex