lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #56003] `-Wc++-compat` causes build failure when using


From: Freddie Chopin
Subject: [lwip-devel] [bug #56003] `-Wc++-compat` causes build failure when using mbedtls
Date: Tue, 26 Mar 2019 06:07:41 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

URL:
  <https://savannah.nongnu.org/bugs/?56003>

                 Summary: `-Wc++-compat` causes build failure when using
mbedtls
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: freddie_chopin
            Submitted on: Tue 26 Mar 2019 10:07:38 AM UTC
                Category: apps
                Severity: 3 - Normal
              Item Group: Compiler Warning
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

1. Add mbedtls 2.16.0 to a project with lwip
2. Add `set(LWIP_MBEDTLSDIR ${CMAKE_CURRENT_SOURCE_DIR}/mbedtls)` for your
project in proper place.
3. Build.

Build fails with:

-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --

FAILED:
CMakeFiles/lwipmbedtls.dir/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c.o 
/usr/bin/cc -DLWIP_HAVE_MBEDTLS=1 -I../ -I../lwip/src/include
-I../lwip/contrib/ports/unix/port/include -I../mbedtls/include -g  
-fdiagnostics-color=always -Og -g -Wall -pedantic -Werror -Wparentheses
-Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith
-Wcast-qual -Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align
-Wmissing-prototypes -Wnested-externs -Wunreachable-code -Wuninitialized
-Waggregate-return -Wlogical-not-parentheses -Wlogical-op -Wtrampolines -MD
-MT CMakeFiles/lwipmbedtls.dir/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c.o
-MF CMakeFiles/lwipmbedtls.dir/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c.o.d
-o CMakeFiles/lwipmbedtls.dir/lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c.o  
-c ../lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c
In file included from ../lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c:81:
../mbedtls/include/mbedtls/ssl_internal.h:416:16: error: struct defined in
struct or union is not visible in C++ [-Werror=c++-compat]
 typedef struct mbedtls_ssl_hs_buffer mbedtls_ssl_hs_buffer;
                ^~~~~~~~~~~~~~~~~~~~~
../mbedtls/include/mbedtls/ssl_internal.h:339:16: note: struct defined here
         struct mbedtls_ssl_hs_buffer
                ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --

This is because `-Wc++-compat` is added unconditionally to
`LWIP_COMPILER_FLAGS_GNU_CLANG` in lwip/contrib/ports/CMakeCommon.cmake.




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?56003>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]