[bug #56231] Include path issue with mbedtls build integration

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #56231] Include path issue with mbedtls build integration

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

                 Summary: Include path issue with mbedtls build integration
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: ashesman
            Submitted on: Sun 28 Apr 2019 07:10:21 AM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

When building lwip with mbedtls support, the mbedtls include path is
incorrectly set.

To reproduce clone lwip and mbedtls into the same folder.  Enable mbedtls in
lwip/contrib/example/example_app/lwipopts.h with #define LWIP_HAVE_MBEDTLS 1

This causes mbedtls to be added as a sub directory (CMakeCommon.cmake line
26)

When built from LwIP, CMAKE_SOURCE_DIR will always be the top level build dir
.../lwip

mbedtls is built with .../lwip as the top level build folder

mbedtls/library/CMakeLists.txt line 153 sets the target include path to
${CMAKE_SOURCE_DIR}/include.  The resulting path is .../lwip/include (which is
incorrect and doesn't exist) and should be .../mbedtls/include

Sorry I cannot provide a suggested solution as my cmake knowledge is limited.
It seems that mbedtls was not meant to be built from withing another project
which is surprising.  A solution may be to change mbedtls to define its root
dir and use paths relative to that.




    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #56231] Include path issue with mbedtls build integration

Wilfred
Follow-up Comment #1, bug #56231 (project lwip):

Note that this issue is currently in the development branch of mbedtls only.
Master is OK.  I have submitted an issue on mbedtls with a fix.  However, if
this fix is not applied and makes it to master next release, LwIP will no
longer build with mbedtls.

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel