Running gdb on xv6-riscv-fall19 - linux

So I follow the commands on the website.
I open one windows and I used the command: sudo make qemu-gdb. And it asked me to use another terminal to start gdb.
When I used the gdb provided by the Linux system. It shows this error message:
.gdbinit:2: Error in sourced command file:
Undefined item: "riscv:rv64".
What should I do to fix the issue?

You need to use riscv64-unknown-elf-gdb instead of gdb. It would be installed in your system when you install riscv-gnu-toolchain specified in xv6 site.

use /usr/bin/gdb-multiarch instead

riscv64-unknown-elf-gdb didn't come with the riscv-gnu-toolchain for me.
Using gdb-multiarch in ubuntu 18 works for me.

Your gdb version should be 8.3 and later

Replace all gdb with riscv64-unknown-elf-gdb when you are following the textbook and you should be good to go.
You can also run
riscv64-unknown-elf-gdb --version
to check the availability of this command. If something is not right, see this page to re-install the toolchain. (Remember to make clean before re-making to clean the temporary files.)

Related

How to use cassandra-loader on ubuntu

I want to use cassandra-loader on ubuntu 14.04.
I have cassandra installed on my machine along with other prerequisites require for loader.
I am following this link for the same;
https://github.com/brianmhess/cassandra-loader
I downloaded the cassandra-loader tool but when trying to run any cassandra-loader command it prompts cassandra-loader command not found.
Kindly guide if I am missing anything or need to install other prerequisite as well.
in the README it says:
To run cassandra-loader, simply run the cassandra-loader executable (e.g., located at build/cassandra-loader)
so everywhere where you see the cassandra-loader alone, or just copy build/cassandra-loader somewhere in your PATH and use it.
Done. Just needed to run chmod command on utility to work properly.

Small exception in linking shared library

I have kept libawesomium.1.6.5.so and libawesomium.1.6.5.so.0 files in /usr/lib/awesomium.1.6.5 folder, and given the path for this .so library in ld.co.config.d, in a new .conf file, but when I run my project it gives me a
System.dll not found exception for libawesomium.1.6.5.so.0 at (wrapper managed-to-native).
How to solve this error.
when i check the existence of this library through
sudo ldconfig -p | grep libawesomium-1.6.5.so
command, it gives me the following output:
libawesomium-1.6.5.so.0 (libc6) => /usr/lib/awesomium-1.6.5/libawesomium-1.6.5.so.0
It means it exists. But still at run-time my project is giving this error :
System.dllnotfoundexception libawesomium-1.6.5.so.0
I am working on monodevelop, so can someone suggest me please what is the thing that i am missing. Is there some addon i have to install or some terminal command i have to follow. Hoping for quick responses.
Regards
Rohit
You should be able to add LIBDIR=/lib to /etc/ld.so.conf and then issue ldconfig. If not, then you might be using a VMX or other type of setup that would require to you use the linker with -W/lib for example.
i have need 2 days to find a solution for this problem!
On Linux Wheezy 32bit you need to install libjpeg62 ...
apt-get install libjpeg62
this will fix the problem! ...

Node.js Cygwin not supported

I am trying to install node.js. I followed this tutorial and i am stuck in the middle.
When I write ./configure in my cygwin terminal it says "cygwin not supported". Please help me out
Thanks in advance.
Node in my experience runs fine in cygwin, what Node usually has EINVAL errors in seems to be MINTTY which is a terminal emulation 'skin' that is default to cygwin. I still am not sure why these EINVAL errors happen 100% but the following are the steps and tricks I use to get node working.
In my /cygwin/home/{username}/.bashrc I add node to path so cygwin can find it
export PATH=$PATH:"/cygdrive/c/Program Files/nodejs/"
If you run a 32 bit version of node:
export PATH=$PATH:"/cygdrive/c/Program Files (x86)/nodejs/"
Then to make npm run without windows to linux issues I launch cygwin in admin mode then run:
dos2unix '/cygdrive/c/Program Files/nodejs/npm'
At this point running files and most npm packages will run in MINTTY just fine, although every once and awhile you will run into EINVAL issues with certain npm packages as karma. Also you will not be able to run the interpreter directly in MINTTY, anytime I want to do these things I run:
cygstart /bin/bash
This will open a native cygwin bash.exe window, from here you run the interpreter or an any troubling package command that results in a EINVAL. It slightly sucks you have to do this but I rarely use this day to day, and I love MINTTY too much to not use it.
Also note that you can run any one line node code in MINTTY by just running something like:
node -e "console.log('hello node')"
As a simpler derivative of troy's answer for those just looking to install NPM packages:
Install Node.js with the Windows installer package.
Add it to the PATH with export PATH=$PATH:"/cygdrive/c/Program Files/nodejs/" (obviously replacing the path to Node.js's installation directory with where you installed it).
There's a current bug in the Windows version that can be fixed by running mkdir -p ~/AppData/Roaming/npm. This is a bug for all of Windows and not just Cygwin. At some point of the future, you won't have to do this anymore, but the command shouldn't have any negative side effects.
Test it. Eg, npm install pretty-diff -g.
In order to be able to run the newly installed software, you'll need to add the install locations to your PATH. You can find these with npm bin -g and npm bin (the -g flag is the "global" installation location).
Not really anything special that you have to do to get it to run in Cygwin (although I can't say if everything works).
Use Console2, it allows you to run create tabs of CLI shells. It seems running cygwin inside console2 allows me to use node REPL just fine. I have no idea why :P
Follow this guide to add cygwin to console2:
http://blog.msbbc.co.uk/2009/11/configuring-console-2-and-bash-with.html
With Bjørn's suggestion (using Console2) and Soyuka's alias (steps here), my node.js v0.10.13 and npm v1.3.2 are now working under Babun v1.02, a Cygwin distribution.
For windows, Just run bash.exe in cmd, so that you could have a bash work around with cmd console directly, which could support ALL NODE WORKING PERFECTLY.
C:\Users\郷>bash
郷#CHIGIX ~
$ node
>
I'm using this wrapper in /usr/local/bin/node (note no extension!)
#!/bin/sh
_cmd="$(cygpath -lw -- "$1" )"
shift
"/proc/cygdrive/C/Program Files/nodejs/node.exe" "$_cmd" "$#"
This is far from perfect, as Node do not understand Cygwin directory tree, but works relatively well with relative names.
From Windows, run Cygwin.bat (instead of Cygwin Terminal) then in that run node: see and reply on this answer on this effectively-same question asked 1.5 years later.
Grab and run the node.js Windows installer.
In the Cygwin prompt type node
See if it works.

My busybox does not execute non-applet utility commands

I installed the latest busybox to my new embedded project. It runs OK until I try to put dropbear in my application. The busybox shell complains that dropbear is not found although "which dropbear" command gives me the correct answer "/sbin/dropbear". If I change its mode to RW, it complains that dropbear is not executable. I have tried other non-bosybox commands and it complains the same. It must be a setup issue. Can anyone help me out? Thank you very much.
Allan
Perhaps you're missing the necessary libraries? Some environments don't print helpful messages when this happens. Check what libraries it wants to link against.
ldd or objdump -x <file> |grep NEEDED are helpful.
You probably want to do this from your build machine, as it sounds like the embedded shell environment is pretty broken.
Eric Seppanen's answer is true,any missing dynamic library dependency will cause the cryptic "not found" message for the binary in question. Linux will also give this error if it cannot find ld-linux-x86-64.so.2 in the /lib64 directory, or for 32bit binaries, the corresponding 32bit ld-linux*.so in /lib.

Why can't I get Openfire to start?

I am having trouble getting Openfire to work. I done the following:
[root#jiaoyou logs]# which java
/usr/bin/java
and I've run this command:
ln -s /usr/bin/java /opt/openfire/jre/bin/java
but when starting Openfire, it still says:
cannot run command `/opt/openfire/jre/bin/java': No such file or directory
It seems like a permission issue, but I don't know how to fix that.
This was solved for me, in CentOS6 64bit, using the following commands:
cd /opt/openfire/jre/bin
cp java java.bak
rm java
ln -s /usr/bin/java java
service openfire start
If you're on a 64-bit machine, you should install zlib package for 32-bit architectures.
For Redhat/Centos, use:
yum install -y zlib.i686
/usr/bin/java is just a shell script that runs the actual binary. If you don't have the JAVA_HOME environment variable set correctly, it might not be able to locate the binary if invoked through a symlink like that.
Another thing to keep in mind is that some distros of Linux put /usr/bin/java in place even though you haven't installed the Sun JRE. Don't bother trying to use the GNU version of Java, it's rubbish. Do you know if the Sun JRE is installed or not? What does "java -version" tell you?
I think the correct answer is using the right command to start openfire. I have found that "service openfire start" actually doesn't work.
I attempted the above mentioned method of removing the java executable from opt/openfire/jre/bin and all that did was force me into reconfiguring all of my current openfire settings. Thank god I made that java.bak file.
I believe the proper method to stop|start|restart is from /opt/openfire/bin and run ./openfire start or from anywhere "/opt/openfire/bin/openfire start"
At least that's what worked for me.

Resources