Build settings - deep dive

I am still at the beginning of CMAKE learning curve. Things are falling into place but I mostly rely on working examples in order to make things tick. Recently I faced this linker error when I tried to link against a sub folder of an external library, using only my limited knowledge:

unable to execute command: Bus error: 10
clang frontend command failed due to signal (use -v to see invocation)

I didn’t find any useful advice online, so I generated an Xcode project and got the same error on Debug build, while Release build was successful.

This was a bad experience for me because I felt completely clueless about what’s going on. I am still not sure if this error is related to bad implementation on my side, or perhaps recent changes in Juce or Xcode. But in any case, I am now (finally) ready to step out of my comfort zone and take a deep dive into compilers and IDE settings, or any other subject related to setting up C++ projects with external dependancies.

This is a broad subject so I’ll try to narrow it down: I just don’t want to be afraid whenever I fail to add an external library or when old projects break after some version upgrade. I want to understand what all those compiler flags and obscure IDE settings do, and I have the time to invest in it. What should I do next? Learn to build a compiler from scratch? Or maybe take an “Xcode for power users” course or something?

Any recommendations will be highly appreciated. If you can think of any material that helps to understand how things work on the lower levels of projects generation, please mention it here.

“Bus error” is a memory violation, it’s very bad and not usually something you see in a build failure (usually it means some code you wrote tried to access a garbage pointer value). Post the command invocation that you’re using and the full build log.

Thanks mate. On purpose, I don’t want to get specifically into this memory violation and make it the subject of this post. I was just giving it as a general example of facing a rabbit-hole-show-stopper out of nowhere. I can’t explain why, but suddenly I want to actually understand what it means on the deepest level, rather than just pasting a fix without knowing how it works.

For example, ChatGPT threw me a couple of references:

But I was wondering if any human out there can also provide some refs.