Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
install_actflow [2024/08/31 11:55] – [Troubleshooting] rajitinstall_actflow [2026/07/22 15:09] (current) – [Linux/Unix-like environments] rajit
Line 2: Line 2:
  
 Primary development of the tools in the actflow repository is conducted on Linux and MacOS, and so it has been extensively tested on such systems. It has also been tested in certain [[install#Microsoft Windows|Windows]] environments (see below). Primary development of the tools in the actflow repository is conducted on Linux and MacOS, and so it has been extensively tested on such systems. It has also been tested in certain [[install#Microsoft Windows|Windows]] environments (see below).
 +
 +If you are a Homebrew user, check out the [[https://github.com/asyncvlsi/homebrew-tap|homebrew tap]] for the tools.
 +
 +
 +===== Getting the source  =====
 +
  
 The repository is available from [[https://github.com/asyncvlsi/actflow|Github]]. Once you clone this repository, make sure you run  The repository is available from [[https://github.com/asyncvlsi/actflow|Github]]. Once you clone this repository, make sure you run 
Line 17: Line 23:
       * 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) 
 +   * The system must have ''libnuma'' 
 +   * The system must have ''bison''
  
 **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. **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.
  
 +**Archlinux:** One of the ACT users has contributed an Archlinux [[https://aur.archlinux.org/packages/actflow-git |package]]. 
 ==== Build instructions ==== ==== Build instructions ====
  
Line 42: Line 51:
  
  
-**actsim and Xyce:** The ACT simulator also supports mixed analog/digital simulation using "Xyce". To include this feature, follow the instructions above. After that, follow the instructions provided by the [[https://github.com/asyncvlsi/actsim|''actsim'']] repository to re-build and re-install ''actsim''.+**actsim and Xyce:** The ACT simulator also supports mixed analog/digital simulation using [[https://xyce.sandia.gov/|Xyce]]. To include this feature, follow the instructions above. After that, follow the instructions provided by the [[https://github.com/asyncvlsi/actsim|actsim]] repository to re-build and re-install ''actsim''.
  
 +**Building from source.**  Sometimes it is not possible to use package managers to install the required dependencies. In this case, the standard approach that we use is to install the missing dependencies by setting the install directory to ''$ACT_HOME''. GNU autotools support the ''--prefix=$ACT_HOME'' (two hyphens before ''prefix'') option to the generated ''configure'' script, and CMake supports ''-DCMAKE_INSTALL_PREFIX=$ACT_HOME''.
 +
 +=== Environment variables ===
 +
 +The following environment variables are used during the build process:
 +   * ''ACT_HOME'': see above; this is used as the installation directory for the tools and supporting files.
 +   * ''CXX'': used as the C++ compiler. Note that the build script checks if the C++ compiler supports various options that are used by different tools.
 +   * ''ACTFLOW_EXTRA_CFLAGS'': this passes in additional compiler flags (augments the standard ''CFLAGS'' environment variable).
 +   * ''BOOST_ROOT'': if your Boost installation is in a non-standard place (e.g. you had to install your own version because the system version was too old and can't be modified), this should point to the root of your installation directory for Boost.
  
  
Line 60: Line 78:
 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. 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:+==== Debian or Ubuntu Linux ==== 
 + 
 +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> <code>
 $ apt-get -q update -y $ apt-get -q update -y
Line 73: Line 93:
  
 Replace ''/usr/local/cad'' on the lines where it is used with your actual installation directory.  Replace ''/usr/local/cad'' on the lines where it is used with your actual installation directory. 
 +
 +==== Alpine Linux ====
  
 For Alpine Linux look at the alpine section in the yml file. For Alpine Linux look at the alpine section in the yml file.
  
-**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".+==== 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"
 + 
 +More recent versions of LLVM have problems with linking.  If you see messages like this: 
 +<code> 
 +Undefined symbols for architecture arm64: 
 +  "std::__1::__hash_memory(void const*, unsigned long)", referenced from: 
 +  ... 
 +</code> 
 +then chances are you have a known issue in recent LLVM versions on MacOS ([[https://github.com/llvm/llvm-project/issues/155606|github issue]]).  The workaround that fixes this at least for the actflow build (see the discussion for details, this may not necessarily be a proper fix) is to edit the ''.cfg'' file installed with LLVM to include 
 +the location of the LLVM C++ standard library. The [[https://github.com/llvm/llvm-project/issues/155606|github issue]] has details and various workarounds, and the root cause appears to be that while the LLVM compiler uses a specific algorithm to find include paths, it uses a different one to find libraries; so the system C++ standard library is being used instead of the LLVM-provided C++ standard library. Explicitly including the LLVM-provided library fixes this issue in the build. 
 + 
 +For example, on a recent MacOS/homebrew setup, this required editing ''.cfg'' files in ''/opt/homebrew/etc/clang/'', replacing the line ''-i sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk'' with  
 +''/opt/homebrew/opt/llvm/lib/c++/libc++.1.0.dylib -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk'' (see the github issue for details)
  
-=== OpenMP message ===+==== OpenMP message ====
  
 You may see the following message: You may see the following message:
Line 100: Line 136:
 A modern install of g++ or clang++ can compile this program when given the ''-fopenmp'' option. A modern install of g++ or clang++ can compile this program when given the ''-fopenmp'' option.
  
-=== Filesystem message ===+==== Filesystem message ====
  
 You may see the following message: You may see the following message: