# Regarding issue facing while try to build fdbdoc binary in macOS

**URL:** https://forums.foundationdb.org/t/regarding-issue-facing-while-try-to-build-fdbdoc-binary-in-macos/1530
**Category:** Document Layer
**Created:** [July 19, 2019, 11:12am UTC](https://forums.foundationdb.org/t/regarding-issue-facing-while-try-to-build-fdbdoc-binary-in-macos/1530 "2019-07-19T11:12:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![pragawaran](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pragawaran](https://forums.foundationdb.org/u/pragawaran)
#### Post date: [July 19, 2019, 11:12am UTC](https://forums.foundationdb.org/t/regarding-issue-facing-while-try-to-build-fdbdoc-binary-in-macos/1530/1 "2019-07-19T11:12:16Z")

</div>

Hi,  
I am trying to build the fdbdoc binary using GitHub source code in macOS. But I am facing issue while building the binary.  
I have followed the below steps :  
clone the source code from GitHub  
cd /fdb document layer source code directory/  
mkdir build && cd build  
cmake -DBOOST\_ROOT=/tmp/boost\_1\_67\_0/ …  
make  
The issue I faced “tls.h” file not found  
then I make below changes in makefile which it is in the foundationdb source directory.  
CFLAGS + = -I/path-to-libressl/include  
then “tls.h” file issue is solved.  
but after that, I am facing issue showed below in image:

 ![issue_macOS](https://global.discourse-cdn.com/foundationdb/original/1X/76769ab88ca1305f1bd84d4844a1af77c228e501.png)

Is there any specific way to build the fdbdoc binary in macOS? Or is it possible to build using docker like linux? Please let me know

---

<div class="post-metadata">

### Author: ![alexmiller](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/alexmiller/32/326_2.png) [@alexmiller](https://forums.foundationdb.org/u/alexmiller)
#### Post date: [July 19, 2019, 12:31pm UTC](https://forums.foundationdb.org/t/regarding-issue-facing-while-try-to-build-fdbdoc-binary-in-macos/1530/2 "2019-07-19T12:31:49Z")

</div>

This is a dependency inherited from FoundationDB code, and there’s a small bit about [LibreSSL on MacOS in the README there](https://github.com/apple/foundationdb/#macos), that covers how to install LibreSSL and set `-DLibreSSL_ROOT` to tell CMake how to find it. Does that get you building?

---

<div class="post-metadata">

### Author: ![pragawaran](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pragawaran](https://forums.foundationdb.org/u/pragawaran)
#### Post date: [July 19, 2019, 1:27pm UTC](https://forums.foundationdb.org/t/regarding-issue-facing-while-try-to-build-fdbdoc-binary-in-macos/1530/3 "2019-07-19T13:27:27Z")

</div>

@alexmiller Thanks for reply,  
I tried that steps which you refer  
cmake -DBOOST\_ROOT=/tmp/boost\_1\_67\_0/ -DLibreSSL\_ROOT=/usr/local/Cellar/libressl/2.9.2/ …

but it show Cmake warning like this

 ![issue_macOS_libressl](https://global.discourse-cdn.com/foundationdb/original/1X/322f448456308215b21e9fefc1cd30d422ebe7a9.png)

please tell how to resolve this issue  
Thanks in advance

---

<div class="post-metadata">

### Author: ![markus.pilman](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/markus.pilman/32/379_2.png) [@markus.pilman](https://forums.foundationdb.org/u/markus.pilman)
#### Post date: [July 20, 2019, 7:57pm UTC](https://forums.foundationdb.org/t/regarding-issue-facing-while-try-to-build-fdbdoc-binary-in-macos/1530/4 "2019-07-20T19:57:00Z")

</div>

I am not very familiar with the fdb document layer, but it looks like the document layer doesn’t use cmake to build FoundationDB (instead it relies on `make`). This is probably why this cmake variable doesn’t have an effect for you.

If I were you I would take the short path:

1. For now you can build without TLS - if you set the environment variable `TLS_DISABLED` to something while `cmake` is running, it will fix your issue.
2. You then probably want to create an issue on the github project (the document layer project, not foundationdb). The make-based build system will probably go away soon so this will need to be fixed anyways.

Without TLS you should at least be able to use the document layer for local development and testing. If you need TLS support, it will probably be slightly harder to get it working. If you are familiar enough with `cmake` you could probably fix it yourself and make a PR.

I am not familiar enough with the `make`-based build system that FDB uses. I took a quick look and couldn’t find a proper way to tell it where to find LibreSSL. If you do, you could change the following lines in `cmake/FlowConfig.cmake`:

```auto
if(NOT TLS_DISABLED)
    message(STATUS Building FDB with TLS bits)
    set(FDB_BUILD_COMMAND BOOSTDIR=${Boost_INCLUDE_DIRS} $(MAKE) flow fdb_flow fdb_c fdbmonitor FDBLibTLS fdbrpc)
    set(FDB_SERVER_BUILD_COMMAND $(MAKE) fdbserver fdbcli)
else()
    set(FDB_BUILD_COMMAND BOOSTDIR=${Boost_INCLUDE_DIRS} $(MAKE) flow fdb_flow fdb_c fdbmonitor TLS_DISABLED=1)
    set(FDB_SERVER_BUILD_COMMAND $(MAKE) fdbserver fdbcli TLS_DISABLED=1)
endif()

```

Maybe @mbhaskar knows a better work-around (or maybe there’s already a proper way of doing this that I am not aware of)?

---

<div class="post-metadata">

### Author: ![alexmiller](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/alexmiller/32/326_2.png) [@alexmiller](https://forums.foundationdb.org/u/alexmiller)
#### Post date: [July 21, 2019, 12:41am UTC](https://forums.foundationdb.org/t/regarding-issue-facing-while-try-to-build-fdbdoc-binary-in-macos/1530/5 "2019-07-21T00:41:38Z")

</div>

The TLS\_DISABLED lines in the document layer are

> <https://github.com/FoundationDB/fdb-document-layer/blob/7f9622ddfc783dd630f487d909a8ce37a0b8302d/CMakeLists.txt#L39-46>

And the Makefile build system handles setting libressl location via TLS\_LIBDIR

> <https://github.com/apple/foundationdb/blob/c70e762f0e3a215dffc062bf43ad5d6559388c60/Makefile#L48>

---

<div class="post-metadata">

### Author: ![pragawaran](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pragawaran](https://forums.foundationdb.org/u/pragawaran)
#### Post date: [July 23, 2019, 10:38am UTC](https://forums.foundationdb.org/t/regarding-issue-facing-while-try-to-build-fdbdoc-binary-in-macos/1530/6 "2019-07-23T10:38:25Z")

</div>

Thanks @alexmiller @markus.pilman,  
Able to build fdbdoc binary, after setting environment variable TLS\_DISABLED=ON.
