Error building i686-elf-gcc

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
solarmist
Posts: 1
Joined: Fri Dec 10, 2021 4:26 am

Error building i686-elf-gcc

Post by solarmist »

When I try to build i686-elf-gcc (gcc-11.2.0, binutils-2.3.7), I get this error:

checking for suffix of object files... configure: error: in `/tmp/src/gcc-build/i686-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make: *** [Makefile:13430: configure-target-libgcc] Error 1

when I run the "make all-target-libgcc" command
Does anyone know what I have done wrong/how to fix this problem?
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: Error building i686-elf-gcc

Post by Octocontrabass »

solarmist wrote:binutils-2.3.7
You're using binutils-2.37, right? There's no way 2.3.7 will work.
solarmist wrote:See `config.log' for more details
What does config.log say?
thewrongchristian
Member
Member
Posts: 426
Joined: Tue Apr 03, 2018 2:44 am

Re: Error building i686-elf-gcc

Post by thewrongchristian »

solarmist wrote:When I try to build i686-elf-gcc (gcc-11.2.0, binutils-2.3.7), I get this error:

checking for suffix of object files... configure: error: in `/tmp/src/gcc-build/i686-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make: *** [Makefile:13430: configure-target-libgcc] Error 1

when I run the "make all-target-libgcc" command
Does anyone know what I have done wrong/how to fix this problem?
I had this exact problem, and it infuriated me for months, because the config.log didn't really indicate what was wrong.

I finally resolved the issue by configuring, compiling *and* installing binutils before configuring gcc, whereas before, I was configuring binutils, then configuring gcc, then compiling/installing binutils before finally compiling/installing gcc.
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: Error building i686-elf-gcc

Post by nexos »

Not to bump this thread, but I wanted to mention that I had the same issue when running configure like this:

Code: Select all

$PWD/configure
In other word, use relative paths, not absolute ones
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
Post Reply