user83311
user83311

Reputation: 21

How do I find the actual GCC error in compiler output?

I'm trying to compile some old software from source on debian-based linux. The build failed:

make[2]: Leaving directory '/home/owner/kallistios/utils/dc-chain/build-gcc-sh-elf-4.7.3'
Makefile:871: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/owner/kallistios/utils/dc-chain/build-gcc-sh-elf-4.7.3'
Makefile:201: recipe for target 'build-sh4-gcc-pass2' failed
make: *** [build-sh4-gcc-pass2] Error 1
owner@ubuntu:~/kallistios/utils/dc-chain$

But it doesn't say what the actual error is or how I can find it in the output. If I don't know what the problem is obviously I can't fix it.

This is the full output: http://pasted.co/cff68fa2

Upvotes: 1

Views: 1684

Answers (2)

SiZiOUS
SiZiOUS

Reputation: 658

You are trying to compile the Sega Dreamcast toolchain which I know very well, using the dc-chain utility inside KallistiOS (often shortened to KOS).

The key error message here is kos is an unknown thread package. It means that you don't have applied the KOS patches before compiling your sh-elf cross-compiler.

To solve this issue, you just have to enter the make patch command before running everything else. Please note, if you just enter the make command, it will already apply the patches.

To finish this answer, you may check the KallistiOS Nitro repository, as this repo is handling the official KOS plus a lot of community patches, including some very interesting things about the dc-chain utility, like complete documentation.

Upvotes: 1

MadScientist
MadScientist

Reputation: 100836

The first thing to do if you're having problems deciphering error output is to NOT run the build in parallel (don't use the -j flag). Also you should NOT use the keep-going (-k) flag. If you don't use -j or -k then make will run one recipe at a time and fail as soon as a recipe fails. So, whenever you get an error the last command that was printed is the one that failed.

Also if you want to use -j and you're using a new-enough version of GNU make (4.0 or above) you can add the -Otarget option which will collect all the output from a given target and print it atomically at the end of the recipe, rather than interweaving output from different recipes together.

In your situation it appears as though one of the configure operations failed. It's not easy to tell exactly why because of the parallel build output. This may or may not be related:

kos is an unknown thread package
  ...
Makefile:3810: recipe for target 'configure-gcc' failed
make[2]: *** [configure-gcc] Error 1

Upvotes: 3

Related Questions