Build system ignores syntax errors

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Build system ignores syntax errors

Postby PeterR » Thu Jun 28, 2018 2:50 pm

Hi,
I am porting applications to the ESP32. Lots of undefined/conflicting types to work through. The process is

Code: Select all

make flash
remove some syntax errors then

Code: Select all

make flash
again etc etc.
Often the build system will not return to a file that still has syntax errors and instead carries on with the rest of the build and even programs the device.
If I

Code: Select all

make clean
then

Code: Select all

make flash
then a new attempt is made to recompile.

Code: Select all

make clean
slows me down as I must wait for everything else to recompile.
Why is the build ignoring a files with sytax errors?
Is there a command just to clean the user area?

This is a PC build.
& I also believe that IDF CAN should be fixed.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Build system ignores syntax errors

Postby kolban » Thu Jun 28, 2018 7:02 pm

That's very interesting. It is not what I have ever seen in any of my environments. If there is a compilation error in a translation unit and I then affect a fix, when I re-run make the translation unit is re-submitted for compilation.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Build system ignores syntax errors

Postby chegewara » Fri Jun 29, 2018 3:16 am

I dont know what you are trying to achieve with make clean, but you can just simple delete files from build/main subfolder and eventually build/subfolders that your own components name.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Build system ignores syntax errors

Postby PeterR » Fri Jun 29, 2018 8:47 am

Thanks.
Was using clean as I did not know how to selectively remove my objects (other than manual prune which is also a pain).

Using the default build I end up with the one build folder off the project base.
Would be interested if I can locate my objects in their own folder for ease of delete and/or make voodoo which may allow me just to prune my objects (excluding the standard components).
& I also believe that IDF CAN should be fixed.

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Build system ignores syntax errors

Postby chegewara » Fri Jun 29, 2018 8:54 am

Yes, you have build folder, but you also have bunch of subfolders. Each subfolder is for components. You have "main" subfolder for all objects that are inside main folder in you project etc. If you like to play with scripts i think you can easy write simple script to delete all from subfolders you are interested with.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Build system ignores syntax errors

Postby PeterR » Fri Jun 29, 2018 9:11 am

My bad. Had a look in build directory and can see that it would be easy to prune my bits.

The Arduino ESP project I am trying to convert has the files:
MQTT.cpp and mqtt.c

Renamed MQTT.cpp to CMQTT.cpp and the file is no longer skipped on second build.
Seems that there is a case insensitive error somewhere in the linking section of the make script.

Life's too short, going with the rename!
& I also believe that IDF CAN should be fixed.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Build system ignores syntax errors

Postby ESP_Angus » Tue Jul 03, 2018 2:16 am

PeterR wrote: Renamed MQTT.cpp to CMQTT.cpp and the file is no longer skipped on second build.
Seems that there is a case insensitive error somewhere in the linking section of the make script.
Yes, I think this is probably a bug in the build system. Both files will compile to mqtt.o, and Windows regards MQTT.o and mqtt.o as the same file.)

This will be fixed in the CMake-based build system (which names the output files MQTT.cpp.obj and mqtt.c.obj, respectively). Unfortunately it's a little difficult to fix in the current GNU Make build system.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Build system ignores syntax errors

Postby PeterR » Tue Jul 03, 2018 1:13 pm

Thanks. Its not an issue for me now that I know.
Now my Ethernet question, viewtopic.php?f=2&t=6261&p=27189#p27189 is hurting!
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: pbeam66 and 99 guests