styill
styill

Reputation: 51

GCC fails with no message when using precompiled headers

I am trying to use precompiled headers in my rather large android NDK project. The precompiled header builds correctly, and I get the gch file that I can see is being used when I compile the source file. However, the "make" command fails with Error 1, but GCC doesn't tell me why it failed:

../Makefile:##: recipe for target '...' failed
make[1]: *** [...] Error 1
make[1]: Leaving directory 

I have also found that rearranging the headers such that my precompiled header is smaller (around ~128MB) it works. The original size of my pch was ~173MB. I know for VS, there is a /Zm option that allows you to change the size limit of a precompiled header, but I can't find such an option for GCC, nor can I find any indication that such a limit exists for GCC.

Does anyone have any ideas as to why my build will fail and any ideas on how I can work around it?

Thanks in advance.

EDIT:

Some clarifications:

1) The code DOES compile if I don't use PCH, so it's not like I'm missing libraries or files or anything like that.

2) I DO get GCC error messages when the compilation fails normally. It's only this one case where I don't see any.

Upvotes: 3

Views: 446

Answers (1)

timato
timato

Reputation: 182

Without seeing the complete error log, I can only guess. I found an answer that suggests the problem may lie in resources that aren't installed on your system.

https://unix.stackexchange.com/questions/182251/makefile29-recipe-for-target-siplib-o-failed-sip-installation

--EDIT--

Perhaps your PCH size is set too large? See: PRECOMPILED HEADERS not working in debug build with Qt Creator / qmake / MinGw

Upvotes: 0

Related Questions