Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_compile_options(-w) is essential in CMakeLists.txt for mros2-esp32 app project due to avoid build error #16

Open
takasehideki opened this issue Sep 24, 2023 · 3 comments

Comments

@takasehideki
Copy link
Member

takasehideki commented Sep 24, 2023

The current implementation requires adding add_compile_options(-w) in CMakeLists.txt for mros2-esp32 application project to avoid build errors.
https://github.com/mROS-base/mros2-esp32#edit-cmakeliststxt

The issue is caused by -Werror=format, that is a type format mismatch in mros2-esp32 logging function.
Of course we understand that the correct way is to improve the implementation so that it builds correctly without adding this option. However, we are treating to solve this as a coping mechanism. We will tackle this in the correct way in the future.

Refs:
https://stackoverflow.com/questions/20424625/werror-format-how-can-the-compiler-know
https://esp32.com/viewtopic.php?t=29402

@takasehideki
Copy link
Member Author

error log without this option in the application project

[914/920] Building CXX object esp-idf/...__idf_main.dir/echoback_string.cpp.objFAILED: esp-idf/main/CMakeFiles/__idf_main.dir/echoback_string.cpp.obj 
/home/hogehoge/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++ -DESP_PLATFORM -DIDF_VER=\"v5.1.1\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/home/hogehoge/mros2-esp32/workspace/echoback_string/build/config -I/home/hogehoge/mros2-esp32/workspace/echoback_string/main -I/home/hogehoge/esp/esp-idf/components/newlib/platform_include -I/home/hogehoge/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/hogehoge/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/hogehoge/esp/esp-idf/components/freertos/esp_additions/include/freertos -I/home/hogehoge/esp/esp-idf/components/freertos/esp_additions/include -I/home/hogehoge/esp/esp-idf/components/freertos/esp_additions/arch/xtensa/include -I/home/hogehoge/esp/esp-idf/components/esp_hw_support/include -I/home/hogehoge/esp/esp-idf/components/esp_hw_support/include/soc -I/home/hogehoge/esp/esp-idf/components/esp_hw_support/include/soc/esp32s3 -I/home/hogehoge/esp/esp-idf/components/esp_hw_support/port/esp32s3/. -I/home/hogehoge/esp/esp-idf/components/esp_hw_support/port/esp32s3/private_include -I/home/hogehoge/esp/esp-idf/components/heap/include -I/home/hogehoge/esp/esp-idf/components/log/include -I/home/hogehoge/esp/esp-idf/components/soc/include -I/home/hogehoge/esp/esp-idf/components/soc/esp32s3 -I/home/hogehoge/esp/esp-idf/components/soc/esp32s3/include -I/home/hogehoge/esp/esp-idf/components/hal/esp32s3/include -I/home/hogehoge/esp/esp-idf/components/hal/include -I/home/hogehoge/esp/esp-idf/components/hal/platform_port/include -I/home/hogehoge/esp/esp-idf/components/esp_rom/include -I/home/hogehoge/esp/esp-idf/components/esp_rom/include/esp32s3 -I/home/hogehoge/esp/esp-idf/components/esp_rom/esp32s3 -I/home/hogehoge/esp/esp-idf/components/esp_common/include -I/home/hogehoge/esp/esp-idf/components/esp_system/include -I/home/hogehoge/esp/esp-idf/components/esp_system/port/soc -I/home/hogehoge/esp/esp-idf/components/esp_system/port/include/private -I/home/hogehoge/esp/esp-idf/components/xtensa/include -I/home/hogehoge/esp/esp-idf/components/xtensa/esp32s3/include -I/home/hogehoge/esp/esp-idf/components/lwip/include -I/home/hogehoge/esp/esp-idf/components/lwip/include/apps -I/home/hogehoge/esp/esp-idf/components/lwip/include/apps/sntp -I/home/hogehoge/esp/esp-idf/components/lwip/lwip/src/include -I/home/hogehoge/esp/esp-idf/components/lwip/port/include -I/home/hogehoge/esp/esp-idf/components/lwip/port/freertos/include -I/home/hogehoge/esp/esp-idf/components/lwip/port/esp32xx/include -I/home/hogehoge/esp/esp-idf/components/lwip/port/esp32xx/include/arch -I/home/hogehoge/mros2-esp32/mros2/include -I/home/hogehoge/mros2-esp32/mros2/include/mros2 -I/home/hogehoge/mros2-esp32/mros2/mros2_msgs -I/home/hogehoge/mros2-esp32/mros2/embeddedRTPS/include -I/home/hogehoge/mros2-esp32/mros2/embeddedRTPS/thirdparty/lwip -I/home/hogehoge/mros2-esp32/mros2/embeddedRTPS/thirdparty/Micro-CDR/include -I/home/hogehoge/mros2-esp32/cmsis-esp32/include -I/home/hogehoge/mros2-esp32/platform -I/home/hogehoge/mros2-esp32/platform/wifi -I/home/hogehoge/esp/esp-idf/components/nvs_flash/include -I/home/hogehoge/esp/esp-idf/components/spi_flash/include -I/home/hogehoge/esp/esp-idf/components/esp_partition/include -I/home/hogehoge/esp/esp-idf/components/esp_wifi/include -I/home/hogehoge/esp/esp-idf/components/esp_wifi/wifi_apps/include -I/home/hogehoge/esp/esp-idf/components/esp_event/include -I/home/hogehoge/esp/esp-idf/components/esp_phy/include -I/home/hogehoge/esp/esp-idf/components/esp_phy/esp32s3/include -I/home/hogehoge/esp/esp-idf/components/esp_netif/include -mlongcalls  -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fmacro-prefix-map=/home/hogehoge/mros2-esp32/workspace/echoback_string=. -fmacro-prefix-map=/home/hogehoge/esp/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu++2b -fno-exceptions -fno-rtti -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/echoback_string.cpp.obj -MF esp-idf/main/CMakeFiles/__idf_main.dir/echoback_string.cpp.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/echoback_string.cpp.obj -c /home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp
In file included from /home/hogehoge/mros2-esp32/mros2/embeddedRTPS/include/rtps/entities/StatefulReader.h:31,
                 from /home/hogehoge/mros2-esp32/mros2/embeddedRTPS/include/rtps/discovery/BuiltInEndpoints.h:28,
                 from /home/hogehoge/mros2-esp32/mros2/embeddedRTPS/include/rtps/discovery/SEDPAgent.h:28,
                 from /home/hogehoge/mros2-esp32/mros2/embeddedRTPS/include/rtps/entities/Participant.h:30,
                 from /home/hogehoge/mros2-esp32/mros2/embeddedRTPS/include/rtps/entities/Domain.h:30,
                 from /home/hogehoge/mros2-esp32/mros2/embeddedRTPS/include/rtps/rtps.h:28,
                 from /home/hogehoge/mros2-esp32/mros2/include/mros2.h:5,
                 from /home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:17:
/home/hogehoge/mros2-esp32/mros2/embeddedRTPS/include/rtps/entities/Reader.h:74:3: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
   74 |   const DataSize_t getDataSize() const { return size; }
      |   ^~~~~
In file included from /home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:5,
                 from /home/hogehoge/mros2-esp32/mros2/include/mros2.h:9:
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp: In function 'void userCallback(std_msgs::msg::String*)':
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~
      |                                                          |
      |                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:24:3: note: in expansion of macro 'MROS2_INFO'
   24 |   MROS2_INFO("subscribed msg: '%s'", msg->data.c_str());
      |   ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:33: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                              ~~~^
      |                                 |
      |                                 unsigned int
      |                              %08lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~                        ~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:24:3: note: in expansion of macro 'MROS2_INFO'
   24 |   MROS2_INFO("subscribed msg: '%s'", msg->data.c_str());
      |   ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:38: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                                   ~~~^
      |                                      |
      |                                      unsigned int
      |                                   %03lu
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp: In function 'void app_main()':
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~
      |                                                          |
      |                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:32:5: note: in expansion of macro 'MROS2_INFO'
   32 |     MROS2_INFO("successfully connect and setup network\r\n---");
      |     ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:33: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                              ~~~^
      |                                 |
      |                                 unsigned int
      |                              %08lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~                        ~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:32:5: note: in expansion of macro 'MROS2_INFO'
   32 |     MROS2_INFO("successfully connect and setup network\r\n---");
      |     ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:38: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                                   ~~~^
      |                                      |
      |                                      unsigned int
      |                                   %03lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~
      |                                                          |
      |                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:44:31: note: in expansion of macro 'syslog'
   44 | #define CMSIS_IMPL_ERROR(...) syslog(LOG_ERROR, __VA_ARGS__)
      |                               ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:80:26: note: in expansion of macro 'CMSIS_IMPL_ERROR'
   80 | #define MROS2_ERROR(...) CMSIS_IMPL_ERROR(__VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:36:5: note: in expansion of macro 'MROS2_ERROR'
   36 |     MROS2_ERROR("failed to connect and setup network! aborting,,,");
      |     ^~~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:33: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                              ~~~^
      |                                 |
      |                                 unsigned int
      |                              %08lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~                        ~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:44:31: note: in expansion of macro 'syslog'
   44 | #define CMSIS_IMPL_ERROR(...) syslog(LOG_ERROR, __VA_ARGS__)
      |                               ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:80:26: note: in expansion of macro 'CMSIS_IMPL_ERROR'
   80 | #define MROS2_ERROR(...) CMSIS_IMPL_ERROR(__VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:36:5: note: in expansion of macro 'MROS2_ERROR'
   36 |     MROS2_ERROR("failed to connect and setup network! aborting,,,");
      |     ^~~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:38: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                                   ~~~^
      |                                      |
      |                                      unsigned int
      |                                   %03lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~
      |                                                          |
      |                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:40:3: note: in expansion of macro 'MROS2_INFO'
   40 |   MROS2_INFO("%s start!", MROS2_PLATFORM_NAME);
      |   ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:33: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                              ~~~^
      |                                 |
      |                                 unsigned int
      |                              %08lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~                        ~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:40:3: note: in expansion of macro 'MROS2_INFO'
   40 |   MROS2_INFO("%s start!", MROS2_PLATFORM_NAME);
      |   ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:38: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                                   ~~~^
      |                                      |
      |                                      unsigned int
      |                                   %03lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~
      |                                                          |
      |                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:41:3: note: in expansion of macro 'MROS2_INFO'
   41 |   MROS2_INFO("app name: echoback_string");
      |   ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:33: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                              ~~~^
      |                                 |
      |                                 unsigned int
      |                              %08lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~                        ~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:41:3: note: in expansion of macro 'MROS2_INFO'
   41 |   MROS2_INFO("app name: echoback_string");
      |   ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:38: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                                   ~~~^
      |                                      |
      |                                      unsigned int
      |                                   %03lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~
      |                                                          |
      |                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:26:31: note: in expansion of macro 'syslog'
   26 | #define CMSIS_IMPL_DEBUG(...) syslog(LOG_DEBUG, __VA_ARGS__)
      |                               ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:35:26: note: in expansion of macro 'CMSIS_IMPL_DEBUG'
   35 | #define MROS2_DEBUG(...) CMSIS_IMPL_DEBUG(__VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:44:3: note: in expansion of macro 'MROS2_DEBUG'
   44 |   MROS2_DEBUG("mROS 2 initialization is completed");
      |   ^~~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:33: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                              ~~~^
      |                                 |
      |                                 unsigned int
      |                              %08lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~                        ~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:26:31: note: in expansion of macro 'syslog'
   26 | #define CMSIS_IMPL_DEBUG(...) syslog(LOG_DEBUG, __VA_ARGS__)
      |                               ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:35:26: note: in expansion of macro 'CMSIS_IMPL_DEBUG'
   35 | #define MROS2_DEBUG(...) CMSIS_IMPL_DEBUG(__VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:44:3: note: in expansion of macro 'MROS2_DEBUG'
   44 |   MROS2_DEBUG("mROS 2 initialization is completed");
      |   ^~~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:38: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                                   ~~~^
      |                                      |
      |                                      unsigned int
      |                                   %03lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~
      |                                                          |
      |                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:51:3: note: in expansion of macro 'MROS2_INFO'
   51 |   MROS2_INFO("ready to pub/sub message\r\n---");
      |   ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:33: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                              ~~~^
      |                                 |
      |                                 unsigned int
      |                              %08lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~                        ~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:51:3: note: in expansion of macro 'MROS2_INFO'
   51 |   MROS2_INFO("ready to pub/sub message\r\n---");
      |   ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:38: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                                   ~~~^
      |                                      |
      |                                      unsigned int
      |                                   %03lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~
      |                                                          |
      |                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:58:5: note: in expansion of macro 'MROS2_INFO'
   58 |     MROS2_INFO("publishing msg: '%s'", msg.data.c_str());
      |     ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:33: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                              ~~~^
      |                                 |
      |                                 unsigned int
      |                              %08lu
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:24: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                        ^~~~~~~~~~~~~~~~~~~                        ~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          long unsigned int
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:32:30: note: in expansion of macro 'syslog'
   32 | #define CMSIS_IMPL_INFO(...) syslog(LOG_NOTICE, __VA_ARGS__)
      |                              ^~~~~~
/home/hogehoge/mros2-esp32/mros2/include/mros2/logging.h:50:25: note: in expansion of macro 'CMSIS_IMPL_INFO'
   50 | #define MROS2_INFO(...) CMSIS_IMPL_INFO(__VA_ARGS__)
      |                         ^~~~~~~~~~~~~~~
/home/hogehoge/mros2-esp32/workspace/echoback_string/main/echoback_string.cpp:58:5: note: in expansion of macro 'MROS2_INFO'
   58 |     MROS2_INFO("publishing msg: '%s'", msg.data.c_str());
      |     ^~~~~~~~~~
/home/hogehoge/mros2-esp32/cmsis-esp32/include/cmsis_impl_logger.h:14:38: note: format string is defined here
   14 |                 printf("%s : %08u.%03u : ", #flg, (_tick / 1000), (_tick % 1000)); \
      |                                   ~~~^
      |                                      |
      |                                      unsigned int
      |                                   %03lu
cc1plus: some warnings being treated as errors
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/hogehoge/mros2-esp32/workspace/echoback_string/build/log/idf_py_stderr_output_232106 and /home/hogehoge/mros2-esp32/workspace/echoback_string/build/log/idf_py_stdout_output_232106

@takasehideki
Copy link
Member Author

takasehideki commented Sep 24, 2023

This can be an unexpected issue in the situation where we already have mros2-esp32 under EXTRA_COMPONENTS_DIR, but do not want to use it in that project yet. Actually, we found this issue in that situation.
But we fortunately have fixed this situation by PR #17

@takasehideki
Copy link
Member Author

This can be an unexpected issue in the situation where we already have mros2-esp32 under EXTRA_COMPONENTS_DIR, but do not want to use it in that project yet. Actually, we found this issue in that situation. But we fortunately have fixed this situation by PR #17

#17 has been merged!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant