Gcc compilation cannot compute suffix of object files: cannot compile
This issue is caused by dyanmic link library path issue when the test programs try to link against libmpc/libmpfr/libgmp.
Append below environment variable to allow ld link against the correct so file:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/mpc/lib/
Then try build gcc again.
LibGCC compilation Failed with an error: cannot compute suffix of object files: cannot compile
Self Resolved
- Manually build binutils from source with
--target=x86_64-elf
option.
That's all.
compiling gcc, configure: error: cannot compute suffix of object files: cannot compile
Did you try using the included dependency script to bring the required libraries into the gcc build environment?
contrib/download_prerequisites
Much easier and less error prone doing it this way vs building the libraries externally and trying to point the gcc configuration at them.
Cross-compile gcc on OS X failed: cannot compute suffix of object files: cannot compile
A major prerequisite for compiling gcc is to have compiled a corresponding binutils package for the same target first. You can get the latest binutils here:
http://ftp.gnu.org/gnu/binutils/
Frist compile and install the binutils package using the same target prefix (and make sure it will provide you with i386-elf-as, i386-elf-ld, etc.). Then start from a clean slate with your gcc build (= remove the directory where your build failed and extract the files again). Just make sure your binutils binaries are in PATH when you run your ./configure.
Hopefully that will get you forward.
glibc installation: cannot compute suffix of object files
I found what I was doing wrong. Since I had installed a couple of different GCCs on my machine, the configure
and makefile
were picking the wrong GCC. Even though they were picking GCC with the right version (3.4), they were picking GCC for i686 instead of picking a mips-compatible GCC. There are two solutions for that:
- Removing the wrong GCC from your PATH. I ended up not doing that for some reason.
Defining the following variables prior to running
configure
andmake
:TARGET=mipseb-linux
CC=${TARGET}-gcc-3.4.4
BUILD_CC=gcc
AR=${TARGET}-ar
RANLIB=${TARGET}-ranlib
Related Topics
How to Assign a Name for a Screen
Linux How to Copy But Not Overwrite
How to Increase the Scrollback Buffer in a Running Screen Session
How to Extract the Contents of an Rpm
Get Specific Line from Text File Using Just Shell Script
Find the Ip Address of the Client in an Ssh Session
Symbolic Link: Find All Files That Link to This File
Linux Find File Names with Given String Recursively
Counting Number of Directories in a Specific Directory
Realuid, Saved Uid, Effective Uid. What's Going On
How to Paste Multi-Line Bash Codes into Terminal and Run It All at Once
How to Write a Linux Bash Script That Tells Me Which Computers Are on in My Lan
How to Give Arguments to Kill via Pipe
How Does Cron Internally Schedule Jobs
Is There a Linux Command to Determine the Window Ids Associated with a Given Process Id