I am following the instructions in the most popular answer to the post here and when I attempt to run
make TOOLCHAIN=i386-elf- qemu
it refuses to run giving me the following error...
***
*** Error: Couldn't find an i386-*-elf version of GCC/binutils.
*** Is the directory with i386-jos-elf-gcc in your PATH?
*** If your i386-*-elf toolchain is installed with a command
*** prefix other than 'i386-jos-elf-', set your TOOLPREFIX
*** environment variable to that prefix and run 'make' again.
*** To turn off this error, run 'gmake TOOLPREFIX= ...'.
***
gcc -m32 -gdwarf-2 -Wa,-divide -c -o usys.o usys.S
clang: error: unsupported argument '-divide' to option 'Wa,'
make: *** [usys.o] Error 1
I am unsure how to resolve this and unsure where to find the texinfo that the person was refering to in their answer to the linked post. I am also unsure where i386 installed itself. I am aware that I am omitting the -nox command from the command line instruction, but I tried that as well. We have setup a window manager for xv6 that works properly and I was wanting to be able to run it on my machine but cannot get it to work.
Thanks for any help!
Related
I am using Ubuntu 18.04.2 LTS under windows 10 by using "Windows subsystem for Linux." I am experiencing some issues with XV6.
I set up XV6 by using the command:
git clone git://pdos.csail.mit.edu/xv6/xv6.git
sudo apt-get install libc6-dev
chmod 700 -R xv6-riscv
But when I typed in make command, I having the following issue:
***
*** Error: Couldn't find an riscv64 version of GCC/binutils.
*** To turn off this error, run 'gmake TOOLPREFIX= ...'.
***
gcc -c -o kernel/entry.o kernel/entry.S
kernel/entry.S: Assembler messages:
kernel/entry.S:17: Error: no such instruction: `la sp,stack0'
kernel/entry.S:18: Error: no such instruction: `li a0,1024*4'
kernel/entry.S:19: Error: no such instruction: `csrr a1,mhartid'
kernel/entry.S:20: Error: no such instruction: `addi a1,a1,1'
kernel/entry.S:21: Error: too many memory references for `mul'
kernel/entry.S:22: Error: too many memory references for `add'
kernel/entry.S:26: Error: no such instruction: `j junk'
<builtin>: recipe for target 'kernel/entry.o' failed
make: *** [kernel/entry.o] Error 1
Can anyone help me with this? (I am using an x64 system)
you should check this link: https://pdos.csail.mit.edu/6.828/2019/tools.html
for me I am running ubuntu, so I compiled the toolchain myself and then it works
I was running MacOS and had the same error. I solved it by updating the ~/.bashrc with:
PATH=$PATH:/usr/local/opt/riscv-gnu-toolchain/bin
before sourcing it or open a new interactive session. Then make qemu under xv6-riscv just ran!
So I would suggest you go back and check if you've finished each step: install toolchain, update env vars, source, and make.
For Suse you can install cross-riscv64-gccX package, where X is the gcc version
Then use
TOOLPREFIX=/usr/bin/riscv64-suse-linux-
it worked for me
I've had CUDA Toolkit 9.0 correctly installed on Ubuntu 16.04 with the package manager-based method since both the two commands
cat /proc/driver/nvidia/version
nvcc -V
returne the right infomation. However, it fails to make correctly when I tried to compile the official example NVIDIA_CUDA-9.0_Samples.
io#msi:~/NVIDIA_CUDA-9.0_Samples$ make
The main output is
/usr/bin/ld: can't find -lcudart
collect2: error: ld returned 1 exit status
Makefile:334: recipe for target 'simpleMPI' failed
make[1]: *** [simpleMPI] Error 1
make[1]: Leaving directory '/home/io/NVIDIA_CUDA-9.0_Samples/0_Simple/simpleMPI'
Makefile:52: recipe for target '0_Simple/simpleMPI/Makefile.ph_build' failed
make: *** [0_Simple/simpleMPI/Makefile.ph_build] Error 2
can anyone give me a hand? Thank you.
I think I've solved this problem. As I mentioned in the question, I've had CUDA Toolkit correctly installed in my computer, but it fails when execute
io#msi:~/NVIDIA_CUDA-9.0_Samples$ make
However, the following two commands
$ ~/NVIDIA_CUDA-9.0_Samples/1_Utilities/deviceQuery/deviceQuery
$ ~/NVIDIA_CUDA-9.0_Samples/1_Utilities/bandwidthTest/bandwidthTest
gives correct response "Result = pass". It's ok to ignore the "make error" listed above- I think.
I am new to compiling.
I am trying to compile iperf3 for Windows 10 because there is no official Windows distribution of iperf3 and for the learning experience. I am trying to do so on the new Windows Subsystem for Linux feature via Bash on Ubuntu on Windows, also for the learning experience.
I installed mingw-w64, which should give me the proper compiler and environment necessary for cross-compiling:
sudo apt-get install mingw-w64
This put two directories into my /usr directory:
i686-w64-mingw32
x86_64-w64-mingw32
It also put a bunch of things that look like compilers into /usr/bin.
I unzipped the .tar.gz file from iperf3 and navigated into it. Then, I run ./configure --host=i686-w64-mingw32.static and it completes without errors.
I note that the output of the command has a worrisome line: checking for i686-w64-mingw32.static-gcc... no
I note that the Makefile's CC variable is set to gcc, which doesn't sound like the proper compiler.
Then, I run make. It fails with errors:
collect2: error: ld returned 1 exit status
make[2]: *** [iperf3] Error 1
make[2]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make: *** [all-recursive] Error 1
I also see the line: libtool: warning: undefined symbols not allowed in i686-w64-mingw32.static shared libraries; building static only
I think that the ./configure is not working correctly since it appears to have not found the right compiler for my --host argument and put it in the Makefile.
What am I doing wrong?
EDIT:
I changed the command to ./configure --host=i686-w64-mingw32 per comments and it completes without error. But no makefile is created so make yields make: *** No targets specified and no makefile found. Stop.
What am I doing wrong, now?
EDIT 2:
Looks like the ./configure actually is failing. Last line of its output is nanosleep() required for timing operations., which seems to mean that its missing a library for nanosleep.
How do I get nanosleep?
mingw doesn't support nanosleep. So programs using it cannot be compiled using mingw-w64.
I'm trying to compile gcc-code-assist which has the code completion feature in order to use it with emacs. However i have been getting this error message while compilinng
checking for exception model to use... configure: error: unable to detect exception model
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/home/dev/workspace/trash/gcc-code-assist-0.1-4.4.4'
make: *** [all] Error 2
I'm running Ubuntu 12.04 64bit
what can i do to overcome this problem
I found the right way to compile it ...
I really didn't have much knowledge of how to compile gcc (my first time)
after reading through the FAQ of building gcc I found the problem.
it turned out that I had to run the configure script and make from outside the source directory
( I called it gcc-build) so the directory list looked like this
gcc-source/
gcc-build/
then everything compiled smoothly
here's the link to the FAQ http://gcc.gnu.org/wiki/FAQ#configure
I want to to build QEMU arm for windows. For that I execute the following command:
/configure –target-list=arm-softmmu and make.
when I executing make command I get the following error.
Makefile:24: no file name for `-include'
make[1]: *** No rule to make target `vl.o', needed by `all'. Stop.
make: *** [subdir-libhw32] Error 2
How I can resolve this issue? Please help me.