Running application in gem5 full system mode - gem5

I tried to run the a program(binary file of hello-world c++ program) in gem5 after booting up the linux but in simulated terminal I get "/tmp/runscript': No such file or directory" error

Related

"IOError: Can't find a path to system files" for x86 full system on Mac

I'm trying to set up gem5 x86 full system on Mac OS Mojave (10.14)
First I did a git clone to get the gem5 sources, which are located at ~/gem5.
Then I ran scons build/x86/gem5.fast to build the whole thing. I had to change some of the -Werror flags to get it to compile, but it seems to work.
To test it, I ran build/x86/gem5.fast configs/example/se.py -c tests/test-progs/hello/bin/x86/linux/hello and got the following output:
gem5 Simulator System. http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.
gem5 compiled Jan 18 2020 15:28:50
gem5 started Jan 18 2020 17:48:35
gem5 executing on My-MacBook-Pro-208.local, pid 89984
command line: build/x86/gem5.fast configs/example/se.py -c tests/test-progs/hello/bin/x86/linux/hello
Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
0: system.remote_gdb: listening for remote gdb on port 7000
**** REAL SIMULATION ****
info: Entering event queue # 0. Starting simulation...
Hello world!
Exiting # tick 5941500 because exiting with last active thread context
I wanted to configure full system simulation, so I went to the "Full-System Stuff" section at http://gem5.org/Download and downloaded the Full System Files. I extracted the tar into ~/gem5/x86-system.
So now there's ~/gem5/x86-system/binaries which contains x86_64-vmlinux-2.6.22.9 and ~/gem5/x86-system/disks which contains linux-x86.img
In ~/.bash_profile I added export M5_PATH="/Users/me/gem5/x86-system".
However, when I run scons build/x86/tests/fast/quick, almost all of the tests fail. A lot of them have a failure like this:
...
File "/Users/me/gem5/configs/common/SysPaths.py", line 62, in __call__
raise IOError("Can't find a path to system files.")
IOError: Can't find a path to system files.
I also tried to run build/x86/gem5.fast configs/example/fs.py but I get the following error:
...
File "/Users/me/gem5/configs/common/SysPaths.py", line 71, in __call__
raise IOError("Can't find file '%s' on path." % filename)
IOError: Can't find file 'x86root.img' on path.
I'm not sure what part of configuration I'm missing. The docs and google searches aren't giving any working solutions...

Chromium single executable build

I've been following the documentation here to build Chromium on Ubuntu 18.
I've been able to successfully build using these flags gn gen out/amd64 --args='is_official_build=true is_debug=false'
and this command to build
autoninja -C out/amd64 chrome
The problem is that the outputting chrome file has dependencies on all the other files in the directory. When I copy the chrome file to another directory and execute it, I get this error
[0608/170138.585281:ERROR:icu_util.cc(165)] Invalid file descriptor to ICU data received.
Trace/breakpoint trap (core dumped)
How do I go about building Chromium so I can execute it from a single file like how Puppeteer is a single executable?

How to debug the openjdk9 by netbeans8.2 in win10?

When I tried to debug the openjdk9 by netbeans8.2 in win10, I got the following error:
"\"D:/jdk9/jdk9/build/windows-x86_64-normal-server-fastdebug/jdk/bin/java.exe\":
not in executable format: File format not recognized"
How can I fix it?
I build the source code by command "./configure -with-freetype=/cygdrive/c/freetype -enable-debug -with-target-bits=64", then run make all, I also tried slowdebug, however, that also failed.
If I "run" the project instead of "debug", it runs successfully like below, so there is no issue for the file windows-x86_64-normal-server-fastdebug/jdk/bin/java.exe, it seems the gdb doesn't recognize the java.exe file.
Also I opened the openjdk source code from the location D:/jdk9/jdk/common/nb_native by netbeans, see below:
And tried to build it by netbeans, however, it produces the following error:
cd 'D:\jdk9\jdk\common'
sh ../configure --with-freetype=/cygdrive/c/freetype --with-debug-level=slowdebug --with-target-bits=64
/cygdrive/d/jdk9/jdk/configure: /cygdrive/d/jdk9/jdk/common/autoconf/configure: No such file or directory
PRE-BUILD FAILED (exit value 1, total time: 743ms)
I know that both paths /cygdrive/d/jdk9/jdk/configure and /cygdrive/d/jdk9/jdk/common/autoconf/configure exist.
This is how I configured the pre-built commands:
If you build the openjdk -with-target-bits = 64, then make sure that you installed a 64-bit gdb, or build the openjdk in 32-bit mode.
Your steps to import the nbproject looks correct.
Change Build => Pre-Build properties:
Set "Working Directory" to ../..
Set "Command Line" to sh ./configure ...

Installing Tensorflow GPU/CUDA dependencies on a machine with no internet access

I have 2 machines -
dccten1a with no internet access where I need to install Tensorflow with GPU support
dccten1b with internet access so that I can download packages and transfer to dccten1a
In the final step of installing Tensorflow, when running the bazel build command to produce a whl file, I get an error which says that it can't find a file in a folder it is looking in, and also cannot download, obviously, as 1a doesn't have internet access.
bazel build --config=opt --config=cuda /home/tensorflow/Documents/tf_dependencies/tensorflow-master/tensorflow/tools/pip_package:build_pip_package --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0"
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '#io_bazel_rules_closure//closure': Error downloading [http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz, https://github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz] to /home/xyzuser/.cache/bazel/_bazel_xyzuser/cb1e63cb5e61cab49a9fd2f5ba92d003/external/io_bazel_rules_closure/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz: All mirrors are down: [Unknown host: github.com, Unknown host: mirror.bazel.build]
I checked in the system, and there is no such directory as shown in the error message (i.e., /home/xyzuser/.cache/bazel/_bazel_xyzuser/cb1e63cb5e61cab49a9fd2f5ba92d003/external/io_bazel_rules_closure/). So, I created it, searched and found the requisite (?) file online, downloaded the file in the machine with internet, transferred it to the target machine, moved the file to the just created directory, and tried running the command again:
(tensorflow#dccten1a):
mkdir -p /home/tensorflow/.cache/bazel/_bazel_tensorflow/cb1e63cb5e61cab49a9fd2f5ba92d003/external/io_bazel_rules_closure
(tensorflow#dccten1b):
http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz
sudo scp -r /home/tensorflow/Downloads/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz tensorflow#160.88.114.17:/home/tensorflow/Documents/tf_dependencies
(tensorflow#dccten1a):
mv /home/tensorflow/Documents/tf_dependencies/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz /home/tensorflow/.cache/bazel/_bazel_tensorflow/cb1e63cb5e61cab49a9fd2f5ba92d003/external/io_bazel_rules_closure
Then I run the bazel build command again, but the same error persists.
Use --experimental_repository_cache to download the dependencies on the machine with internet access, transfer the cache to the machine without internet access, and use --experimental_repository_cache to refer to the same cache.
e.g.
1) On the machine with internet access, run
tensorflow#dccten1b $ bazel build --experimental_repository_cache=/path/to/some/folder --config=opt --config=cuda /home/tensorflow/Documents/tf_dependencies/tensorflow-master/tensorflow/tools/pip_package:build_pip_package --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0""
2) Copy the cache at /path/to/some/folder to the machine without internet access using a SD card or flash drive.
3) On the machine without internet access, run the same command again and setting the flag to the cache's location.
tensorflow#dccten1a $ bazel build --experimental_repository_cache=/path/to/some/folder --config=opt --config=cuda /home/tensorflow/Documents/tf_dependencies/tensorflow-master/tensorflow/tools/pip_package:build_pip_package --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0""

""Java"" is not recognized as an internal or external command, program or batch file. in Kotlin

I'm starting with kotlin on windows, I'm following the steps of
Working with the Command Line Compiler
And I get the following error after trying to compile(and add the bin directory in the path of my system):
Comand compile:
$ kotlinc hello.kt -include-runtime -d hello.jar
Error:
""Java"" is not recognized as an internal or external command, program or batch file
in my windows CMD.
I need to have java installed on my pc. To start with kotlin?
Install Java 8 JDK (not JRE) on your development machine as it is a prerequisite for running the Kotlin compiler, and also for any Java or Kotlin application. You can use either the Oracle JDK for most platforms or OpenJDK for Linux platforms.