Building on a Debian 9.4 amd64 system (up-to-date as of 3 day ago), with the official debian libftdi-dev package installed, which is at version 0.20-4. The infnoise software Makefile chose the wrong linker flag, apparently. Here's the output of make:
/bin/sh: 1: ldconfig: not found
cc -Wall -Wextra -Werror -std=c99 -O3 -I Keccak -I /usr/include/libftdi1 -DGIT_VERSION=\"Fourth-OshPark-Prototype-250-gfc0d99f\" -DGIT_COMMIT=\"fc0d99f58fff60b5cb7dca583f4bbcc60e1f63a2\" -DGIT_DATE=\"2018-04-10T06:52:23+02:00\" -DBUILD_DATE=\"2018-04-21T01:09:01-04:00\" -o infnoise infnoise.c healthcheck.c writeentropy.c daemon.c Keccak/KeccakF-1600-reference.c -lftdi1 -lm -lrt
/usr/bin/ld: cannot find -lftdi1
collect2: error: ld returned 1 exit status
Makefile:24: recipe for target 'infnoise' failed
make: *** [infnoise] Error 1
On Debian systems, ldconfig is found in /sbin, which is not in my unprivileged user's path. So the invocation of ldconfig failed, the FOUND variable was left empty, and thus the FTDI variable was set to -lftdi1 rather than -lftdi.
I changed the invocation of ldconfig to /sbin/ldconfig and the compilation was successful.
I notice that libftdi-config is installed in /usr/bin. When I run it as libftdi-config --libs, it prints -L/usr/lib/x86_64-linux-gnu -lftdi -lusb. That may be a more robust way to find the linker arguments.
https://github.com/waywardgeek/infnoise/blob/fc0d99f58fff60b5cb7dca583f4bbcc60e1f63a2/software/Makefile#L14
Building on a Debian 9.4 amd64 system (up-to-date as of 3 day ago), with the official debian libftdi-dev package installed, which is at version 0.20-4. The infnoise software Makefile chose the wrong linker flag, apparently. Here's the output of
make
:On Debian systems,
ldconfig
is found in/sbin
, which is not in my unprivileged user's path. So the invocation ofldconfig
failed, the FOUND variable was left empty, and thus the FTDI variable was set to-lftdi1
rather than-lftdi
.I changed the invocation of
ldconfig
to/sbin/ldconfig
and the compilation was successful.I notice that
libftdi-config
is installed in/usr/bin
. When I run it aslibftdi-config --libs
, it prints-L/usr/lib/x86_64-linux-gnu -lftdi -lusb
. That may be a more robust way to find the linker arguments.Thank you!