Error compiling mbedtls while following Pi-hole docs

I’m trying to get setup to compile FTL locally following the instructions in the docs. I’m using a RPI 4 running Ubuntu 24.04 LTS and I’m running into trouble with mbedtls. I have successfully used these instructions in the past and was able to compile FTL previously.

Expected Behaviour:

mbedtls compiles without error while following Pi-hole guide here: https://docs.pi-hole.net/ftldns/compile/#compile-libmbedtls-from-source

Actual Behaviour:

mbedtls won’t compile. Sequence below:

pi@pi:~$ wget https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v3.6.4.tar.gz -O mbedtls-3.6.4.tar.gz
--2025-10-17 06:45:32--  https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v3.6.4.tar.gz
Resolving github.com (github.com)... 140.82.116.4
Connecting to github.com (github.com)|140.82.116.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/Mbed-TLS/mbedtls/tar.gz/refs/tags/v3.6.4 [following]
--2025-10-17 06:45:33--  https://codeload.github.com/Mbed-TLS/mbedtls/tar.gz/refs/tags/v3.6.4
Resolving codeload.github.com (codeload.github.com)... 140.82.116.10
Connecting to codeload.github.com (codeload.github.com)|140.82.116.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘mbedtls-3.6.4.tar.gz’

mbedtls-3.6.4.tar.gz                       [       <=>                                                                   ]   5.35M  4.03MB/s    in 1.3s    

2025-10-17 06:45:34 (4.03 MB/s) - ‘mbedtls-3.6.4.tar.gz’ saved [5608889]

pi@pi:~$ tar -xzf mbedtls-3.6.4.tar.gz
pi@pi:~$ cd mbedtls-3.6.4
pi@pi:~/mbedtls-3.6.4$ sed -i '/#define MBEDTLS_THREADING_C/s*^//**g' include/mbedtls/mbedtls_config.h
pi@pi:~/mbedtls-3.6.4$ sed -i '/#define MBEDTLS_THREADING_PTHREAD/s*^//**g' include/mbedtls/mbedtls_config.h
pi@pi:~/mbedtls-3.6.4$ make -j $(nproc)
Makefile:19: *** /framework/exported.make not found (and does not appear to be a git checkout). Please ensure you have downloaded the right archive from the release page on GitHub..  Stop.

Debug Token:

https://tricorder.pi-hole.net/Uo6jJFWH/

I can compile and install the previous mbedtls 3.5.0 by following the instructions but FTL won’t compile on it:

[100%] Building C object src/api/docs/CMakeFiles/api_docs.dir/docs.c.o
[100%] Built target ftl_lua
[100%] Built target api_docs
[100%] Linking C executable ../pihole-FTL
/usr/bin/ld: webserver/civetweb/CMakeFiles/civetweb.dir/civetweb.c.o: in function `mbed_sslctx_set_ciphersuites':
/home/pi/FTL/src/webserver/civetweb/mod_mbedtls.inl:99:(.text+0x9d74): undefined reference to `mbedtls_ssl_ciphersuite_get_id'
collect2: error: ld returned 1 exit status
gmake[2]: *** [src/CMakeFiles/pihole-FTL.dir/build.make:487: pihole-FTL] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:477: src/CMakeFiles/pihole-FTL.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

I’m assuming I need a newer version of mbedtls but I’ can’t figure out what I need to fix to compile it.

This is the code we use to build mbedtls

1 Like

Thank you. That was the hint I needed.

I think the current Pi-hole docs point to a different archive??

Here are the commands I used that successfully compiled on my RPI5.

pi@pi5:~$ wget https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.5/mbedtls-3.6.5.tar.bz2

pi@pi5:~$ tar -xjf mbedtls-3.6.5.tar.bz2

pi@pi5:~$ cd mbedtls-3.6.5/

pi@pi5:~/mbedtls-3.6.5$ sed -i '/#define MBEDTLS_THREADING_C/s*^//**g' include/mbedtls/mbedtls_config.h

pi@pi5:~/mbedtls-3.6.5$ sed -i '/#define MBEDTLS_THREADING_PTHREAD/s*^//**g' include/mbedtls/mbedtls_config.h

pi@pi5:~/mbedtls-3.6.5$ sed -i '/#define MBEDTLS_AESNI_C/s*^*//*g' include/mbedtls/mbedtls_config.h

pi@pi5:~/mbedtls-3.6.5$ make -j $(nproc)

pi@pi5:~/mbedtls-3.6.5$ sudo make install

Interesting. We changed the docs recently with Update FTL compiling docs by DL6ER · Pull Request #1286 · pi-hole/docs · GitHub

The only difference I can see is that we use 3.6.4 vs 3.6.5 and that your used ‘….releases/download/’ where the docs point to ‘…/archive/refs/tags‘.

I hope there is no difference in their files between the release and their tag with the same version.

Yeah, they appear to be the same. I don’t know what the difference is but it worked.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.