intel / systemc-compiler

This tool translates synthesizable SystemC code to synthesizable SystemVerilog.
Other
244 stars 35 forks source link

sys::CleanupOnSignal error #58

Closed drom closed 1 month ago

drom commented 1 year ago

Getting this error:

[  3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o
In file included from /home/drom/work/github/intel/systemc-compiler/build_deps/llvm-12.0.1.src/lib/Support/Signals.cpp:14:
/home/drom/work/github/intel/systemc-compiler/build_deps/llvm-12.0.1.src/include/llvm/Support/Signals.h:119:8: error: variable or field ‘CleanupOnSignal’ declared void
  119 |   void CleanupOnSignal(uintptr_t Context);
      |        ^~~~~~~~~~~~~~~
/home/drom/work/github/intel/systemc-compiler/build_deps/llvm-12.0.1.src/include/llvm/Support/Signals.h:119:24: error: ‘uintptr_t’ was not declared in this scope
  119 |   void CleanupOnSignal(uintptr_t Context);
      |                        ^~~~~~~~~
In file included from /home/drom/work/github/intel/systemc-compiler/build_deps/llvm-12.0.1.src/lib/Support/Signals.cpp:225:
/home/drom/work/github/intel/systemc-compiler/build_deps/llvm-12.0.1.src/lib/Support/Unix/Signals.inc:348:44: error: ‘void llvm::sys::CleanupOnSignal(uintptr_t)’ should have been declared inside ‘llvm::sys’
  348 | void sys::CleanupOnSignal(uintptr_t Context) {
      |                                            ^
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1882: lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:9937: lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
mikhailmoiseev commented 1 year ago

Looks like the problem in LLVM installation. Probably it is because of old g++ or std library.

install.sh has been checked for Ubuntu 20/22 and SLES 12 only. For other Linux it needs to install Clang/LLVM, Protobuf and ICSC manually, how it is described at https://github.com/intel/systemc-compiler/wiki/Getting-started#manual-installation

drom commented 1 year ago

Is it new enough?

drom@x5:~/work/github/sifive/sc-rocket-surge> g++ --version
g++ (SUSE Linux) 13.1.1 20230720 [revision 9aac37ab8a7b919a89c6d64bc7107a8436996e93]
Copyright (C) 2023 Free Software Foundation, Inc.
drom commented 1 year ago

How do I check std library version?

mikhailmoiseev commented 1 year ago

I would add path to C++ std library to $PATH, for Ubuntu 22.04 it is /usr/lib/gcc/x86_64-linux-gnu/11/include. Next step, I would try to use another gcc version.

Are you able to install Clang/LLVM without the install.sh?

mikhailmoiseev commented 8 months ago

CLang/LLVM updated to 15.0.7. Please try it.