bondhugula / pluto

Pluto: An automatic polyhedral parallelizer and locality optimizer
http://pluto-compiler.sourceforge.net
MIT License
274 stars 66 forks source link

error running make (pet): invalid use of incomplete type 'class clang::Builtin::Context #74

Open chriselrod opened 4 years ago

chriselrod commented 4 years ago
Making all in pet
make[2]: Entering directory '/home/chriselrod/Documents/libraries/pluto/pet'
make  all-recursive
make[3]: Entering directory '/home/chriselrod/Documents/libraries/pluto/pet'
Making all in .
make[4]: Entering directory '/home/chriselrod/Documents/libraries/pluto/pet'
  CXX      pet.lo
  CC       pet_check_code-pet_check_code.o
  CC       libdep_a-all.o
  AR       libdep.a
ar: `u' modifier ignored since `D' is the default (see `U')
pet.cc: In function ‘isl_stat foreach_scop_in_C_source(isl_ctx*, const char*, const char*, pet_options*, isl_stat (*)(pet_scop*, void*), void*)’:
pet.cc:1147:19: error: invalid use of incomplete type ‘class clang::Builtin::Context’
 1147 |  PP.getBuiltinInfo().initializeBuiltins(PP.getIdentifierTable(),
      |  ~~~~~~~~~~~~~~~~~^~
In file included from pet.cc:87:
/usr/local/include/clang/Lex/Preprocessor.h:84:7: note: forward declaration of ‘class clang::Builtin::Context’
   84 | class Context;
      |       ^~~~~~~
make[4]: *** [Makefile:1207: pet.lo] Error 1
make[4]: Leaving directory '/home/chriselrod/Documents/libraries/pluto/pet'
make[3]: *** [Makefile:1250: all-recursive] Error 1
make[3]: Leaving directory '/home/chriselrod/Documents/libraries/pluto/pet'
make[2]: *** [Makefile:843: all] Error 2
make[2]: Leaving directory '/home/chriselrod/Documents/libraries/pluto/pet'
make[1]: *** [Makefile:521: all-recursive] Error 1
make[1]: Leaving directory '/home/chriselrod/Documents/libraries/pluto'
make: *** [Makefile:391: all] Error 2

This is with

clang --version
clang version 10.0.0 (https://github.com/llvm/llvm-project.git b406eab888021ade8b4e680d2cf45b82fca17a98)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

I don't have this problem with clang 9.0. While clang 10 hasn't been released yet, it seems unlikely that there will be many changes between the current 10 (rc4) and the final release.

This issue probably should have been opened at pet-for-pluto.

bondhugula commented 4 years ago

Since clang 10.0 hasn't been released yet, it's unlikely pet would be updated for it. The last commit on pet is from Jan 17. It's best to report this as a heads up on isl-development@googlegroups.com (which is the dev and bug reporting list for pet).

bondhugula commented 4 years ago

I've updated the pet submodule (pet-for-pluto) to merge in up until the latest pet commit upstream:

commit 8c0df55b2fbe95636c4977eb1daeb2bc39ce372e (upstream/master)
Author: Sven Verdoolaege <sven.verdoolaege@gmail.com>
Date:   Fri Jan 17 20:37:56 2020 +0100

    rerun configure when llvm-config is updated

It looks like you are still experiencing an issue with the pet build albeit different. I haven't myself tested with clang 10.0 rc.

chriselrod commented 4 years ago

Just built it successfully after applying this patch. I assume Sven will add the patch upstream.

bondhugula commented 4 years ago

Thanks very much! I can update the pet submodule as soon as that upstream patch is in, or please feel free to submit a pull request.