[N/A] The binary I am trying to run has been compiled statically for either RV64 or AArch64.
[N/A] The compiled binary is a Linux Elf file.
[N/A] I have provided both a config file and a binary to SimEng as runtime arguments.
Binary File Information
Please run file on the binary used and paste the output below (i.e. file myBinary.elf).
N/A
System Description
Please provide the following as a list:
The Operating System of the system you are running SimEng on
Ubuntu 22.04
The compiler used to compile SimEng and its version
gcc 11.4.0 + clang-14.0.5
The compiler used to compile the static binary and its version
N/A
The ISA or specific processor that the binary was compiled for
For example, if -march=armv8.4-a+sve was used, then present armv8.4-a+sve
If -mcpu=neoverse-v1 or similar was used, then present neoverse-v1N/A
The processor of the system you are running SimEng on
N/A
The main memory capacity of the system you are running SimEng on
64 GB
SimEng Version
Provide the SimEng repository branch, commit hash, and version tag (if relevant) that the issue is present on.
Any, but specifically tested on dev
SimEng CMAKE Options Used
Provide a bullet list of all CMAKE options used. E.g. -DCMAKE_BUILD_TYPE=Release.
-B build
-S .
_-DCMAKE_BUILDTYPE=Release
_-DCMAKE_INSTALLPREFIX=$HOME/SimEng/build/
_-DSIMENG_ENABLETESTS=ON
_-DSIMENG_USE_EXTERNALLLVM=ON
_-DLLVMDIR=$HOME/clang-14.0.5/lib/cmake/llvm/
-GNinja
Binary Compilation Instructions
Provide a bullet list of how the binary in question was compiled, including all compiler flags used.
N/A
SimEng Command Line Expression
Provide the command line expression used to run SimEng e.g. ./simeng /path/to/configs/a64fx.yaml /path/to/myBinary.elfN/A
SimEng Metadata Output
If your simulation begins to execute the binary, please provide the metadata that SimEng prints at the start of execution.
N/A
Problem DescriptionSimeng fails to build with tests enabled when using an external clang/llvm build that has been built with unit tests enabled (the default build option). It errors with the following:
CMake Error at build/_deps/googletest-src/googletest/cmake/internal_utils.cmake:152 (add_library):
add_library cannot create target "gtest" because an imported target with
the same name already exists.
This appears to be because LLVM builds its unit tests with googletests as well, and if a version doesn't yet exist on the system (or isn't specified), then it installs version release-1.11.0, the same used in SimEng. This release version was found in llvm-project/third-party/benchmark/cmake/GoogleTest.cmake.in.
I expect a fix would be in SimEng's CMakeLists.txt to search for an existing gtest install, and if a compatible one is found to instead use this rather than attempting to still install.
In the meantime, users (and myself) can fix this by one of the following options:
1) _Recompiling clang/llvm with the flag -DLLVM_INCLUDE_TESTS=OFF to disable unit tests (and therefore not installing gtest),_
2) Building SimEng without using an external LLVM,
3) Building SimEng with tests disabled.
Any of these three options should suffice for the short term.
Check List
Binary File Information Please run
file
on the binary used and paste the output below (i.e.file myBinary.elf
). N/ASystem Description Please provide the following as a list:
-march=armv8.4-a+sve
was used, then presentarmv8.4-a+sve
-mcpu=neoverse-v1
or similar was used, then presentneoverse-v1
N/ASimEng Version Provide the SimEng repository branch, commit hash, and version tag (if relevant) that the issue is present on. Any, but specifically tested on
dev
SimEng CMAKE Options Used Provide a bullet list of all CMAKE options used. E.g.
-DCMAKE_BUILD_TYPE=Release
.Binary Compilation Instructions Provide a bullet list of how the binary in question was compiled, including all compiler flags used. N/A
SimEng Command Line Expression Provide the command line expression used to run SimEng e.g.
./simeng /path/to/configs/a64fx.yaml /path/to/myBinary.elf
N/ASimEng Metadata Output If your simulation begins to execute the binary, please provide the metadata that SimEng prints at the start of execution. N/A
Problem Description Simeng fails to build with tests enabled when using an external clang/llvm build that has been built with unit tests enabled (the default build option). It errors with the following:
This appears to be because LLVM builds its unit tests with googletests as well, and if a version doesn't yet exist on the system (or isn't specified), then it installs version
release-1.11.0
, the same used in SimEng. This release version was found inllvm-project/third-party/benchmark/cmake/GoogleTest.cmake.in
.I expect a fix would be in SimEng's
CMakeLists.txt
to search for an existing gtest install, and if a compatible one is found to instead use this rather than attempting to still install.In the meantime, users (and myself) can fix this by one of the following options: 1) _Recompiling clang/llvm with the flag
-DLLVM_INCLUDE_TESTS=OFF
to disable unit tests (and therefore not installing gtest),_ 2) Building SimEng without using an external LLVM, 3) Building SimEng with tests disabled.Any of these three options should suffice for the short term.