cURL / Mailing Lists / curl-library / Single Mail

curl-library

MBEDTLS d5800b7761ad9705d2ebca86d7af0c8ee24e427a creates regression wher compiling libcurl error: unknown type name 'mbedtls_time_t'

From: Thomas Glanzmann <thomas_at_glanzmann.de>
Date: Sat, 2 Jul 2016 20:32:53 +0200

Hello,
when I compile libcurl with mbedtls-2.3.0 I hit the following libcurl
compile regression:

In file included from ../lib/urldata.h:98:0,
                 from vtls/darwinssl.c:31:
/home/sithglan/work/vlconnect/curl/../local/win32/include/mbedtls/ssl.h:545:5: error: unknown type name 'mbedtls_time_t'
     mbedtls_time_t start; /*!< starting time */
     ^
Makefile:2073: recipe for target 'vtls/libcurl_la-darwinssl.lo' failed
make[2]: *** [vtls/libcurl_la-darwinssl.lo] Error 1

I bisected mbetls and identified the offending commit:

commit d5800b7761ad9705d2ebca86d7af0c8ee24e427a
Author: SimonB <simonb_at_redtangent.net>
Date: Tue Apr 26 07:43:27 2016 +0100

    Abstracts away time()/stdlib.h into platform

    Substitutes time() into a configurable platform interface to allow it to be
    easily substituted.

See here: https://github.com/ARMmbed/mbedtls/commit/d5800b7761ad9705d2ebca86d7af0c8ee24e427a

This is what I did to reproduce:

#!/bin/bash

set -e

git clone https://github.com/ARMmbed/mbedtls.git
cd mbedtls
make -j lib
make DESTDIR=`pwd`/../local/linux install
cd ..

git clone https://github.com/curl/curl
cd curl
./buildconf
./configure --without-ssl --with-mbedtls=`pwd`/../local/linux \
        --prefix=`pwd`/../local/linux
make -j
make install

Full log is here: https://thomas.glanzmann.de/tmp/mbedtls_curl_fail_2016-07-02.txt

Please advise if we should fix this in mbedtls, libcurl, or both.

Cheers,
        Thomas
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-07-02