Gcc Compilation "Cannot Compute Suffix of Object Files: Cannot Compile"

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:

  1. Removing the wrong GCC from your PATH. I ended up not doing that for some reason.
  2. Defining the following variables prior to running configure and make:

    TARGET=mipseb-linux

    CC=${TARGET}-gcc-3.4.4

    BUILD_CC=gcc

    AR=${TARGET}-ar

    RANLIB=${TARGET}-ranlib



Related Topics



Leave a reply



Submit