mynewt-newt icon indicating copy to clipboard operation
mynewt-newt copied to clipboard

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

Open oresk opened this issue 6 years ago • 2 comments

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.

oresk avatar Aug 29 '18 12:08 oresk

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!

ccollins476ad avatar Aug 30 '18 01:08 ccollins476ad

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.

oresk avatar Aug 30 '18 09:08 oresk