trailofbits / pasta

Peter's Amazing Syntax Tree Analyzer
Apache License 2.0
123 stars 9 forks source link

Needed `vcpkg install Z3` on arch linux plus maybe more changes? #89

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hello, sorry to bother you if this is a known issue. I am using arch linux and following the instructions. I installed vcpkg from github following their instructions, and I needed to install Z3 with vcpkg on my system at least.

cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_TOOLCHAIN_FILE="/path/to/export/vcpkg-16/scripts/buildsystems/vcpkg.cmake" \
    -DVCPKG_TARGET_TRIPLET=x64-linux \
    -DVCPKG_HOST_TRIPLET=x64-linux-rel \
    ..
-- The C compiler identification is GNU 13.1.1
-- The CXX compiler identification is GNU 13.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Install prefix: /usr/local
CMake Deprecation Warning at cmake/utils.cmake:3 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  CMakeLists.txt:10 (include)

-- Looking for C++ include filesystem
-- Looking for C++ include filesystem - found
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success
-- Found filesystem: filesystem
CMake Error at /home/alex/repos/vcpkg/scripts/buildsystems/vcpkg.cmake:855 (_find_package):
  Could not find a package configuration file provided by "Z3" with any of
  the following names:

    Z3Config.cmake
    z3-config.cmake

  Add the installation prefix of "Z3" to CMAKE_PREFIX_PATH or set "Z3_DIR" to
  a directory containing one of the above files.  If "Z3" provides a separate
  development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:74 (find_package)

-- Configuring incomplete, errors occurred!

Also in the section with

 If you experience issues then try excluding teh HOST and TARGET triplets altogether.

teh should likely be the.

After adding Z3 with vcpkg I get

07:27:41 alex@Ninsar build ±|master|→ cmake     -DCMAKE_BUILD_TYPE=Release     -DCMAKE_TOOLCHAIN_FILE="../../vcpkg/scripts/buildsystems/vcpkg.cmake"     -DVCPKG_TARGET_TRIPLET=x64-linux     -DVCPKG_HOST_TRIPLET=x64-linux-rel  ..
-- Install prefix: /usr/local
CMake Deprecation Warning at cmake/utils.cmake:3 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  CMakeLists.txt:10 (include)

-- Found filesystem: filesystem
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /usr/lib/libffi.so  
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /usr/lib/libtinfo.so  
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.13")  
-- Found zstd: /usr/lib/libzstd.so  
-- Found LibXml2: /usr/lib/libxml2.so (found version "2.11.4") 
-- Found Python: /usr/bin/python3.11 (found suitable version "3.11.3", minimum required is "3.8") found components: Interpreter Development Development.Module Development.Embed 
/usr/bin/python3.11: No module named nanobind
CMake Error at bindings/python/CMakeLists.txt:5 (execute_process):
  execute_process failed command indexes:

    1: "Child return code: 1"

-- Configuring incomplete, errors occurred!

for which I do

07:29:02 alex@Ninsar build ±|master|→ pip3 install --break-system-packages nanobind

After that running make install gives:

07:29:42 alex@Ninsar build ±|master|→ make install
[  0%] Building CXX object CMakeFiles/pasta_util.dir/lib/Util/ArgumentVector.cpp.o
[  0%] Building CXX object CMakeFiles/pasta_util.dir/lib/Util/Error.cpp.o
[  0%] Building CXX object CMakeFiles/pasta_util.dir/lib/Util/File.cpp.o
In file included from /home/alex/repos/pasta/lib/Util/File.cpp:8:
/home/alex/repos/pasta/include/pasta/AST/Forward.h:11:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   11 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/include/pasta/AST/Forward.h:11:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/include/pasta/AST/Forward.h:13:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   13 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alex/repos/pasta/lib/Util/File.cpp:20:
/home/alex/repos/pasta/lib/Util/FileManager.h:16:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   16 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/Util/FileManager.h:16:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/Util/FileManager.h:18:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   18 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
[  0%] Building CXX object CMakeFiles/pasta_util.dir/lib/Util/FileManager.cpp.o
In file included from /home/alex/repos/pasta/lib/Util/FileManager.cpp:5:
/home/alex/repos/pasta/lib/Util/FileManager.h:16:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   16 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/Util/FileManager.h:16:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/Util/FileManager.h:18:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   18 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
[  1%] Building CXX object CMakeFiles/pasta_util.dir/lib/Util/FileSystem.cpp.o
[  1%] Building CXX object CMakeFiles/pasta_util.dir/lib/Util/Init.cpp.o
[  1%] Linking CXX static library libpasta_util.a
[  1%] Built target pasta_util
[  1%] Building CXX object CMakeFiles/pasta_compiler.dir/lib/AST/AlignTokens.cpp.o
In file included from /home/alex/repos/pasta/include/pasta/AST/Decl.h:15,
                 from /home/alex/repos/pasta/include/pasta/AST/AST.h:12,
                 from /home/alex/repos/pasta/lib/AST/AST.h:7,
                 from /home/alex/repos/pasta/lib/AST/AlignTokens.cpp:5:
/home/alex/repos/pasta/include/pasta/AST/Forward.h:11:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   11 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/include/pasta/AST/Forward.h:11:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/include/pasta/AST/Forward.h:13:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   13 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alex/repos/pasta/lib/AST/AST.h:29:
/home/alex/repos/pasta/lib/AST/Macro.h:16:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   16 | #pragma GCC diagnostic ignored "-Wbitfield-enum-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Macro.h:16:32: note: did you mean ‘-Wno-enum-conversion’?
/home/alex/repos/pasta/lib/AST/Macro.h:17:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   17 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Macro.h:17:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/AST/Macro.h:19:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   19 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alex/repos/pasta/lib/AST/Macro.h:23:
/home/alex/repos/pasta/lib/AST/Token.h:14:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   14 | #pragma GCC diagnostic ignored "-Wbitfield-enum-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Token.h:14:32: note: did you mean ‘-Wno-enum-conversion’?
/home/alex/repos/pasta/lib/AST/Token.h:15:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   15 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Token.h:15:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/AST/Token.h:17:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   17 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alex/repos/pasta/lib/AST/AlignTokens.cpp:27:
/home/alex/repos/pasta/lib/AST/Printer/DeclStmtPrinter.h:15:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   15 | #pragma GCC diagnostic ignored "-Wdeprecated-anon-enum-enum-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Printer/DeclStmtPrinter.h:15:32: note: did you mean ‘-Wdeprecated-enum-enum-conversion’?
/home/alex/repos/pasta/lib/AST/Printer/DeclStmtPrinter.h:16:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   16 | #pragma GCC diagnostic ignored "-Wbitfield-enum-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Printer/DeclStmtPrinter.h:16:32: note: did you mean ‘-Wno-enum-conversion’?
/home/alex/repos/pasta/lib/AST/Printer/DeclStmtPrinter.h:17:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   17 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Printer/DeclStmtPrinter.h:17:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/AST/Printer/DeclStmtPrinter.h:19:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   19 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alex/repos/pasta/lib/AST/Printer/DeclStmtPrinter.h:77:
/home/alex/repos/pasta/lib/AST/Printer/Printer.h:8:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
    8 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Printer/Printer.h:8:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/AST/Printer/Printer.h:10:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   10 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/AlignTokens.cpp: In member function ‘pasta::{anonymous}::SequenceRegion* pasta::{anonymous}::Matcher::BuildRegions(std::vector<std::unique_ptr<pasta::{anonymous}::Region> >&, std::stringstream&, uint8_t*, uint8_t*, size_t, const char*)’:
/home/alex/repos/pasta/lib/AST/AlignTokens.cpp:819:9: warning: attributes at the beginning of statement are ignored [-Wattributes]
  819 |         [[clang::fallthrough]];
      |         ^~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Token.h: In member function ‘bool pasta::TokenImpl::IsParsed() const’:
/home/alex/repos/pasta/lib/AST/Token.h:200:3: warning: control reaches end of non-void function [-Wreturn-type]
  200 |   }
      |   ^
[  1%] Building CXX object CMakeFiles/pasta_compiler.dir/lib/AST/AST.cpp.o
In file included from /home/alex/repos/pasta/include/pasta/AST/Decl.h:15,
                 from /home/alex/repos/pasta/include/pasta/AST/AST.h:12,
                 from /home/alex/repos/pasta/lib/AST/AST.h:7,
                 from /home/alex/repos/pasta/lib/AST/AST.cpp:5:
/home/alex/repos/pasta/include/pasta/AST/Forward.h:11:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   11 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/include/pasta/AST/Forward.h:11:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/include/pasta/AST/Forward.h:13:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   13 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alex/repos/pasta/lib/AST/AST.h:29:
/home/alex/repos/pasta/lib/AST/Macro.h:16:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   16 | #pragma GCC diagnostic ignored "-Wbitfield-enum-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Macro.h:16:32: note: did you mean ‘-Wno-enum-conversion’?
/home/alex/repos/pasta/lib/AST/Macro.h:17:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   17 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Macro.h:17:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/AST/Macro.h:19:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   19 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alex/repos/pasta/lib/AST/Macro.h:23:
/home/alex/repos/pasta/lib/AST/Token.h:14:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   14 | #pragma GCC diagnostic ignored "-Wbitfield-enum-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Token.h:14:32: note: did you mean ‘-Wno-enum-conversion’?
/home/alex/repos/pasta/lib/AST/Token.h:15:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   15 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Token.h:15:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/AST/Token.h:17:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   17 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
[  1%] Building CXX object CMakeFiles/pasta_compiler.dir/lib/AST/Attr.cpp.o
In file included from /home/alex/repos/pasta/include/pasta/AST/AttrManual.h:10,
                 from /home/alex/repos/pasta/include/pasta/AST/Attr.h:14,
                 from /home/alex/repos/pasta/lib/AST/Attr.cpp:18:
/home/alex/repos/pasta/include/pasta/AST/Forward.h:11:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   11 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/include/pasta/AST/Forward.h:11:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/include/pasta/AST/Forward.h:13:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   13 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alex/repos/pasta/lib/AST/AST.h:29,
                 from /home/alex/repos/pasta/lib/AST/Attr.cpp:20:
/home/alex/repos/pasta/lib/AST/Macro.h:16:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   16 | #pragma GCC diagnostic ignored "-Wbitfield-enum-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Macro.h:16:32: note: did you mean ‘-Wno-enum-conversion’?
/home/alex/repos/pasta/lib/AST/Macro.h:17:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   17 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Macro.h:17:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/AST/Macro.h:19:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   19 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alex/repos/pasta/lib/AST/Macro.h:23:
/home/alex/repos/pasta/lib/AST/Token.h:14:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   14 | #pragma GCC diagnostic ignored "-Wbitfield-enum-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Token.h:14:32: note: did you mean ‘-Wno-enum-conversion’?
/home/alex/repos/pasta/lib/AST/Token.h:15:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   15 | #pragma GCC diagnostic ignored "-Wimplicit-int-conversion"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Token.h:15:32: note: did you mean ‘-Wno-int-conversion’?
/home/alex/repos/pasta/lib/AST/Token.h:17:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   17 | #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
      |                                ^~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Attr.cpp: In function ‘pasta::AttrKind pasta::{anonymous}::KindOfAttr(const clang::Attr*)’:
/home/alex/repos/pasta/include/pasta/AST/Forward.h:1372:7: error: ‘HLSLGroupSharedAddressSpace’ is not a member of ‘clang::attr::Kind’
 1372 |     m(HLSLGroupSharedAddressSpace) \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Attr.cpp:60:29: note: in definition of macro ‘PASTA_ATTR_CASE’
   60 |     case clang::attr::Kind::a: \
      |                             ^
/home/alex/repos/pasta/lib/AST/Attr.cpp:63:5: note: in expansion of macro ‘PASTA_FOR_EACH_ATTR_IMPL’
   63 |     PASTA_FOR_EACH_ATTR_IMPL(PASTA_ATTR_CASE, PASTA_IGNORE_ABSTRACT)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/include/pasta/AST/Forward.h:1374:7: error: ‘HLSLResource’ is not a member of ‘clang::attr::Kind’
 1374 |     m(HLSLResource) \
      |       ^~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Attr.cpp:60:29: note: in definition of macro ‘PASTA_ATTR_CASE’
   60 |     case clang::attr::Kind::a: \
      |                             ^
/home/alex/repos/pasta/lib/AST/Attr.cpp:63:5: note: in expansion of macro ‘PASTA_FOR_EACH_ATTR_IMPL’
   63 |     PASTA_FOR_EACH_ATTR_IMPL(PASTA_ATTR_CASE, PASTA_IGNORE_ABSTRACT)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/include/pasta/AST/Forward.h:1375:7: error: ‘HLSLResourceBinding’ is not a member of ‘clang::attr::Kind’
 1375 |     m(HLSLResourceBinding) \
      |       ^~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Attr.cpp:60:29: note: in definition of macro ‘PASTA_ATTR_CASE’
   60 |     case clang::attr::Kind::a: \
      |                             ^
/home/alex/repos/pasta/lib/AST/Attr.cpp:63:5: note: in expansion of macro ‘PASTA_FOR_EACH_ATTR_IMPL’
   63 |     PASTA_FOR_EACH_ATTR_IMPL(PASTA_ATTR_CASE, PASTA_IGNORE_ABSTRACT)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/include/pasta/AST/Forward.h:1376:7: error: ‘HLSLSV_DispatchThreadID’ is not a member of ‘clang::attr::Kind’
 1376 |     m(HLSLSV_DispatchThreadID) \
      |       ^~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Attr.cpp:60:29: note: in definition of macro ‘PASTA_ATTR_CASE’
   60 |     case clang::attr::Kind::a: \
      |                             ^
/home/alex/repos/pasta/lib/AST/Attr.cpp:63:5: note: in expansion of macro ‘PASTA_FOR_EACH_ATTR_IMPL’
   63 |     PASTA_FOR_EACH_ATTR_IMPL(PASTA_ATTR_CASE, PASTA_IGNORE_ABSTRACT)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/include/pasta/AST/Forward.h:1410:7: error: ‘MaybeUndef’ is not a member of ‘clang::attr::Kind’
 1410 |     m(MaybeUndef) \
      |       ^~~~~~~~~~
/home/alex/repos/pasta/lib/AST/Attr.cpp:60:29: note: in definition of macro ‘PASTA_ATTR_CASE’
   60 |     case clang::attr::Kind::a: \
      |                             ^
/home/alex/repos/pasta/lib/AST/Attr.cpp:63:5: note: in expansion of macro ‘PASTA_FOR_EACH_ATTR_IMPL’
   63 |     PASTA_FOR_EACH_ATTR_IMPL(PASTA_ATTR_CASE, PASTA_IGNORE_ABSTRACT)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/repos/pasta/include/pasta/AST/Forward.h:1450:7: error: ‘NoUwtable’ is not a member of ‘clang::attr::Kind’
 1450 |     m(NoUwtable) \
      |       ^~~~~~~~~
/home/alex/repos/pasta/lib/AST/Attr.cpp:60:29: note: in definition of macro ‘PASTA_ATTR_CASE’
   60 |     case clang::attr::Kind::a: \
      |                             ^
/home/alex/repos/pasta/lib/AST/Attr.cpp:63:5: note: in expansion of macro ‘PASTA_FOR_EACH_ATTR_IMPL’
   63 |     PASTA_FOR_EACH_ATTR_IMPL(PASTA_ATTR_CASE, PASTA_IGNORE_ABSTRACT)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~

Plus a whole lot more pages of errors.

I am not intending this to be mean, but currently this isn't able to work for me, and I would be super nice if it did since it seems like a very useful library that would solve a big problem for me.

pgoodman commented 1 year ago

@abenedic Make sure to use the vcpkg from cxx-common, using llvm-16. PASTA relies on custom patches to Clang in order to collect more precise information, especially about macros. Some of the errors are related to not using LLVM 16. Some warnings are in auto-generated code, and some are in (modified) code copied from Clang (decl/stmt/type printers). Generally for the latter we don't try to fix them.

I would recommend consulting the CI process for how to build PASTA.