1

Downloaded a prebuilt cross compiler sparc-elf-4.2.2 and has set the PATH to sparc-elf-4.4.4/bin after which i ran sparc-elf-gcc -o matrixmul matrixmul.c on the terminal only to find the following response

/home/root/sparc-elf-4.4.2/bin/sparc-elf-gcc: No such file or directory

I have no idea as to why this response .

mahesh95
  • 31
  • 1

1 Answers1

0

I just ran into the same problem. Turned out that that my OS is a 64-Bit Ubuntu System and the compiler is a 32-Bit program. I followed the instructions given here https://askubuntu.com/questions/454253/how-to-run-32-bit-app-in-ubuntu-64-bit :

To run a 32-bit executable file on a 64-bit multi-architecture Ubuntu system, you have to add the i386 architecture and install the three
library packages libc6:i386, libncurses5:i386, and libstdc++6:i386:

sudo dpkg --add-architecture i386 Or if you are using Ubuntu 12.04 LTS (Precise Pangolin) or below, use this:

echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch Then:

sudo apt-get update sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 If fails, do also

sudo apt-get install multiarch-support After these steps, you should be able to run the 32-bit application:

./example32bitprogram

Dharman
  • 30,962
  • 25
  • 85
  • 135