apache/mynewt-newt

Build failing with cryptic messages when there is a space in the path to the project

Opened this issue · 2 comments

oresk commented

Had prior experience with MyNewt. Spent a few hours bothered people on slack about my failing build. I the end there was a problem with a space in the path.

Would get an error like this:

Compiling repos/apache-mynewt-core/boot/bootutil/src/bootutil_misc.c
Error: cc1: note: obsolete option -I- used, please use -iquote instead
repos/apache-mynewt-core/boot/bootutil/src/image_ec256.c:24:15: error: missing binary operator before token "("
 #if MYNEWT_VAL(BOOTUTIL_SIGN_EC256)

When trying to build the bootloader. That is a gcc error.

It should either detect the space and fail letting you know that that is the problem or escape the spaces.

Thanks, oresk. Unfortunately, I don't think newt can escape paths with spaces. I tried to fix this earlier, but encountered an issue with gcc's dependency generation (.d Makefiles). Newt makes gcc create these files, then it reads these files to determine which source files need to be rebuilt. If a source file has spaces in its path, gcc produces invalid .d Makefiles, and I couldn't find any way to fix it.

That said, newt should definitely detect spaces and complain!

oresk commented

Thank you for the explanation!
I'll see if I can pepper a warning about it in a few places in the documentation. Especially in the first tutorials you go through when you start out with MyNewt.