FoundationDB

Missing <tls.h> when compiling from source


(Devon) #1

Hello,

I’m trying to compile the latest build of fdb on a MacBook Pro 2017, on macOS High Sierra 10.13.6. In the compilation process, I reach this bug:

In file included from FDBLibTLS/FDBLibTLSPlugin.cpp:23:

FDBLibTLS/FDBLibTLSPlugin.h:29:10: fatal error: ‘tls.h’ file not found
#include <tls.h>
^~~~~~~

I’ve tried a few things to fix this, such as downloading libreSSL and updating the corresponding flags in my path environment and Makefile, but my understanding of the #include with angle braces instead of quotation marks is that the compiler won’t look in local directories for the missing file.

I think I installed all of the required dependencies correctly (e.g. Xcode, boost, mono, JDK), but I’m not sure if I messed something up or missed one. This is an otherwise brand-new MacBook.

Thanks for helping!


(Alex Miller) #2

You might need to do make TLS_LIBDIR=/path/to/libreSSL/install/ to make the linker be able to find the library correctly.

If you get too frustrated, you can just make TLS_DISABLED=yes to disable TLS support, and therefore not require libressl.


(Devon) #3

Thanks! The first command was still throwing the same error, but disabling TLS seems to have worked. I’d like to come back and figure out what’s going wrong at some point but at least this is enough to get me started.


(John) #4
  1. to find the libressl path,

brew list libressl

  1. add the following to Makefile:

CFLAGS + = -I/path-to-libressl/include
CFLAGS + = -L/path-to-libressl/lib