Skip to content

Compilation on Linux fails | message "/usr/bin/ld.bfd: cannot find -ludev" #10

Description

@Ricky-Tigg
  • flashprog v. 1.5
  • OS: Linux; Fedora (immutable)

Hello.

Installation of required and optional components

$ sudo dnf install gcc git meson make pkgconf \
{pciutils,libpciaccess,libusb1,libftdi,libjaylink,libgpiod}{,-devel}

Summaries

Since package names vary across BSD and Linux distributions

$ dnf rq --installed --qf '%{name} v. %{version} | %{summary}\n'  \
git meson make gcc pkgconf \
{pciutils,libpciaccess,libusb1,libftdi,libjaylink,libgpiod}{,-devel}
gcc v. 16.1.1 | Various compilers (C, C++, Objective-C, ...)
git v. 2.54.0 | Fast Version Control System
libftdi v. 1.5 | Library to program and control the FTDI USB controller
libftdi-devel v. 1.5 | Header files and static libraries for libftdi
libgpiod v. 2.2.5 | C library and tools for interacting with linux GPIO char device
libgpiod-devel v. 2.2.5 | Development package for libgpiod
libjaylink v. 0.3.0 | Library for SEGGER J-Link and compatible devices
libjaylink-devel v. 0.3.0 | Development files for libjaylink
libpciaccess v. 0.16 | PCI access library
libpciaccess-devel v. 0.16 | PCI access library development package
libusb1 v. 1.0.30 | Library for accessing USB devices
libusb1-devel v. 1.0.30 | Development files for libusb1
make v. 4.4.1 | A GNU tool which simplifies the build process for users
meson v. 1.11.1 | High productivity build system
pciutils v. 3.15.0 | PCI bus related utilities
pciutils-devel v. 3.15.0 | Linux PCI development library
pkgconf v. 2.5.1 | Package compiler and linker metadata toolkit

Compilation

$ make
./util/getversion.sh: line 20: ./util/getrevision.sh: No such file or directory
./util/getversion.sh: line 36: ./util/getrevision.sh: No such file or directory
Replacing all version templates with v1.5.
Building flashprog version v1.5
C compiler found: cc (GCC) 16.1.1 20260515 (Red Hat 16.1.1-2)
Target arch: x86
Target OS: Linux
Target endian: little
Dependency libpci found: yes 3.15.0
  Checking for old "pci_get_dev()": no
  CFLAGS:
  LDFLAGS: -lpci -lresolv
Dependency libusb1 found: yes 1.0.30
  CFLAGS: -I/usr/include/libusb-1.0
  LDFLAGS: -lusb-1.0 -ludev
Dependency libjaylink found: yes 0.3.0
  CFLAGS: -I/usr/include/libusb-1.0
  LDFLAGS: -ljaylink -lusb-1.0 -ludev
Dependency NI-845x found: no
Dependency libftdi1 found: yes 1.5
  Checking for "TYPE_232H" in "enum ftdi_chip_type": yes
  CFLAGS: -I/usr/include/libftdi1 -I/usr/include/libusb-1.0
  LDFLAGS: -lftdi1 -lusb-1.0 -ludev
Dependency libgpiod found: yes 2.2.5
  CFLAGS:
  LDFLAGS: -lgpiod
Checking for header "mtd/mtd-user.h": yes
Checking for header "linux/spi/spidev.h": yes
Checking for header "linux/i2c-dev.h": yes
Checking for header "linux/i2c.h": yes
Checking for header "sys/utsname.h": yes
Checking for function "clock_gettime": yes
Checking for external "librt": yes
cc -o flashprog cli.o cli_config.o cli_wp.o cli_classic.o cli_output.o cli_common.o print.o libflashprog.a -lpci -lresolv -lusb-1.0 -ludev -lftdi1 -lusb-1.0 -ludev -lgpiod -ljaylink -lusb-1.0 -ludev -lrt
/usr/bin/ld.bfd: cannot find -ludev: No such file or directory
/usr/bin/ld.bfd: cannot find -ludev: No such file or directory
/usr/bin/ld.bfd: cannot find -ludev: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:1013: flashprog] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions