FreeRTOS-Plus-TCP compilation issues

I recently encountered FreeRTOS-Plus-TCP compilation issues in a project. A minimal project that reproduces some of these compilation issues is attached (freertos-plus-tcp-compilation-issues.zip (1.8 KB)). When built, this minimal project produces the following output (Ubuntu 20.04):

  1. cmake -S . -B build:
-- The C compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Using FreeRTOS-Plus-TCP Test Configuration : CUSTOM
-- Found PCAP: /usr/lib/x86_64-linux-gnu/libpcap.so  
-- Performing Test PCAP_LINKS_SOLO
-- Performing Test PCAP_LINKS_SOLO - Success
-- Looking for pcap_get_pfring_id
-- Looking for pcap_get_pfring_id - not found
-- Looking for pcap_dump_open_append
-- Looking for pcap_dump_open_append - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build
  1. cmake --build build -j:
Scanning dependencies of target freertos_kernel_port
[  1%] Building C object _deps/freertos_kernel-build/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/port.c.o
[  3%] Building C object _deps/freertos_kernel-build/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/utils/wait_for_event.c.o
[  3%] Built target freertos_kernel_port
Scanning dependencies of target freertos_kernel
[ 12%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/tasks.c.o
[ 12%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/queue.c.o
[ 12%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/event_groups.c.o
[ 12%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/timers.c.o
[ 12%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/croutine.c.o
[ 14%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/portable/MemMang/heap_4.c.o
[ 12%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/list.c.o
[ 15%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/stream_buffer.c.o
[ 17%] Linking C static library libfreertos_kernel.a
[ 17%] Built target freertos_kernel
Scanning dependencies of target freertos_plus_tcp_utilities
[ 21%] Building C object _deps/freertos_plus_tcp-build/tools/CMakeFiles/freertos_plus_tcp_utilities.dir/tcp_utilities/tcp_mem_stats.c.o
[ 21%] Building C object _deps/freertos_plus_tcp-build/tools/CMakeFiles/freertos_plus_tcp_utilities.dir/tcp_utilities/tcp_dump_packets.c.o
[ 21%] Building C object _deps/freertos_plus_tcp-build/tools/CMakeFiles/freertos_plus_tcp_utilities.dir/tcp_utilities/tcp_netstat.c.o
[ 23%] Linking C static library libfreertos_plus_tcp_utilities.a
[ 23%] Built target freertos_plus_tcp_utilities
Scanning dependencies of target freertos_plus_tcp_network_if
[ 25%] Building C object _deps/freertos_plus_tcp-build/source/portable/NetworkInterface/linux/CMakeFiles/freertos_plus_tcp_network_if.dir/NetworkInterface.c.o
[ 26%] Linking C static library libfreertos_plus_tcp_network_if.a
[ 26%] Built target freertos_plus_tcp_network_if
Scanning dependencies of target freertos_plus_tcp_network_if_common
[ 28%] Building C object _deps/freertos_plus_tcp-build/source/portable/NetworkInterface/CMakeFiles/freertos_plus_tcp_network_if_common.dir/Common/phyHandling.c.o
[ 29%] Linking C static library libfreertos_plus_tcp_network_if_common.a
[ 29%] Built target freertos_plus_tcp_network_if_common
Scanning dependencies of target freertos_plus_tcp_port
[ 31%] Building C object _deps/freertos_plus_tcp-build/source/portable/CMakeFiles/freertos_plus_tcp_port.dir/BufferManagement/BufferAllocation_2.c.o
[ 32%] Linking C static library libfreertos_plus_tcp_port.a
[ 32%] Built target freertos_plus_tcp_port
Scanning dependencies of target freertos_plus_tcp
[ 39%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_BitConfig.c.o
[ 39%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Callback.c.o
[ 39%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DHCP.c.o
[ 39%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Cache.c.o
[ 40%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DHCPv6.c.o
[ 42%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Parser.c.o
[ 43%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_ICMP.c.o
[ 46%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_ARP.c.o
[ 46%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Networking.c.o
[ 50%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IP_Timers.c.o
[ 51%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IP.c.o
[ 53%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IP_Utils.c.o
[ 48%] Building C object _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS.c.o
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_BitConfig.c:37:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_DHCP.c:38:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_DHCPv6.c:37:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/include/FreeRTOS_IP.h:32,
                 from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_DNS_Cache.c:34:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/include/FreeRTOS_IP.h:32,
                 from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/include/FreeRTOS_DNS_Networking.h:30,
                 from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_DNS_Networking.c:36:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/include/FreeRTOS_IP.h:32,
                 from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/include/FreeRTOS_DNS_Callback.h:36,
                 from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_DNS_Callback.c:33:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_ARP.c:39:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_ICMP.c:40:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
cc1: all warnings being treated as errors
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_DNS.c:39:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:141: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Callback.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:154: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Networking.c.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:180: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_ICMP.c.o] Error 1
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:102: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DHCPv6.c.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:128: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Cache.c.o] Error 1
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/include/FreeRTOS_IP.h:32,
                 from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_DNS_Parser.c:36:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:76: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_BitConfig.c.o] Error 1
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_IP.c:40:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_IP_Timers.c:40:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:89: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DHCP.c.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:63: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_ARP.c.o] Error 1
In file included from /home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_plus_tcp-src/source/FreeRTOS_IP_Utils.c:40:
/home/apcountryman/Downloads/freertos-plus-tcp-compilation-issues/build/_deps/freertos_kernel-src/include/./task.h:184:19: error: comma at end of enumerator list [-Werror=pedantic]
  184 |     eStandardSleep,            /* Enter a sleep mode that will not last any longer than the expected idle time. */
      |                   ^
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:115: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS.c.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:206: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IP_Timers.c.o] Error 1
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:167: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Parser.c.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:193: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IP.c.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [_deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/build.make:219: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IP_Utils.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:840: _deps/freertos_plus_tcp-build/source/CMakeFiles/freertos_plus_tcp.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I have determined the following so far:

  1. These compilation issues are not present in FreeRTOS-Plus-TCP’s CI build-checks which are using a newer version of GCC (11.4.0).
  2. The test/build-combination/ directory is always included in a build (see FreeRTOS-Plus-TCP/test/CMakeLists.txt at 1bc37d3e901dc585217877f0adbf0c9f456c6c34 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub).
  3. -Werror and -Wpedantic are enabled by test/build-combination/CMakeLists.txt (see FreeRTOS-Plus-TCP/test/build-combination/CMakeLists.txt at 1bc37d3e901dc585217877f0adbf0c9f456c6c34 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub).
  4. FreeRTOS-Plus-TCP suppresses -Wpedantic for some freertos_plus_tcp source files (but not all) in an attempt to get a clean build with GCC (see FreeRTOS-Plus-TCP/source/CMakeLists.txt at 1bc37d3e901dc585217877f0adbf0c9f456c6c34 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub).
  5. FreeRTOS-Plus-TCP sets the C standard used to compile freertos_plus_tcp to 90 (see FreeRTOS-Plus-TCP/source/CMakeLists.txt at 1bc37d3e901dc585217877f0adbf0c9f456c6c34 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub).
  6. Changing the C standard used to compile freertos_plus_tcp to 99 or later resolves the compilation issues.
  7. Not setting the C standard used to compile freertos_plus_tcp (and thus using whatever is the compiler default) resolves the compilation issues.
  8. FreeRTOS-Kernel no longer sets the C standard used to compile freertos_kernel due to issues encountered by consumers of FreeRTOS-Kernel when the C standard used to compile freertos_kernel was set to 90 (see Remove C90 requirement from CMakeLists by aggarg · Pull Request #649 · FreeRTOS/FreeRTOS-Kernel · GitHub).

Based on what I’ve determined, Move CMake compile options to test builds by apcountryman · Pull Request #1115 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub did not fully resolve the overarching issue outlined in Override compile options set by FreeRTOS-Plus-TCP. To fully resolve this issue, consumers of FreeRTOS-Plus-TCP need to be able to fully control the compile options (including the C standard) used when building targets defined by FreeRTOS-Plus-TCP. This could be accomplished by making the following changes to FreeRTOS-Plus-TCP:

  1. Move the setting of the C standard used to compile freertos_plus_tcp to test/build-combination/CMakeLists.txt.
  2. Provide a mechanism that lets consumers of FreeRTOS-Plus-TCP exclude the test/build-combinated/ directory from builds.

I would like to get feedback from the FreeRTOS-Plus-TCP maintainers on the issue I am encountering and the proposed path forward.

1 Like

@apcountryman

The build error listed here seems to originate from the kernel when INCLUDE_vTaskSuspend is disabled. This could be the reason the CI checks didnt detect that.

  1. Move the setting of the C standard used to compile freertos_plus_tcp to test/build-combination/CMakeLists.txt.

Yes, moving the C standard setting to test/build-combination/CMakeLists.txt makes more sense. Would you be interested in raising the change as a PR?

  1. Provide a mechanism that lets consumers of FreeRTOS-Plus-TCP exclude the test/build-combinated/ directory from builds.

Can you elaborate what did you meant by excluding the test/build-combination/, the CMake settings enabled there are not global settings.

PR1036 should fix the build whenINCLUDE_vTaskSuspend is disabled in Kernel.

That PR does fix that specific compilation error, but the bigger issue of FreeRTOS-Plus-TCP dictating what compilation flags consumers use to build freertos_plus_tcp (specifically the C standard that is used and the warnings/errors that are enabled) remains. As mentioned in my original post, the minimal project I provided only reproduces some of the compilation issues I am encountering. My actual project is being built using arm-none-eabi-gcc (9.2.1) for an Arm Cortex-M4F processor (ATSAME54P20A), and I am encountering the following compilation issues:

[ 59%] Building C object freertos/freertos-plus-tcp/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_ARP.c.obj
In file included from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/FreeRTOS_ARP.c:44:
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP.h:211:9: error: type of bit-field 'bActive' is a GCC extension [-Werror=pedantic]
  211 |         bActive : 1,            /**< This timer is running and must be processed. */
      |         ^~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP.h:212:9: error: type of bit-field 'bExpired' is a GCC extension [-Werror=pedantic]
  212 |         bExpired : 1;           /**< Timer has expired and a task must be processed. */
      |         ^~~~~~~~
In file included from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Utils.h:50,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP.h:488,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/FreeRTOS_ARP.c:44:
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_Routing.h:109:17: error: type of bit-field 'bInterfaceUp' is a GCC extension [-Werror=pedantic]
  109 |                 bInterfaceUp : 1,             /**< Non-zero as soon as the interface is up. */
      |                 ^~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_Routing.h:110:17: error: type of bit-field 'bCallDownEvent' is a GCC extension [-Werror=pedantic]
  110 |                 bCallDownEvent : 1;           /**< The down-event must be called. */
      |                 ^~~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_Routing.h:197:17: error: type of bit-field 'bIsDefault' is a GCC extension [-Werror=pedantic]
  197 |                 bIsDefault : 1, /**< This bit will be removed. */
      |                 ^~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_Routing.h:204:13: error: type of bit-field 'bIPv6' is a GCC extension [-Werror=pedantic]
  204 |             bIPv6 : 1,               /**< This end-point has an IP-address of type IPv6. */
      |             ^~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_Routing.h:206:17: error: type of bit-field 'bCallDownHook' is a GCC extension [-Werror=pedantic]
  206 |                 bCallDownHook : 1,   /**< The network down hook-must be called for this end-point. */
      |                 ^~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_Routing.h:208:13: error: type of bit-field 'bEndPointUp' is a GCC extension [-Werror=pedantic]
  208 |             bEndPointUp : 1;         /**< The end-point is up. */
      |             ^~~~~~~~~~~
In file included from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:39,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Utils.h:51,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP.h:488,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/FreeRTOS_ARP.c:44:
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_TCP_WIN.h:62:17: error: type of bit-field 'ucTransmitCount' is a GCC extension [-Werror=pedantic]
   62 |                 ucTransmitCount : 8, /**< Number of times the segment has been transmitted, used to calculate the RTT */
      |                 ^~~~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_TCP_WIN.h:63:17: error: type of bit-field 'ucDupAckCount' is a GCC extension [-Werror=pedantic]
   63 |                 ucDupAckCount : 8,   /**< Counts the number of times that a higher segment was ACK'd. After 3 times a Fast Retransmission takes place */
      |                 ^~~~~~~~~~~~~
In file included from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:39,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Utils.h:51,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP.h:488,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/FreeRTOS_ARP.c:44:
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_TCP_WIN.h:64:17: error: type of bit-field 'bOutstanding' is a GCC extension [-Werror=pedantic]
   64 |                 bOutstanding : 1,    /**< It the peer's turn, we're just waiting for an ACK */
      |                 ^~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_TCP_WIN.h:65:17: error: type of bit-field 'bAcked' is a GCC extension [-Werror=pedantic]
   65 |                 bAcked : 1,          /**< This segment has been acknowledged */
      |                 ^~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_TCP_WIN.h:66:17: error: type of bit-field 'bIsForRx' is a GCC extension [-Werror=pedantic]
   66 |                 bIsForRx : 1;        /**< pdTRUE if segment is used for reception */
      |                 ^~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_TCP_WIN.h:102:17: error: type of bit-field 'bHasInit' is a GCC extension [-Werror=pedantic]
  102 |                 bHasInit : 1,      /**< The window structure has been initialised */
      |                 ^~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_TCP_WIN.h:103:17: error: type of bit-field 'bSendFullSize' is a GCC extension [-Werror=pedantic]
  103 |                 bSendFullSize : 1, /**< May only send packets with a size equal to MSS (for optimisation) */
      |                 ^~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_TCP_WIN.h:104:17: error: type of bit-field 'bTimeStamps' is a GCC extension [-Werror=pedantic]
  104 |                 bTimeStamps : 1;   /**< Socket is supposed to use TCP time-stamps. This depends on the */
      |                 ^~~~~~~~~~~
In file included from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Utils.h:51,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP.h:488,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/FreeRTOS_ARP.c:44:
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:537:17: error: type of bit-field 'bMssChange' is a GCC extension [-Werror=pedantic]
  537 |                 bMssChange : 1,        /**< This socket has seen a change in MSS */
      |                 ^~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:538:17: error: type of bit-field 'bPassAccept' is a GCC extension [-Werror=pedantic]
  538 |                 bPassAccept : 1,       /**< See comment here above. */
      |                 ^~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:539:17: error: type of bit-field 'bPassQueued' is a GCC extension [-Werror=pedantic]
  539 |                 bPassQueued : 1,       /**< See comment here above. */
      |                 ^~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:540:17: error: type of bit-field 'bReuseSocket' is a GCC extension [-Werror=pedantic]
  540 |                 bReuseSocket : 1,      /**< When a listening socket gets a connection, do not create a new instance but keep on using it */
      |                 ^~~~~~~~~~~~
In file included from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Utils.h:51,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP.h:488,
                 from /home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/FreeRTOS_ARP.c:44:
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:541:17: error: type of bit-field 'bCloseAfterSend' is a GCC extension [-Werror=pedantic]
  541 |                 bCloseAfterSend : 1,   /**< As soon as the last byte has been transmitted, finalise the connection
      |                 ^~~~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:543:17: error: type of bit-field 'bUserShutdown' is a GCC extension [-Werror=pedantic]
  543 |                 bUserShutdown : 1,     /**< User requesting a graceful shutdown */
      |                 ^~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:544:17: error: type of bit-field 'bCloseRequested' is a GCC extension [-Werror=pedantic]
  544 |                 bCloseRequested : 1,   /**< Request to finalise the connection */
      |                 ^~~~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:545:17: error: type of bit-field 'bLowWater' is a GCC extension [-Werror=pedantic]
  545 |                 bLowWater : 1,         /**< high-water level has been reached. Cleared as soon as 'rx-count < lo-water' */
      |                 ^~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:546:17: error: type of bit-field 'bWinChange' is a GCC extension [-Werror=pedantic]
  546 |                 bWinChange : 1,        /**< The value of bLowWater has changed, must send a window update */
      |                 ^~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:547:17: error: type of bit-field 'bSendKeepAlive' is a GCC extension [-Werror=pedantic]
  547 |                 bSendKeepAlive : 1,    /**< When this flag is true, a TCP keep-alive message must be send */
      |                 ^~~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:548:17: error: type of bit-field 'bWaitKeepAlive' is a GCC extension [-Werror=pedantic]
  548 |                 bWaitKeepAlive : 1,    /**< When this flag is true, a TCP keep-alive reply is expected */
      |                 ^~~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:549:17: error: type of bit-field 'bConnPrepared' is a GCC extension [-Werror=pedantic]
  549 |                 bConnPrepared : 1,     /**< Connecting socket: Message has been prepared */
      |                 ^~~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:551:17: error: type of bit-field 'bConnPassed' is a GCC extension [-Werror=pedantic]
  551 |                 bConnPassed : 1,       /**< Connecting socket: Socket has been passed in a successful select()  */
      |                 ^~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:553:13: error: type of bit-field 'bFinAccepted' is a GCC extension [-Werror=pedantic]
  553 |             bFinAccepted : 1,          /**< This socket has received (or sent) a FIN and accepted it */
      |             ^~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:554:17: error: type of bit-field 'bFinSent' is a GCC extension [-Werror=pedantic]
  554 |                 bFinSent : 1,          /**< We've sent out a FIN */
      |                 ^~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:555:17: error: type of bit-field 'bFinRecv' is a GCC extension [-Werror=pedantic]
  555 |                 bFinRecv : 1,          /**< We've received a FIN from our peer */
      |                 ^~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:556:17: error: type of bit-field 'bFinAcked' is a GCC extension [-Werror=pedantic]
  556 |                 bFinAcked : 1,         /**< Our FIN packet has been acked */
      |                 ^~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:557:17: error: type of bit-field 'bFinLast' is a GCC extension [-Werror=pedantic]
  557 |                 bFinLast : 1,          /**< The last ACK (after FIN and FIN+ACK) has been sent or will be sent by the peer */
      |                 ^~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:558:17: error: type of bit-field 'bRxStopped' is a GCC extension [-Werror=pedantic]
  558 |                 bRxStopped : 1,        /**< Application asked to temporarily stop reception */
      |                 ^~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:559:17: error: type of bit-field 'bMallocError' is a GCC extension [-Werror=pedantic]
  559 |                 bMallocError : 1,      /**< There was an error allocating a stream */
      |                 ^~~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:560:17: error: type of bit-field 'bWinScaling' is a GCC extension [-Werror=pedantic]
  560 |                 bWinScaling : 1;       /**< A TCP-Window Scaling option was offered and accepted in the SYN phase. */
      |                 ^~~~~~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:654:18: error: type of bit-field 'bIsIPv6' is a GCC extension [-Werror=pedantic]
  654 |         uint32_t bIsIPv6 : 1; /**< Non-zero in case the connection is using IPv6. */
      |                  ^~~~~~~
/home/apcountryman/projects/apcountryman/workbench/c/atsame54-xpro-freertos-tcp-echo/freertos/freertos-plus-tcp/source/include/FreeRTOS_IP_Private.h:655:18: error: type of bit-field 'bSomeFlag' is a GCC extension [-Werror=pedantic]
  655 |         uint32_t bSomeFlag : 1;
      |                  ^~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [freertos/freertos-plus-tcp/source/CMakeFiles/freertos_plus_tcp.dir/build.make:63: freertos/freertos-plus-tcp/source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_ARP.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1066: freertos/freertos-plus-tcp/source/CMakeFiles/freertos_plus_tcp.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I haven’t looked at the declarations for every one of these bit fields, but the type of at least some of them is uint32_t. With the compiler and standard library used by my project, uint32_t is an alias for unsigned long not unsigned int which leads to these compilation issues (see Bit-fields - cppreference.com and c - warning when using bitfield with unsigned char - Stack Overflow). While the FreeRTOS-Plus-TCP source code could be modified to resolve these compilation issues, a far simpler solution is to not force consumers of FreeRTOS-Plus-TCP to use -Wpedantic when building freertos_plus_tcp.

While the forced use of -Wpedantic is causing my compilation issues, the other compilation options FreeRTOS-Plus-TCP forces consumers to use when building freertos_plus_tcp could cause compilation issues for projects that use other compilers and standard libraries. This happened with FreeRTOS-Kernel (CMake default compiler options and Microchip XC16 compatibility - #2 by ActoryOu) which led to FreeRTOS-Kernel no longer dictating what compilation flags consumers use to build freertos_kernel. The same needs to be done for FreeRTOS-Plus-TCP.

test/build-combination/CMakeLists.txt configures the compilation options used when compiling freertos_plus_tcp (see FreeRTOS-Plus-TCP/test/build-combination/CMakeLists.txt at 1bc37d3e901dc585217877f0adbf0c9f456c6c34 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub) which, as elaborated on above, can cause problems for consumers of FreeRTOS-Plus-TCP.

@apcountryman

test/build-combination/CMakeLists.txt is the CMake file used by the Github CI build checks, where we would like to include all the best practices compiler flags. It’s not intended to be used by consumers of FreeRTOS+TCP.

Users are free to create their own custom CMake files that suites there requirement as part of their project, similar to test/build-combination/CMakeLists.txt.

I understand that that is the intent of test/build-combination/CMakeLists.txt but the content of CMakeLists.txt, test/CMakeLists.txt, and test/build-combination/CMakeListst.txt do not reflect that intent.

  1. FreeRTOS-Plus-TCP is consumed using FetchContent.
  2. CMakeLists.txt is processed which unconditionally adds the test/ subdirectory to the build (see FreeRTOS-Plus-TCP/CMakeLists.txt at a53e71a1056df7cb24122700e0a051274986e053 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub).
  3. test/CMakeLists.txt is processed which unconditionally adds the test/build-combination/ subdirectory to the build (see FreeRTOS-Plus-TCP/test/CMakeLists.txt at a53e71a1056df7cb24122700e0a051274986e053 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub)
  4. test/build-combination/CMakeLists.txt is processed which unconditionally adds compilation options (based on the compilation language and compiler ID) to the list of compilation options used when building freertos_plus_tcp (see FreeRTOS-Plus-TCP/test/build-combination/CMakeLists.txt at a53e71a1056df7cb24122700e0a051274986e053 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub).

I will be putting together several proposals for ways this can be fixed, but it may be several days before I do so.

Would not including test from the top level CMakeLists.txt fix your problem?

That would resolve the issue.

I’ve started putting together a fix for these compilation issues, but before I ask for feedback I have a few questions regarding FreeRTOS-Plus-TCP’s use of CMake I’d like to get answered.

  1. The unit testing script in test/unit-test/README.md uses test/unit-test/ as the root of the CMake source tree. The CI unittest job and release create-zip job do the same. Is it supposed to be possible to build the FreeRTOS-Plus-TCP unit tests while using the root of the FreeRTOS-Plus-TCP repository as the root of the CMake source tree? Based on a quick test I did (see below) and the linked references, it appears the answer is no. (I have not investigated why bits/libc-header-start.h was not found in my quick test.)
git clone https://github.com/FreeRTOS/FreeRTOS-Plus-TCP.git
cd FreeRTOS-Plus-TCP
git checkout 86b16eb1f514574df19a31c78c8937600ba5a81a # for reproducability
git submodule update --checkout --init --recursive tools/CMock test/FreeRTOS-Kernel
cmake -S . -B build -DFREERTOS_PLUS_TCP_BUILD_TEST=ON -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=ENABLE_ALL
-- The C compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Using default FREERTOS_PLUS_TCP_BUFFER_ALLOCATION = 2
-- Detected UNIX/Posix system setting FREERTOS_PLUS_TCP_NETWORK_IF = POSIX
-- Using FreeRTOS-Plus-TCP Test Configuration : ENABLE_ALL
CMake Warning at CMakeLists.txt:175 (message):
  FreeRTOS-Kernel configuration settings are configured by FreeRTOS-Plus-TCP


-- Found PCAP: /usr/lib/x86_64-linux-gnu/libpcap.so  
-- Performing Test PCAP_LINKS_SOLO
-- Performing Test PCAP_LINKS_SOLO - Success
-- Looking for pcap_get_pfring_id
-- Looking for pcap_get_pfring_id - not found
-- Looking for pcap_dump_open_append
-- Looking for pcap_dump_open_append - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- /home/apcountryman/projects/FreeRTOS/FreeRTOS-Plus-TCP/build
-- FreeRTOS_ARP
-- FreeRTOS_ARP_DataLenLessThanMinPacket
-- FreeRTOS_BitConfig
-- FreeRTOS_DHCP
-- FreeRTOS_DHCPv6
-- FreeRTOS_TCP_WIN
-- FreeRTOS_Tiny_TCP
-- FreeRTOS_DNS
-- FreeRTOS_DNS_ConfigNoCallback
-- FreeRTOS_DNS_Cache
-- FreeRTOS_DNS_Networking
-- FreeRTOS_DNS_Callback
-- FreeRTOS_DNS_Parser
-- FreeRTOS_IP
-- FreeRTOS_IP_DiffConfig
-- FreeRTOS_IP_DiffConfig1
-- FreeRTOS_IP_DiffConfig2
-- FreeRTOS_IP_DiffConfig3
-- FreeRTOS_ICMP
-- FreeRTOS_ICMP_wo_assert
-- FreeRTOS_IP_Utils
-- FreeRTOS_IP_Utils_DiffConfig
-- FreeRTOS_IPv4_Utils
-- FreeRTOS_IPv6_Utils
-- FreeRTOS_IPv4
-- FreeRTOS_IPv4_DiffConfig
-- FreeRTOS_IPv4_DiffConfig1
-- FreeRTOS_IPv4_Sockets
-- FreeRTOS_IP_Timers
-- FreeRTOS_ND
-- FreeRTOS_Sockets
-- FreeRTOS_Sockets_DiffConfig
-- FreeRTOS_Sockets_DiffConfig1
-- FreeRTOS_Stream_Buffer
-- FreeRTOS_RA
-- FreeRTOS_UDP_IP
-- FreeRTOS_UDP_IPv4
-- FreeRTOS_UDP_IPv6
-- FreeRTOS_TCP_Reception
-- FreeRTOS_TCP_IP
-- FreeRTOS_TCP_IP_DiffConfig
-- FreeRTOS_TCP_State_Handling
-- FreeRTOS_TCP_State_Handling_IPv4
-- FreeRTOS_TCP_State_Handling_IPv6
-- FreeRTOS_TCP_Transmission
-- FreeRTOS_TCP_Transmission_IPv6
-- FreeRTOS_TCP_Utils
-- FreeRTOS_TCP_Utils_IPv6
-- FreeRTOS_IPv6
-- FreeRTOS_IPv6_ConfigDriverCheckChecksum
-- FreeRTOS_Sockets_IPv6
-- FreeRTOS_Routing
-- FreeRTOS_Routing_ConfigV4Only
-- FreeRTOS_Routing_ConfigCompatibleWithSingle
CMake Warning at build/_deps/freertos_kernel-src/CMakeLists.txt:44 (message):
   FREERTOS_PORT is not set. Please specify it from top-level CMake file (example):
    set(FREERTOS_PORT GCC_ARM_CM4F CACHE STRING "")
   or from CMake command line option:
    -DFREERTOS_PORT=GCC_ARM_CM4F
   
   Available port options:
   A_CUSTOM_PORT                    - Compiler: User Defined  Target: User Defined
   BCC_16BIT_DOS_FLSH186            - Compiler: BCC           Target: 16 bit DOS Flsh186
   BCC_16BIT_DOS_PC                 - Compiler: BCC           Target: 16 bit DOS PC
   CCS_ARM_CM3                      - Compiler: CCS           Target: ARM Cortex-M3
   CCS_ARM_CM4F                     - Compiler: CCS           Target: ARM Cortex-M4 with FPU
   CCS_ARM_CR4                      - Compiler: CCS           Target: ARM Cortex-R4
   CCS_MSP430X                      - Compiler: CCS           Target: MSP430X
   CODEWARRIOR_COLDFIRE_V1          - Compiler: CoreWarrior   Target: ColdFire V1
   CODEWARRIOR_COLDFIRE_V2          - Compiler: CoreWarrior   Target: ColdFire V2
   CODEWARRIOR_HCS12                - Compiler: CoreWarrior   Target: HCS12
   GCC_ARM_CA9                      - Compiler: GCC           Target: ARM Cortex-A9
   GCC_ARM_AARCH64                  - Compiler: GCC           Target: ARM v8-A
   GCC_ARM_AARCH64_SRE              - Compiler: GCC           Target: ARM v8-A SRE
   GCC_ARM_CM0                      - Compiler: GCC           Target: ARM Cortex-M0
   GCC_ARM_CM3                      - Compiler: GCC           Target: ARM Cortex-M3
   GCC_ARM_CM3_MPU                  - Compiler: GCC           Target: ARM Cortex-M3 with MPU
   GCC_ARM_CM4_MPU                  - Compiler: GCC           Target: ARM Cortex-M4 with MPU
   GCC_ARM_CM4F                     - Compiler: GCC           Target: ARM Cortex-M4 with FPU
   GCC_ARM_CM7                      - Compiler: GCC           Target: ARM Cortex-M7
   GCC_ARM_CM23_NONSECURE           - Compiler: GCC           Target: ARM Cortex-M23 non-secure
   GCC_ARM_CM23_SECURE              - Compiler: GCC           Target: ARM Cortex-M23 secure
   GCC_ARM_CM23_NTZ_NONSECURE       - Compiler: GCC           Target: ARM Cortex-M23 non-trustzone non-secure
   GCC_ARM_CM33_NONSECURE           - Compiler: GCC           Target: ARM Cortex-M33 non-secure
   GCC_ARM_CM33_SECURE              - Compiler: GCC           Target: ARM Cortex-M33 secure
   GCC_ARM_CM33_NTZ_NONSECURE       - Compiler: GCC           Target: ARM Cortex-M33 non-trustzone non-secure
   GCC_ARM_CM33_TFM                 - Compiler: GCC           Target: ARM Cortex-M33 non-secure for TF-M
   GCC_ARM_CM35P_NONSECURE          - Compiler: GCC           Target: ARM Cortex-M35P non-secure
   GCC_ARM_CM35P_SECURE             - Compiler: GCC           Target: ARM Cortex-M35P secure
   GCC_ARM_CM35P_NTZ_NONSECURE      - Compiler: GCC           Target: ARM Cortex-M35P non-trustzone non-secure
   GCC_ARM_CM55_NONSECURE           - Compiler: GCC           Target: ARM Cortex-M55 non-secure
   GCC_ARM_CM55_SECURE              - Compiler: GCC           Target: ARM Cortex-M55 secure
   GCC_ARM_CM55_NTZ_NONSECURE       - Compiler: GCC           Target: ARM Cortex-M55 non-trustzone non-secure
   GCC_ARM_CM55_TFM                 - Compiler: GCC           Target: ARM Cortex-M55 non-secure for TF-M
   GCC_ARM_CM85_NONSECURE           - Compiler: GCC           Target: ARM Cortex-M85 non-secure
   GCC_ARM_CM85_SECURE              - Compiler: GCC           Target: ARM Cortex-M85 secure
   GCC_ARM_CM85_NTZ_NONSECURE       - Compiler: GCC           Target: ARM Cortex-M85 non-trustzone non-secure
   GCC_ARM_CM85_TFM                 - Compiler: GCC           Target: ARM Cortex-M85 non-secure for TF-M
   GCC_ARM_CR5                      - Compiler: GCC           Target: ARM Cortex-R5
   GCC_ARM_CRX_MPU                  - Compiler: GCC           Target: ARM Cortex-Rx with MPU
   GCC_ARM_CRX_NOGIC                - Compiler: GCC           Target: ARM Cortex-Rx no GIC
   GCC_ARM7_AT91FR40008             - Compiler: GCC           Target: ARM7 Atmel AT91R40008
   GCC_ARM7_AT91SAM7S               - Compiler: GCC           Target: ARM7 Atmel AT91SAM7S
   GCC_ARM7_LPC2000                 - Compiler: GCC           Target: ARM7 LPC2000
   GCC_ARM7_LPC23XX                 - Compiler: GCC           Target: ARM7 LPC23xx
   GCC_ATMEGA323                    - Compiler: GCC           Target: ATMega323
   GCC_AVR32_UC3                    - Compiler: GCC           Target: AVR32 UC3
   GCC_COLDFIRE_V2                  - Compiler: GCC           Target: ColdFire V2
   GCC_CORTUS_APS3                  - Compiler: GCC           Target: CORTUS APS3
   GCC_H8S2329                      - Compiler: GCC           Target: H8S2329
   GCC_HCS12                        - Compiler: GCC           Target: HCS12
   GCC_IA32_FLAT                    - Compiler: GCC           Target: IA32 flat
   GCC_MICROBLAZE                   - Compiler: GCC           Target: MicroBlaze
   GCC_MICROBLAZE_V8                - Compiler: GCC           Target: MicroBlaze V8
   GCC_MICROBLAZE_V9                - Compiler: GCC           Target: MicroBlaze V9
   GCC_MSP430F449                   - Compiler: GCC           Target: MSP430F449
   GCC_NIOSII                       - Compiler: GCC           Target: NiosII
   GCC_PPC405_XILINX                - Compiler: GCC           Target: Xilinx PPC405
   GCC_PPC440_XILINX                - Compiler: GCC           Target: Xilinx PPC440
   GCC_RISC_V                       - Compiler: GCC           Target: RISC-V
   GCC_RISC_V_PULPINO_VEGA_RV32M1RM - Compiler: GCC           Target: RISC-V Pulpino Vega RV32M1RM
   GCC_RISC_V_GENERIC               - Compiler: GCC           Target: RISC-V with FREERTOS_RISCV_EXTENSION
   GCC_RL78                         - Compiler: GCC           Target: Renesas RL78
   GCC_RX100                        - Compiler: GCC           Target: Renesas RX100
   GCC_RX200                        - Compiler: GCC           Target: Renesas RX200
   GCC_RX600                        - Compiler: GCC           Target: Renesas RX600
   GCC_RX600_V2                     - Compiler: GCC           Target: Renesas RX600 v2
   GCC_RX700_V3_DPFPU               - Compiler: GCC           Target: Renesas RX700 v3 with DPFPU
   GCC_STR75X                       - Compiler: GCC           Target: STR75x
   GCC_TRICORE_1782                 - Compiler: GCC           Target: TriCore 1782
   GCC_ARC_EM_HS                    - Compiler: GCC           Target: DesignWare ARC EM HS
   GCC_ARC_V1                       - Compiler: GCC           Target: DesignWare ARC v1
   GCC_ATMEGA                       - Compiler: GCC           Target: ATmega
   GCC_POSIX                        - Compiler: GCC           Target: Posix
   GCC_RP2040                       - Compiler: GCC           Target: RP2040 ARM Cortex-M0+
   GCC_XTENSA_ESP32                 - Compiler: GCC           Target: Xtensa ESP32
   GCC_AVRDX                        - Compiler: GCC           Target: AVRDx
   GCC_AVR_MEGA0                    - Compiler: GCC           Target: AVR Mega0
   IAR_78K0K                        - Compiler: IAR           Target: Renesas 78K0K
   IAR_ARM_CA5_NOGIC                - Compiler: IAR           Target: ARM Cortex-A5 no GIC
   IAR_ARM_CA9                      - Compiler: IAR           Target: ARM Cortex-A9
   IAR_ARM_CM0                      - Compiler: IAR           Target: ARM Cortex-M0
   IAR_ARM_CM3                      - Compiler: IAR           Target: ARM Cortex-M3
   IAR_ARM_CM4F                     - Compiler: IAR           Target: ARM Cortex-M4 with FPU
   IAR_ARM_CM4F_MPU                 - Compiler: IAR           Target: ARM Cortex-M4 with FPU and MPU
   IAR_ARM_CM7                      - Compiler: IAR           Target: ARM Cortex-M7
   IAR_ARM_CM23_NONSECURE           - Compiler: IAR           Target: ARM Cortex-M23 non-secure
   IAR_ARM_CM23_SECURE              - Compiler: IAR           Target: ARM Cortex-M23 secure
   IAR_ARM_CM23_NTZ_NONSECURE       - Compiler: IAR           Target: ARM Cortex-M23 non-trustzone non-secure
   IAR_ARM_CM33_NONSECURE           - Compiler: IAR           Target: ARM Cortex-M33 non-secure
   IAR_ARM_CM33_SECURE              - Compiler: IAR           Target: ARM Cortex-M33 secure
   IAR_ARM_CM33_NTZ_NONSECURE       - Compiler: IAR           Target: ARM Cortex-M33 non-trustzone non-secure
   IAR_ARM_CM35P_NONSECURE          - Compiler: IAR           Target: ARM Cortex-M35P non-secure
   IAR_ARM_CM35P_SECURE             - Compiler: IAR           Target: ARM Cortex-M35P secure
   IAR_ARM_CM35P_NTZ_NONSECURE      - Compiler: IAR           Target: ARM Cortex-M35P non-trustzone non-secure
   IAR_ARM_CM55_NONSECURE           - Compiler: IAR           Target: ARM Cortex-M55 non-secure
   IAR_ARM_CM55_SECURE              - Compiler: IAR           Target: ARM Cortex-M55 secure
   IAR_ARM_CM55_NTZ_NONSECURE       - Compiler: IAR           Target: ARM Cortex-M55 non-trustzone non-secure
   IAR_ARM_CM85_NONSECURE           - Compiler: IAR           Target: ARM Cortex-M85 non-secure
   IAR_ARM_CM85_SECURE              - Compiler: IAR           Target: ARM Cortex-M85 secure
   IAR_ARM_CM85_NTZ_NONSECURE       - Compiler: IAR           Target: ARM Cortex-M85 non-trustzone non-secure
   IAR_ARM_CRX_NOGIC                - Compiler: IAR           Target: ARM Cortex-Rx no GIC
   IAR_ATMEGA323                    - Compiler: IAR           Target: ATMega323
   IAR_ATMEL_SAM7S64                - Compiler: IAR           Target: Atmel SAM7S64
   IAR_ATMEL_SAM9XE                 - Compiler: IAR           Target: Atmel SAM9XE
   IAR_AVR_AVRDX                    - Compiler: IAR           Target: AVRDx
   IAR_AVR_MEGA0                    - Compiler: IAR           Target: AVR Mega0
   IAR_AVR32_UC3                    - Compiler: IAR           Target: AVR32 UC3
   IAR_LPC2000                      - Compiler: IAR           Target: LPC2000
   IAR_MSP430                       - Compiler: IAR           Target: MSP430
   IAR_MSP430X                      - Compiler: IAR           Target: MSP430X
   IAR_RISC_V                       - Compiler: IAR           Target: RISC-V
   IAR_RISC_V_GENERIC               - Compiler: IAR           Target: RISC-V with FREERTOS_RISCV_EXTENSION
   IAR_RL78                         - Compiler: IAR           Target: Renesas RL78
   IAR_RX100                        - Compiler: IAR           Target: Renesas RX100
   IAR_RX600                        - Compiler: IAR           Target: Renesas RX600
   IAR_RX700_V3_DPFPU               - Compiler: IAR           Target: Renesas RX700 v3 with DPFPU
   IAR_RX_V2                        - Compiler: IAR           Target: Renesas RX v2
   IAR_STR71X                       - Compiler: IAR           Target: STR71x
   IAR_STR75X                       - Compiler: IAR           Target: STR75x
   IAR_STR91X                       - Compiler: IAR           Target: STR91x
   IAR_V850ES_FX3                   - Compiler: IAR           Target: Renesas V850ES/Fx3
   IAR_V850ES_HX3                   - Compiler: IAR           Target: Renesas V850ES/Hx3
   MIKROC_ARM_CM4F                  - Compiler: MikroC        Target: ARM Cortex-M4 with FPU
   MPLAB_PIC18F                     - Compiler: MPLAB         Target: PIC18F
   MPLAB_PIC24                      - Compiler: MPLAB         Target: PIC24
   MPLAB_PIC32MEC14XX               - Compiler: MPLAB         Target: PIC32MEC14xx
   MPLAB_PIC32MX                    - Compiler: MPLAB         Target: PIC32MX
   MPLAB_PIC32MZ                    - Compiler: MPLAB         Target: PIC32MZ
   MSVC_MINGW                       - Compiler: MSVC or MinGW Target: x86
   OWATCOM_16BIT_DOS_FLSH186        - Compiler: Open Watcom   Target: 16 bit DOS Flsh186
   OWATCOM_16BIT_DOS_PC             - Compiler: Open Watcom   Target: 16 bit DOS PC
   PARADIGM_TERN_EE_LARGE           - Compiler: Paradigm      Target: Tern EE large
   PARADIGM_TERN_EE_SMALL           - Compiler: Paradigm      Target: Tern EE small
   RENESAS_RX100                    - Compiler: Renesas       Target: RX100
   RENESAS_RX200                    - Compiler: Renesas       Target: RX200
   RENESAS_RX600                    - Compiler: Renesas       Target: RX600
   RENESAS_RX600_V2                 - Compiler: Renesas       Target: RX600 v2
   RENESAS_RX700_V3_DPFPU           - Compiler: Renesas       Target: RX700 v3 with DPFPU
   RENESAS_SH2A_FPU                 - Compiler: Renesas       Target: SH2A with FPU
   ROWLEY_MSP430F449                - Compiler: Rowley        Target: MSP430F449
   RVDS_ARM_CA9                     - Compiler: RVDS          Target: ARM Cortex-A9
   RVDS_ARM_CM0                     - Compiler: RVDS          Target: ARM Cortex-M0
   RVDS_ARM_CM3                     - Compiler: RVDS          Target: ARM Cortex-M3
   RVDS_ARM_CM4_MPU                 - Compiler: RVDS          Target: ARM Cortex-M4 with MPU
   RVDS_ARM_CM4F                    - Compiler: RVDS          Target: ARM Cortex-M4 with FPU
   RVDS_ARM_CM7                     - Compiler: RVDS          Target: ARM Cortex-M7
   RVDS_ARM7_LPC21XX                - Compiler: RVDS          Target: ARM7 LPC21xx
   SDCC_CYGNAL                      - Compiler: SDCC          Target: Cygnal
   SOFTUNE_MB91460                  - Compiler: Softune       Target: MB91460
   SOFTUNE_MB96340                  - Compiler: Softune       Target: MB96340
   TASKING_ARM_CM4F                 - Compiler: Tasking       Target: ARM Cortex-M4 with FPU
   TEMPLATE                         - Compiler: HOST          Target: None
   CDK_THEAD_CK802                  - Compiler: CDK           Target: T-head CK802
   XCC_XTENSA                       - Compiler: XCC           Target: Xtensa
   WIZC_PIC18                       - Compiler: WizC          Target: PIC18


--  Auto-Detected Unix, setting FREERTOS_PORT=GCC_POSIX
-- Configuring done
-- Generating done
-- Build files have been written to: /home/apcountryman/projects/FreeRTOS/FreeRTOS-Plus-TCP/build

cmake --build build
Scanning dependencies of target freertos_kernel_port
[  0%] Building C object _deps/freertos_kernel-build/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/port.c.o
[  0%] Building C object _deps/freertos_kernel-build/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/utils/wait_for_event.c.o
[  0%] Built target freertos_kernel_port
Scanning dependencies of target freertos_kernel
[  0%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/croutine.c.o
[  0%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/event_groups.c.o
[  0%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/list.c.o
[  0%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/queue.c.o
[  0%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/stream_buffer.c.o
[  0%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/tasks.c.o
[  0%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/timers.c.o
[  0%] Building C object _deps/freertos_kernel-build/CMakeFiles/freertos_kernel.dir/portable/MemMang/heap_4.c.o
[  0%] Linking C static library libfreertos_kernel.a
[  0%] Built target freertos_kernel
Scanning dependencies of target freertos_plus_tcp_utilities
[  0%] Building C object tools/CMakeFiles/freertos_plus_tcp_utilities.dir/tcp_utilities/tcp_dump_packets.c.o
[  0%] Building C object tools/CMakeFiles/freertos_plus_tcp_utilities.dir/tcp_utilities/tcp_mem_stats.c.o
[  0%] Building C object tools/CMakeFiles/freertos_plus_tcp_utilities.dir/tcp_utilities/tcp_netstat.c.o
[  0%] Linking C static library libfreertos_plus_tcp_utilities.a
[  0%] Built target freertos_plus_tcp_utilities
Scanning dependencies of target freertos_plus_tcp_network_if
[  0%] Building C object source/portable/NetworkInterface/linux/CMakeFiles/freertos_plus_tcp_network_if.dir/NetworkInterface.c.o
[  0%] Linking C static library libfreertos_plus_tcp_network_if.a
[  0%] Built target freertos_plus_tcp_network_if
Scanning dependencies of target freertos_plus_tcp_network_if_common
[  0%] Building C object source/portable/NetworkInterface/CMakeFiles/freertos_plus_tcp_network_if_common.dir/Common/phyHandling.c.o
[  0%] Linking C static library libfreertos_plus_tcp_network_if_common.a
[  0%] Built target freertos_plus_tcp_network_if_common
Scanning dependencies of target freertos_plus_tcp_port
[  0%] Building C object source/portable/CMakeFiles/freertos_plus_tcp_port.dir/BufferManagement/BufferAllocation_2.c.o
[  0%] Linking C static library libfreertos_plus_tcp_port.a
[  0%] Built target freertos_plus_tcp_port
Scanning dependencies of target freertos_plus_tcp
[  0%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_ARP.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_BitConfig.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DHCP.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DHCPv6.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Cache.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Callback.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Networking.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_DNS_Parser.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_ICMP.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IP.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IP_Timers.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IP_Utils.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IPv4.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IPv4_Sockets.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IPv4_Utils.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IPv6.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IPv6_Sockets.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_IPv6_Utils.c.o
[  1%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_ND.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_RA.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_Routing.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_Sockets.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_Stream_Buffer.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_IP.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_IP_IPv4.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_IP_IPv6.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_Reception.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_State_Handling.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_State_Handling_IPv4.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_State_Handling_IPv6.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_Transmission.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_Transmission_IPv4.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_Transmission_IPv6.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_Utils.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_Utils_IPv4.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_Utils_IPv6.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_TCP_WIN.c.o
[  2%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_Tiny_TCP.c.o
[  3%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_UDP_IP.c.o
[  3%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_UDP_IPv4.c.o
[  3%] Building C object source/CMakeFiles/freertos_plus_tcp.dir/FreeRTOS_UDP_IPv6.c.o
[  3%] Linking C static library libfreertos_plus_tcp.a
[  3%] Built target freertos_plus_tcp
Scanning dependencies of target StaticAnalysis
[  3%] Building C object test/Coverity/CMakeFiles/StaticAnalysis.dir/__/__/source/FreeRTOS_ARP.c.o
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h:9,
                 from /home/apcountryman/projects/FreeRTOS/FreeRTOS-Plus-TCP/source/FreeRTOS_ARP.c:34:
/usr/include/stdint.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory
   26 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [test/Coverity/CMakeFiles/StaticAnalysis.dir/build.make:66: test/Coverity/CMakeFiles/StaticAnalysis.dir/__/__/source/FreeRTOS_ARP.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1396: test/Coverity/CMakeFiles/StaticAnalysis.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
  1. If it is supposed to be possible to build the FreeRTOS-Plus-TCP unit tests while using the root of the FreeRTOS-Plus-TCP repository as the root of the CMake source tree, why don’t the unit testing script in test/unit-test/README.md, the CI unittest job, and release create-zip job use this method?

  2. If it is not supposed to be possible to build the FreeRTOS-Plus-TCP unit tests while using the root of the FreeRTOS-Plus-TCP repository as the root of the CMake source tree, what is the purpose of the FREERTOS_PLUS_TCP_BUILD_TEST option and the associated code in test/CMakeLists.txt? Should these have been removed as part of some previous change?

@apcountryman

The unit testing script in test/unit-test/README.md uses test/unit-test/ as the root of the CMake source tree . The CI unittest job and release create-zip job do the same. Is it supposed to be possible to build the FreeRTOS-Plus-TCP unit tests while using the root of the FreeRTOS-Plus-TCP repository as the root of the CMake source tree?

CMake was only used to build the unit test previously, it wasnt used to configure and build the library. The contibution to configure and build the library using CMake was added recently, hence the unit tests continue to use the old CMake project is present in the test/unit-test/ folder.

I have not investigated why bits/libc-header-start.h was not found in my quick test.

This seems like an environment issue with the test system.

If it is supposed to be possible to build the FreeRTOS-Plus-TCP unit tests while using the root of the FreeRTOS-Plus-TCP repository as the root of the CMake source tree, why don’t the unit testing script in test/unit-test/README.md, the CI unittest job, and release create-zip job use this method?

It would be more cleaner to use the root of the FreeRTOS-Plus-TCP repository as the root of the CMake source tree, but because of the above mentioned reason, the unit-test CMake was kept un modified. If you prefer, you can update the root of the FreeRTOS-Plus-TCP repository as the root of the CMake source tree in your contribution.

Thanks for the answers. I will submit a PR later today that addresses the FreeRTOS-Plus-TCP consumer compilation issues.

I looked into this and seems that it is caused by FreeRTOS-Plus-TCP/test/Coverity/CMakeLists.txt at 86b16eb1f514574df19a31c78c8937600ba5a81a · FreeRTOS/FreeRTOS-Plus-TCP · GitHub forcing 32-bit compilation and me not having 32-bit headers installed. As a note, Misra rule 11.3, 11.4 suppression and 4.6 fix (#512) · FreeRTOS/FreeRTOS-Plus-TCP@ab51932 · GitHub enabled the use of -m32 but did not update/remove the associated comment.

1 Like