PPCG does not build well on Ubuntu 24.04 LTS

21 views
Skip to first unread message

alex....@gmail.com

unread,
Jul 5, 2024, 9:50:46 AM (2 days ago) Jul 5
to isl Development
  Hello.
    I have an Ubuntu 24.04 LTS installation, with clang and llvm version 18.1.3.

    I cloned today the PPCG source code from git://repo.or.cz/ppcg.git. I followed the instructions from the README. Everything works OK until I give make, which fails with the following error:
  <<extract_interface.cc:413:41: error: no matching function for call to ‘clang::SourceManager::createFileID(const clang::FileEntry*&, clang::SourceLocation, clang::SrcMgr::CharacteristicK
ind)’
        413 |         SM.setMainFileID(SM.createFileID(file, SourceLocation(),
            |                          ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
        414 |                                         SrcMgr::C_User));
            |                                         ~~~~~~~~~~~~~~~
      In file included from /usr/lib/llvm-18/include/clang/Frontend/CompilerInstance.h:14,
                       from extract_interface.cc:67:
      /usr/lib/llvm-18/include/clang/Basic/SourceManager.h:911:10: note: candidate:     ‘clang::FileID clang::SourceManager::createFileID(clang::FileEntryRef, clang::SourceLocation, clang::SrcMgr::CharacteristicKind, int, clang::SourceLocation::UIntTy)’
      911 |   FileID createFileID(FileEntryRef SourceFile, SourceLocation IncludePos,
            |          ^~~~~~~~~~~~
      /usr/lib/llvm-18/include/clang/Basic/SourceManager.h:911:36: note:   no known conversion for argument 1 from ‘const clang::FileEntry*’ to ‘clang::FileEntryRef’>>

    Did anybody else encounter this error?

    I changed the file extract_interface.cc and was able to get past this error, but another error appeared:
  <<extract_interface.cc: In function ‘void set_lang_defaults(clang::CompilerInstance*)’:
    extract_interface.cc:441:29: error: ‘setLangDefaults’ is not a member of ‘clang::CompilerInvocation’
        441 |         CompilerInvocation::setLangDefaults(Clang->getLangOpts(), IK_C,>>
    I'm currently trying to fix this error.

    Any help is appreciated.

  Thank you,
     Alex

Dmitry N. Mikushin

unread,
Jul 5, 2024, 6:44:31 PM (2 days ago) Jul 5
to alex....@gmail.com, isl Development
Hi Alex,

FWIW: LLVM maintains an Ubuntu repository with different versions of LLVM. You may find it easier to use, instead of distro-provided Clang: https://apt.llvm.org/ Since clang-18 appears to be incompatible with PPCG, it's worth trying clang-17 from LLVM repo.

Kind regards,
Dmitry.

пт, 5 июл. 2024 г. в 13:50, alex....@gmail.com <alex....@gmail.com>:
--

---
You received this message because you are subscribed to the Google Groups "isl Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isl-developme...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isl-development/02540bed-95d2-4645-bd91-f077404a8b5cn%40googlegroups.com.

leeking leeking

unread,
6:01 AM (10 hours ago) 6:01 AM
to isl Development
I have created a patch for this problem, https://github.com/lijinpei/isl-mirror/commit/b40431550f8352fb0a72629f3f811081b061dfc7 , but I don't know how to get it reviewed/submitted.

leeking leeking

unread,
6:01 AM (10 hours ago) 6:01 AM
to isl Development
I created a patch for this problem https://github.com/lijinpei/isl-mirror/commit/b40431550f8352fb0a72629f3f811081b061dfc7 , but I don't know where I can get it reviewed/submitted.

Sven Verdoolaege

unread,
6:03 AM (10 hours ago) 6:03 AM
to leeking leeking, isl Development
On Sun, Jul 07, 2024 at 02:34:52AM -0700, leeking leeking wrote:
> I created a patch for this problem
> https://github.com/lijinpei/isl-mirror/commit/b40431550f8352fb0a72629f3f811081b061dfc7
> , but I don't know where I can get it reviewed/submitted.

You should post it here.
Note that I have been working on a fix myself,
which should be out soon.

skimo

leeking leeking

unread,
7:53 AM (8 hours ago) 7:53 AM
to isl Development
I noticed pet also has this problem, besides it uses clang::ArrayType:Static, which has been moved to another place in llvm-18. I created a patch for this problem https://github.com/lijinpei/pet-mirror/commit/2863bd4b6967d0174bd7834654aabe45361e8e39 .

Also I found polylib needs this patch to compile on my machine(it becomes werror on some machines):
```
commit 36765e47787f9370a52304052f07d2493b836f59
Author: Vincent Loechner <loec...@icps.u-strasbg.fr>
Date:   Thu Feb 4 12:49:10 2016 +0100

    function pre-declaration to remove warnings

diff --git a/applications/testCompressParms.c b/applications/testCompressParms.c
index 41f1a25..0fca2d9 100644
--- a/applications/testCompressParms.c
+++ b/applications/testCompressParms.c
@@ -42,6 +42,11 @@
 
 #define maxRays 200
 
+int test_Constraints_Remove_parm_eqs(Matrix * A, Matrix * B);
+int test_Polyhedron_Remove_parm_eqs(Matrix * A, Matrix * B);
+int test_Constraints_fullDimensionize(Matrix * A, Matrix * B,
+                                     unsigned int nbSamples);
+
```
It was created on 2016 while the polylib bundled with barvinok is from 2010.
Reply all
Reply to author
Forward
0 new messages