FTLDNS upgrade failed - solved

After waiting for pihole v4.0 hoping it will fix FTLDNS beta test failed ive decided to upgrade from v3.3.1 on my tomato r7000 chrooted debian, unfortunately it still failed to start, same issue with before.

We'll need a debug token to be able to help with diagnosing the issue.

I can't even start pihole-FTL

root@gw:~# /etc/init.d/pihole-FTL start
Not running

Failed to set capabilities on file `/usr/bin/pihole-FTL' (Operation not supported)

sh: 1: /usr/bin/pihole-FTL: not found

looks like im gonna be stuck at v3.3.1

What command(s) did you run to change from FTLDNS to V4.0?

i did pihole -up from version 3.3.1 to v4.0

Your chrooted Debian does not support Linux capabilities. We have a fix for this in the pipeline:

applied this fix Start pihole-FTL as root if capabilities are not supported by the system by DL6ER · Pull Request #2378 · pi-hole/pi-hole · GitHub and got no such file or directory issue even though pihole-FTL exist in /usr/bin/

root@gw:~# /etc/init.d/pihole-FTL start
root@b-12-l-14-gw:/# /etc/init.d/pihole-FTL start
Not running

Failed to set capabilities on file `/usr/bin/pihole-FTL' (Operation not supported)

Warning: Starting pihole-FTL as root because setting capabilities is not supported on this system
/etc/init.d/pihole-FTL: line 44: /usr/bin/pihole-FTL: No such file or directory

root@gw:~# /usr/bin/pihole-FTL
bash: /usr/bin/pihole-FTL: No such file or directory

root@b-12-l-14-gw:~# ls -alh /usr/bin/pihole-FTL
-rwxr-xr-x 1 root root 3.9M Aug 19 23:50 /usr/bin/pihole-FTL

root@b-12-l-14-gw:/# pihole -v
Pi-hole version is v4.0 (Latest: v4.0)
AdminLTE version is v4.0 (Latest: v4.0)
/opt/pihole/version.sh: line 19: /usr/bin/pihole-FTL: No such file or directory
Latest FTL version is v4.0

root@gw:/# uname -m
armv7l

root@gw:/# ldd /bin/ls | grep -E '^\s*/lib' | awk '{ print $1 }'
/lib/ld-linux.so.3

root@b-12-l-14-gw:/# ldd -v /usr/bin/pihole-FTL
not a dynamic executable

root@b-12-l-14-gw:/# sha1sum /usr/bin/pihole-FTL
88e7e5d394991b304eb1379a256b87f12ec56f0c /usr/bin/pihole-FTL

Run file /usr/bin/pihole-FTL

root@gw:/# file /usr/bin/pihole-FTL
/usr/bin/pihole-FTL: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x14d7d02e1c5f2df1f49b190cba436ca4a9659c59, not stripped

Please run file on some other binary on your system, for example,

file "$(which dnsmasq)"

so we take a look at what is needed for your system.

The binary that got downloaded for you is the one compiled for ARM on the Raspberry Pi 2 and up (ARMv7, Broadcom BCM2836). If the processor of your router is ARMv7 but, e.g., doesn't support hard-float, you'll need to install pihole-FTL from source so it can be compiled specifically for your system.

We prepared instructions for how to do this here and have already some positive feedback where user followed this guide and succeeded compiling pihole-FTL for devices like the Pogoplug.

Or, alternatively to installing it from source, you may want to first try the binary for the Raspberry Pi 1B (ARMv6, no hardfloat):

wget https://github.com/pi-hole/FTL/releases/download/v4.0/pihole-FTL-arm-linux-gnueabi
sudo mv pihole-FTL-arm-linux-gnueabi /usr/bin/pihole-FTL
sudo chmod +x /usr/bin/pihole-FTL

root@gw:~# file /usr/sbin/lighttpd
/usr/sbin/lighttpd: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x5961fd57e21f27f89bd5a057055d8bd1fcb7fc80, stripped

root@gw:~# file /usr/sbin/dnsmasq
/usr/sbin/dnsmasq: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xaa697380c47dc68428447c6070f9a74b9da1b238, stripped

root@gw:~# file /usr/sbin/nginx
/usr/sbin/nginx: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xa9e1b6dda571277971fc640bbe15cd12af315e3f, stripped

pihole-FTL-arm-linux-gnueabi is the binary currently installed on my system

What is the output of

ldd /usr/bin/pihole-FTL | grep -E '^\s*/lib' | awk '{ print $1 }'

?

Okay.

After all, I assume that the libs on your router are incompatible with what pihole-FTL is compiled for (/lib/ld-linux-armhf.so.3) as this file is missing. You may succeed when you create a symlink /lib/ld-linux-armhf.so.3 pointing to /lib/ld-linux.so.3.

Compiling from source with the instructions I linked earlier is the best solution and will be an almost guaranteed success.

no output on ldd
root@gw:/lib# ldd /usr/bin/pihole-FTL | grep -E '^\s*/lib' | awk '{ print $1 }'
root@gw:/lib#

Okay, how about
ldd /usr/bin/pihole-FTL

root@gw:~# ldd /usr/bin/pihole-FTL
not a dynamic executable
root@b-12-l-14-gw:~#

got segmentation fault error after symlinking linux-armhf.so.3 to ld-linux.so.3

root@gw:~# /etc/init.d/pihole-FTL start
Not running

Failed to set capabilities on file `/usr/bin/pihole-FTL' (Operation not supported)

Warning: Starting pihole-FTL as root because setting capabilities is not supported on this system
/etc/init.d/pihole-FTL: line 25: 7243 Segmentation fault pihole-FTL

Okay, so compiling pihole-FTL locally seems to be the option then.

compiling halted at
memory.c:35:1: error: (near initialization for 'counters.blocked') [-Werror=missing-field-initializers]
cc1: all warnings being treated as errors
make: *** [obj/memory.o] Error 1
make: *** Waiting for unfinished jobs....

looks like im going back to my solid v.3.3.1 :smiley:

Okay .. this should not have happened. Have you cloned the most recent master branch? Which version of gcc are you using?

This is the reason why you're seeing this:

You can tell gcc to not treat warnings as errors

remove the -Werror in Makefile.