Build error when adding dallas-rmt library

Hi
I have finally started getting around to updating MOS update process again due to have hardware issues. Going from MOS 2.6.0 to MOS 2.22.0 on new (unused) ESP32-WROVER - B.
I have started with a blank JS app and just added the required libraries for my project in mos.yml. All has gone well until I included the dallas-rmt library where it fails when doing the build.

The following is where the error occurs as shown in the build.log :-

[ 89%] Building C object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/core/src/mgos_core.c.obj
[ 89%] Building C object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/onewire-rmt/src/mgos_onewire_rmt_c.c.obj
[ 89%] Building C object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/onewire-rmt/src/onewire_rmt.c.obj
[ 89%] Building CXX object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/onewire-rmt/src/OnewireRmt.cpp.obj
[ 89%] Building CXX object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/onewire-rmt/src/mgos_onewire_rmt.cpp.obj
[ 89%] Building C object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/dallas-rmt/src/mgos_dallas_rmt_c.c.obj
[ 89%] Building CXX object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/dallas-rmt/src/DallasRmt.cpp.obj
[ 90%] Building CXX object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/dallas-rmt/src/mgos_dallas_rmt.cpp.obj
[ 90%] Building C object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/i2c/src/mgos_i2c_master.c.obj
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/dallas-rmt/src/DallasRmt.cpp: In member function 'bool DallasRmt::validFamily(const uint8_t*)':
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/dallas-rmt/src/DallasRmt.cpp:104:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
       ret = true;
       ~~~~^~~~~~
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/dallas-rmt/src/DallasRmt.cpp:105:5: note: here
     default:
     ^~~~~~~
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/onewire-rmt/src/onewire_rmt.c: In function 'onewire_rmt_attach_pin':
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/onewire-rmt/src/onewire_rmt.c:186:9: warning: 'rmt_set_pin' is deprecated: use rmt_set_gpio instead [-Wdeprecated-declarations]
         rmt_set_pin(ow_rmt.rx, RMT_MODE_RX, gpio_num);
         ^~~~~~~~~~~
In file included from /data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/onewire-rmt/src/onewire_rmt.c:65:
/opt/Espressif/esp-idf/components/driver/include/driver/rmt.h:930:11: note: declared here
 esp_err_t rmt_set_pin(rmt_channel_t channel, rmt_mode_t mode, gpio_num_t gpio_num)
           ^~~~~~~~~~~
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/onewire-rmt/src/onewire_rmt.c:187:9: warning: 'rmt_set_pin' is deprecated: use rmt_set_gpio instead [-Wdeprecated-declarations]
         rmt_set_pin(ow_rmt.tx, RMT_MODE_TX, gpio_num);
         ^~~~~~~~~~~
In file included from /data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/onewire-rmt/src/onewire_rmt.c:65:
/opt/Espressif/esp-idf/components/driver/include/driver/rmt.h:930:11: note: declared here
 esp_err_t rmt_set_pin(rmt_channel_t channel, rmt_mode_t mode, gpio_num_t gpio_num)
           ^~~~~~~~~~~
[ 90%] Building C object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/i2c/src/esp32/esp32_i2c_master.c.obj
[ 90%] Building C object esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/ds3231/src/mgos_ds3231.c.obj
cc1plus: all warnings being treated as errors
make[3]: *** [esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/build.make:1616: esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/deps/dallas-rmt/src/DallasRmt.cpp.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/Makefile2:3195: esp-idf/mosapp/CMakeFiles/__idf_mosapp.dir/all] Error 2
make[1]: *** [Makefile:91: all] Error 2
make: Leaving directory '/app'
make: *** [/mongoose-os/platforms/esp32xx/Makefile.build:220: /data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_2611842794/build/objs/app1.bin] Error 2
Error: exit status 2
/src/cli/build_local.go:713: 
/src/cli/build_local.go:700: 
/src/cli/build_local.go:465: 
/src/cli/build.go:278: 
/src/cli/build.go:143: 
/src/cli/main.go:194: build failed
Error: /src/cli/build_remote.go:359: build failed
/src/cli/build.go:278: 
/src/cli/build.go:221: 
/src/cli/main.go:194: build failed
exit status 1
Command completed.

I hope someone can assist in resolving this build issue so I can proceed in upgrading my project to MOS 2.22.0

Thanks

You should be able to (at least) tell an itdoesnotwork from a compiler warning.
I see a very clear compiler warning saying that certain function is deprecated, do not use it.
You are trying to build something ages old, probably based on some IDF also ages old, with some newer version, based on a more recent IDF. Do you see those “esp-idf” ? That means it is an ESP-IDF-related warning.
You should be able to understand english text and try to fix your library

Hi
Yes I can tell it does not work, hence my question on this forum.
I can see that a function is depreciated, hence my question on this forum.
I also see that dallas-rmt deps on onewire-rmt/src/onewire_rmt.c which is causing the build error to occur.

The issue here is that I have started with a new empty build using latest MOS (platform is esp32). I am not building anything that is old.

The following is all I have done:-

mos clone GitHub - mongoose-os-apps/empty app1
I then added the following to mos.yml

libs:

Doing a mos build at this point works ok.
Then if I add the following to mos.yml

libs:

Doing a mos build at this point fails as previously described.

Yes you are, the library that is issuing warnings. It is either older or newer than what the ESP-IDF expects, hence its warnings. Since it is telling that that function is deprecated, unless it has been restated, it is older…

and that function does not belong to mos, but to the ESP-IDF, so what you have to do is to make your library compliant to that ESP-IDF version. Not Mongoose-OS-related.
Do you know the difference between a library, Mongoose-OS, and the ESP-IDF ? Mongoose-OS runs over several platforms, one of them is the ESP32, and the ESP-IDF is Espressif’s support library for that chip.

PS: the value of that function with respect to other functions has not changed, there has been no depreciation but a deprecation :wink:

Of course, you are doing what you did before, with and without the library that is causing the ESP-IDF to issue warnings.
That is the reason why I asked, you say you do, but it seems you don’t.

Since that is just a warning, if you are able to build yourself and tweak the build flags, you can remove -Werror and build anyway.