[Top][All Lists]

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

Re: [libmicrohttpd] MHD requires GnuTLS and other libraries

From: Evgeny Grin
Subject: Re: [libmicrohttpd] MHD requires GnuTLS and other libraries
Date: Thu, 10 Dec 2020 20:23:39 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1

Hello David,

First of all, please, follow advices already given.
Learn more about cross-compilation of projects that require dependency.

The basic idea is to re-create filesystem structure at some prefix, compile and *install* all dependencies to this prefix. The prefix is provided by configure parameter, like './configure --prefix=/home/test/arm-root' or any other path at your choice. Then use PKG_CONFIG_PATH variable so pkg-config will take care of all required lib paths and flags for precompiler and linker. Alternatively, you can specify all required path in flags manually. From you config.log it's clear that GnuTLS failed to find required module from nettle. If you link with GnuTLS, you need to provide all libs and linker path for all libs required by GnuTLS. If those libraries require other libraries, you must specify them as well. That's why it's better to use pkg-config to automate it. Usage of both '--with-gnutls=/path/to/gnutls' AND CPPFLAGS='-I /path/to/gnutls/include' is redundant. You don't need both. Check result in you log. Same for LDFLAGS.

One more alternative: compile everything as static libs.

It's interesting that MHD can still be compiled with so ancient Linux (2.6.18) and tools (GCC 4.2.3). Looks like we succeed in maintaining of backward compatibility.

One more note: looks like you specified somewhere path incorrectly. You have '/mnt/hgfs/Projects/GnuTLS/gnutls-3.6.15' and '/mnt/hgfs/Projects/gnutls/gnutls-3.6.15/'. It is not the same, this is two different paths on Linux.

Please, use more web search. You faced typical cross-compilation problems, there are many solutions on the web.


On 10.12.2020 15:30, DJM-Avalesta wrote:

I've now cross-comiled GnuTLS and all of it's dependant libraries eg libnettle, libhogweed, libgmp.

I now need to build libmicrohttpd and link it to my GnuTLS.

I run the following configure command

/./configure --host=arm-none-linux-gnueabi --enable-https=yes --with-gnutls=/mnt/hgfs/Projects/GnuTLS/gnutls-3.6.15/

but I get the attached config log and this failure message

/checking how to find GnuTLS library... -I/mnt/hgfs/Projects/GnuTLS/gnutls-3.6.15/include -L/mnt/hgfs/Projects/GnuTLS/gnutls-3.6.15/lib -lgnutls/
/checking for gnutls/gnutls.h... yes/
/checking for gnutls_priority_set in -lgnutls... no/
/configure: error: can't find usable libgnutls at specified prefix /mnt/hgfs/Projects/GnuTLS/gnutls-3.6.15/

Any suggestions at this point would be very helpful.



On 2020-12-05 8:29 pm, Christian Grothoff wrote:

Hi David,

How to cross-compile GnuTLS is a question better suited for the GnuTLS
mailinglist ;-).

Good luck!

Happy hacking!


On 12/5/20 9:24 PM, DJM-Avalesta wrote:

To get MHD working with HTTPS on my embedded system, I need to link
libmicrohttpd with GnuTLS, so I need to cross compile GnuTLS.

When I run configure for GnuTLS, I get "libNettle 3.4.1 was not found".

I downloaded the source for libNettle 3.4.1 and built this, but when I
re-configure GnuTLS with libNettle, I stilll get "libNettle 3.4.1 was
not found"

Reading up on this it seems I might also need to build libHogweed and
libGMP libraries.

Has anyone out there cross compiled all of these libraries and can help
me to get all of these downloads and steps correct, so I can build an
HTTPS-enabled MHD?

Many thanks


Attachment: OpenPGP_signature
Description: OpenPGP digital signature

reply via email to

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