tests,systemc: Fix nightly systemc test

This fixes these nightly failing tests:
https://jenkins.gem5.org/job/nightly/609/

Due to this commit:
https://gem5-review.googlesource.com/c/public/gem5/+/68758
The source files are not copied to the "build" directory by default.
This caused the systemc tests to fail as the
"util/systemc/gem5_within_systemc/Makefile" depends on generated source
files in the "build" directory.

This patch adds the "--duplicate-sources" flag to the building of the
ARM binaries necessisary for running systemc. The README has been
updated to reflect this.

Change-Id: I3006005e43276097be98f7d4685f3d98c180d3f9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/70860
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Bobby R. Bruce
2023-05-22 13:59:24 -07:00
committed by Bobby Bruce
parent 9c0f337d78
commit 4198d027ac
2 changed files with 12 additions and 6 deletions

View File

@@ -173,9 +173,11 @@ build_and_run_systemc () {
docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
"${gem5_root}" --memory="${docker_mem_limit}" --rm \
gcr.io/gem5-test/ubuntu-22.04_min-dependencies:${tag} bash -c "\
scons -j${compile_threads} --ignore-style build/ARM/gem5.opt && \
scons --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=0 \
-j${compile_threads} build/ARM/libgem5_opt.so \
scons -j${compile_threads} --ignore-style --duplicate-sources \
build/ARM/gem5.opt && \
scons --with-cxx-config --without-python --without-tcmalloc \
--duplicate-sources USE_SYSTEMC=0 \
-j${compile_threads} build/ARM/libgem5_opt.so \
"
docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \

View File

@@ -28,17 +28,21 @@ To build:
First build gem5 as a library with cxx-config support and (optionally)
without python. When building the library, disable gem5's native SystemC
API support, as that will conflict with the external version. Also build a
normal gem5 (cxx-config not needed, Python needed):
normal gem5 (cxx-config not needed, Python needed)
Note: The `--duplicate-source` option is also needed as
"util/systemc/gem5_within_systemc" depends on generated source files to be
present in the "build" directory.
> cd ../../..
> scons build/ARM/gem5.opt
> scons --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=0 \
> build/ARM/libgem5_opt.so
> --duplicate-source build/ARM/libgem5_opt.so
> cd util/systemc
Note: For MAC / OSX this command should be used:
> scons --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=0 \
> build/ARM/libgem5_opt.dylib
> --duplicate-sources build/ARM/libgem5_opt.dylib
Set a proper LD_LIBRARY_PATH e.g. for bash:
> export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/gem5/build/ARM/"