Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
install_actflow [2024/07/11 11:04]
rajit
install_actflow [2024/10/14 06:37] (current)
rajit [Linux/Unix-like environments]
Line 17: Line 17:
       * For ''apt-get'', it is ''libeditline-dev'' or ''libedit-dev''       * For ''apt-get'', it is ''libeditline-dev'' or ''libedit-dev''
       * Some systems have both packages. In that case please use ''libedit'', not ''libeditline''.       * Some systems have both packages. In that case please use ''libedit'', not ''libeditline''.
-   * The system should have ''zlib'' installed +   * The system must have ''zlib'' installed 
-   * The system should have the macro pre-processing package ''m4'' installed +   * The system must have the macro pre-processing package ''m4'' installed 
-   * The system should have a modern C++ compiler (at least C++-17) +   * The system must have a modern C++ compiler (at least C++-17) 
-   * The system should have ''cmake'' (at least version 3.16) +   * The system must have ''cmake'' (at least version 3.16) 
-   * The system should have the Boost libraries (at least version 1.71.0) +   * The system must have the Boost libraries (at least version 1.71.0) 
-   * The system should have ''libfmt'' (at least version 4.0)+   * The system must have ''libfmt'' (at least version 4.0)
  
-**MacOS:** These packages can be installed using the [[https://brew.sh/|homebrew]] package manager. Note that on recent versions of MacOS, the C++ compiler provided by Apple does not accept the "-fopenmpflag for OpenMP compilation, so you will likely need to install g++ using homebrew as well.+**MacOS:** These packages can be installed using the [[https://brew.sh/|homebrew]] package manager. Note that on recent versions of MacOS, the C++ compiler provided by Apple does not accept the ''-fopenmp'' flag for OpenMP compilation, so you will likely need to install g++ using homebrew as well.
  
 ==== Build instructions ==== ==== Build instructions ====
Line 45: Line 45:
  
  
-==== Troubleshooting ====+ 
 +===== Microsoft Windows ===== 
 + 
 +Recent versions of Windows include compatibility layers for Unix, and ACT has been successfully tested in such an environment. 
 + 
 +[[windows_build|Some instructions for running ACT tools on Microsoft Windows]] 
 + 
 + 
 + 
 +===== Troubleshooting =====
  
 If you have trouble building on your specific operating system have a peek in the continuous integration scripts of the git repository if your operating system is covered there and you can try the commands specified: If you have trouble building on your specific operating system have a peek in the continuous integration scripts of the git repository if your operating system is covered there and you can try the commands specified:
Line 51: Line 60:
 https://github.com/asyncvlsi/actflow/blob/main/.circleci/config.yml https://github.com/asyncvlsi/actflow/blob/main/.circleci/config.yml
  
-for ''Debian'', ''Ubuntu'' look at the ubuntu section+for ''Debian'', ''Ubuntu'' look at the ubuntu section. Here's the script used by the continuous integration build on Ubuntu to build and install the tools in ''/usr/local/cad'', and run the test cases: 
 +<code> 
 +$ apt-get -q update -y 
 +$ apt-get -q install -y libedit-dev zlib1g-dev m4 build-essential cmake libfmt-dev git libboost-all-dev libopenmpi-dev llvm flex bison 
 +$ git clone https://github.com/asyncvlsi/actflow 
 +$ cd actflow 
 +$ git submodule update --init --recursive 
 +$ mkdir /usr/local/cad 
 +$ export ACT_HOME=/usr/local/cad 
 +$ ./build && ./run.sh 
 +</code>
  
-for ''Alpine'' look at the alpine section+Replace ''/usr/local/cad'' on the lines where it is used with your actual installation directory. 
  
-**MacOS:** Recent versions of MacOS have a C++ compiler issue, namely that the default compiler distributed by Apple does not support the "-fopenmp" flag. To fix this issue, we normally install either ''llvm'' or ''g++'' using homebrew. This normally results in the compiler being installed in a path that looks something like ''/opt/homebrew/Cellar/llvm/<version>/bin/clang++" or "/opt/homebrew/Cellar/gcc/<version>/bin/g++-<version>''. Set the environment variable "CXX" to the absolute path name of this C++ compiler before running "./build".+For Alpine Linux look at the alpine section in the yml file.
  
-===== Microsoft Windows =====+**MacOS:** Recent versions of MacOS have a C++ compiler issue, namely that the default compiler distributed by Apple does not support the "-fopenmp" flag. To fix this issue, we normally install either ''llvm'' or ''g++'' using homebrew. This normally results in the compiler being installed in a path that looks something like ''/opt/homebrew/Cellar/llvm/<version>/bin/clang++'' or ''/opt/homebrew/Cellar/gcc/<version>/bin/g++-<version>''. Set the environment variable ''CXX'' to the absolute path name of this C++ compiler before running "./build".
  
-Recent versions of Windows include compatibility layers for Unix, and ACT has been successfully tested in such an environment.+=== OpenMP message ===
  
-[[windows_build|Some instructions for running ACT tools on Microsoft Windows]]+You may see the following message: 
 +<code> 
 +Could not find a C++ compiler that supports -fopenmp 
 +Please set environment variable CXX to a C++ compiler that does. 
 +Note: modern LLVM and GNU compilers support this option; if you 
 +are on a Mac, installing LLVM using homebrew (brew install llvm) 
 +and setting CXX to be the path to the resulting clang++ should work. 
 +</code> 
 + 
 +This means that the build script could not find a C++ compiler that could successfully compile the following program: 
 +<code> 
 +#include <omp.h> 
 + 
 +int main (void) 
 +
 +  return 0; 
 +
 +</code> 
 +A modern install of g++ or clang++ can compile this program when given the ''-fopenmp'' option. 
 + 
 +=== Filesystem message === 
 + 
 +You may see the following message: 
 + 
 +<code> 
 +C++ compiler does not directly support std::filesystem. 
 +Please set environment variable CXX to a C++ compiler that does. 
 +</code> 
 + 
 +This means that your C++ compiler could not compile and link the following program:
  
 +<code>
 +#include <filesystem>
  
-===== Synopsys linkages =====+int main (void) 
 +
 +  std::filesystem::path tst {".."}; 
 +  return 0; 
 +
 +</code>
  
-Some of the library functionality can be linked into Synopsys ''vcs'' for co-simulation support. This requires some Synopsys header files (obviously not included in the ACT distribution).+Tie build script tries to compile this with and without the ''-lstdc++fs'' option (needed for some older C++ compilers, but no longer needed in a modern compiler). This message means both options did not succeed using the compiler that supported the ''-fopenmp'' flag.