Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] qmk setup fails on Fedora 39 due to missing package 'dfu-programmer' #22773

Closed
2 tasks
jbergler opened this issue Dec 28, 2023 · 5 comments · Fixed by #22945
Closed
2 tasks

[Bug] qmk setup fails on Fedora 39 due to missing package 'dfu-programmer' #22773

jbergler opened this issue Dec 28, 2023 · 5 comments · Fixed by #22945

Comments

@jbergler
Copy link

Describe the Bug

Executing the main install command from util/install/fedora.sh

% sudo dnf install \
        clang diffutils git gcc glibc-headers kernel-devel kernel-headers \
        make unzip wget zip python3 avr-binutils avr-gcc avr-gcc-c++ avr-libc \
        arm-none-eabi-binutils-cs arm-none-eabi-gcc-cs arm-none-eabi-gcc-cs-c++ \
        arm-none-eabi-newlib avrdude dfu-programmer dfu-util hidapi

Last metadata expiration check: 0:15:42 ago on Thu 28 Dec 2023 20:02:28.
Package diffutils-3.10-3.fc39.x86_64 is already installed.
Package git-2.43.0-1.fc39.x86_64 is already installed.
Package gcc-13.2.1-6.fc39.x86_64 is already installed.
Package glibc-devel-2.38-14.fc39.x86_64 is already installed.
Package kernel-devel-6.6.6-200.fc39.x86_64 is already installed.
Package kernel-devel-6.6.7-200.fc39.x86_64 is already installed.
Package kernel-devel-6.6.8-200.fc39.x86_64 is already installed.
Package kernel-headers-6.6.3-200.fc39.x86_64 is already installed.
Package make-1:4.4.1-2.fc39.x86_64 is already installed.
Package unzip-6.0-62.fc39.x86_64 is already installed.
Package wget-1.21.3-7.fc39.x86_64 is already installed.
Package zip-3.0-39.fc39.x86_64 is already installed.
Package python3-3.12.1-2.fc39.x86_64 is already installed.
Package avr-binutils-1:2.40-3.fc39.x86_64 is already installed.
Package avr-gcc-1:13.1.0-2.fc39.x86_64 is already installed.
Package arm-none-eabi-binutils-cs-1:2.40-2.fc39.x86_64 is already installed.
Package arm-none-eabi-gcc-cs-1:13.1.0-2.fc39.x86_64 is already installed.
No match for argument: dfu-programmer
Error: Unable to find a match: dfu-programmer

I can't find this package in Fedora 39.

As a workaround, removing dfu-programmer from the list and re-running qmk setup at least gets things to a stage where we can compile.

Keyboard Used

No response

Link to product page (if applicable)

No response

Operating System

Fedora 39

qmk doctor Output

~/co/qmk_firmware % qmk doctor
Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.1.2
Ψ QMK home: /home/jbergler/co/qmk_firmware
Ψ Detected Linux (Fedora Linux 39 (Workstation Edition)).
⚠ Missing or outdated udev rules for 'atmel-dfu' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'kiibohd' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'stm32-dfu' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'apm32-dfu' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'gd32v-dfu' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'wb32-dfu' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'bootloadhid' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'usbasploader' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'usbtinyisp' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'md-boot' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.
⚠ Missing or outdated udev rules for 'caterina' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'hid-bootloader' boards. Run 'sudo cp /home/jbergler/co/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
Ψ Userspace enabled: False
Ψ Git branch: main
Ψ Repo version: 0.23.2
Ψ - Latest main: 2023-12-28 12:37:01 +0800 (420b13468b) -- [Keyboard] Add meetlab kafkasplit (#22756)
Ψ - Latest upstream/master: 2023-12-28 12:37:01 +0800 (420b13468b) -- [Keyboard] Add meetlab kafkasplit (#22756)
Ψ - Latest upstream/develop: 2023-12-28 04:37:34 +0000 (73f962766e) -- Merge remote-tracking branch 'origin/master' into develop
Ψ - Common ancestor with upstream/master: 2023-12-28 12:37:01 +0800 (420b13468b) -- [Keyboard] Add meetlab kafkasplit (#22756)
Ψ - Common ancestor with upstream/develop: 2023-12-28 12:37:01 +0800 (420b13468b) -- [Keyboard] Add meetlab kafkasplit (#22756)
☒ Can't find dfu-programmer in your path.
Would you like to install dependencies? [Y/n] y
Installing dependencies
Last metadata expiration check: 0:20:46 ago on Thu 28 Dec 2023 20:02:28.
Package clang-17.0.6-1.fc39.x86_64 is already installed.
Package diffutils-3.10-3.fc39.x86_64 is already installed.
Package git-2.43.0-1.fc39.x86_64 is already installed.
Package gcc-13.2.1-6.fc39.x86_64 is already installed.
Package glibc-devel-2.38-14.fc39.x86_64 is already installed.
Package kernel-devel-6.6.6-200.fc39.x86_64 is already installed.
Package kernel-devel-6.6.7-200.fc39.x86_64 is already installed.
Package kernel-devel-6.6.8-200.fc39.x86_64 is already installed.
Package kernel-headers-6.6.3-200.fc39.x86_64 is already installed.
Package make-1:4.4.1-2.fc39.x86_64 is already installed.
Package unzip-6.0-62.fc39.x86_64 is already installed.
Package wget-1.21.3-7.fc39.x86_64 is already installed.
Package zip-3.0-39.fc39.x86_64 is already installed.
Package python3-3.12.1-2.fc39.x86_64 is already installed.
Package avr-binutils-1:2.40-3.fc39.x86_64 is already installed.
Package avr-gcc-1:13.1.0-2.fc39.x86_64 is already installed.
Package avr-gcc-c++-1:13.1.0-2.fc39.x86_64 is already installed.
Package avr-libc-2.0.0-20.fc39.noarch is already installed.
Package arm-none-eabi-binutils-cs-1:2.40-2.fc39.x86_64 is already installed.
Package arm-none-eabi-gcc-cs-1:13.1.0-2.fc39.x86_64 is already installed.
Package arm-none-eabi-gcc-cs-c++-1:13.1.0-2.fc39.x86_64 is already installed.
Package arm-none-eabi-newlib-4.3.0.20230120-4.fc39.noarch is already installed.
Package avrdude-6.4-6.fc39.x86_64 is already installed.
No match for argument: dfu-programmer
Package dfu-util-0.11-5.fc39.x86_64 is already installed.
Package hidapi-0.14.0-2.fc39.x86_64 is already installed.
Error: Unable to find a match: dfu-programmer
Last metadata expiration check: 0:20:48 ago on Thu 28 Dec 2023 20:02:28.
No match for argument: libusb-devel
Error: Unable to find a match: libusb-devel
Last metadata expiration check: 0:20:50 ago on Thu 28 Dec 2023 20:02:28.
Package libusb1-devel-1.0.26-3.fc39.x86_64 is already installed.
Package libusb-compat-0.1-devel-0.1.8-5.fc39.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Requirement already satisfied: appdirs in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 2)) (1.4.4)
Requirement already satisfied: argcomplete in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 3)) (3.2.1)
Requirement already satisfied: colorama in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 4)) (0.4.6)
Requirement already satisfied: dotty-dict in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 5)) (1.3.1)
Requirement already satisfied: hid in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 6)) (1.0.5)
Requirement already satisfied: hjson in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 7)) (3.1.0)
Requirement already satisfied: jsonschema>=4 in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 8)) (4.20.0)
Requirement already satisfied: milc>=1.4.2 in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 9)) (1.6.8)
Requirement already satisfied: pygments in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 10)) (2.17.2)
Requirement already satisfied: pyserial in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 11)) (3.5)
Requirement already satisfied: pyusb in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 12)) (1.2.1)
Requirement already satisfied: pillow in /home/jbergler/.local/lib/python3.11/site-packages (from -r /home/jbergler/co/qmk_firmware/requirements.txt (line 13)) (10.1.0)
Requirement already satisfied: attrs>=22.2.0 in /home/jbergler/.local/lib/python3.11/site-packages (from jsonschema>=4->-r /home/jbergler/co/qmk_firmware/requirements.txt (line 8)) (23.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /home/jbergler/.local/lib/python3.11/site-packages (from jsonschema>=4->-r /home/jbergler/co/qmk_firmware/requirements.txt (line 8)) (2023.12.1)
Requirement already satisfied: referencing>=0.28.4 in /home/jbergler/.local/lib/python3.11/site-packages (from jsonschema>=4->-r /home/jbergler/co/qmk_firmware/requirements.txt (line 8)) (0.32.0)
Requirement already satisfied: rpds-py>=0.7.1 in /home/jbergler/.local/lib/python3.11/site-packages (from jsonschema>=4->-r /home/jbergler/co/qmk_firmware/requirements.txt (line 8)) (0.15.2)
Requirement already satisfied: halo in /home/jbergler/.local/lib/python3.11/site-packages (from milc>=1.4.2->-r /home/jbergler/co/qmk_firmware/requirements.txt (line 9)) (0.0.31)
Requirement already satisfied: spinners in /home/jbergler/.local/lib/python3.11/site-packages (from milc>=1.4.2->-r /home/jbergler/co/qmk_firmware/requirements.txt (line 9)) (0.0.24)
Requirement already satisfied: log-symbols>=0.0.14 in /home/jbergler/.local/lib/python3.11/site-packages (from halo->milc>=1.4.2->-r /home/jbergler/co/qmk_firmware/requirements.txt (line 9)) (0.0.14)
Requirement already satisfied: termcolor>=1.1.0 in /home/jbergler/.local/lib/python3.11/site-packages (from halo->milc>=1.4.2->-r /home/jbergler/co/qmk_firmware/requirements.txt (line 9)) (2.4.0)
Requirement already satisfied: six>=1.12.0 in /home/jbergler/.local/lib/python3.11/site-packages (from halo->milc>=1.4.2->-r /home/jbergler/co/qmk_firmware/requirements.txt (line 9)) (1.16.0)

[notice] A new release of pip is available: 23.3.1 -> 23.3.2
[notice] To update, run: pip install --upgrade pip
☒ Can't find dfu-programmer in your path.
Ψ Found arm-none-eabi-gcc version 13.1.0
Ψ Found avr-gcc version 13.1.0
⚠ We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.
Ψ Found avrdude version 6.4
⚠ Unknown version for dfu-programmer
Ψ Found dfu-util version 0.11
Ψ Submodules are up to date.
Ψ Submodule status:
Ψ - lib/chibios: 2023-04-15 13:48:04 +0000 --  (11edb1610)
Ψ - lib/chibios-contrib: 2023-07-17 11:39:05 +0200 --  (da78eb37)
Ψ - lib/googletest: 2021-06-11 06:37:43 -0700 --  (e2239ee6)
Ψ - lib/lufa: 2022-08-26 12:09:55 +1000 --  (549b97320)
Ψ - lib/vusb: 2022-06-13 09:18:17 +1000 --  (819dbc1)
Ψ - lib/printf: 2022-06-29 23:59:58 +0300 --  (c2e3b4e)
Ψ - lib/pico-sdk: 2023-02-12 20:19:37 +0100 --  (a3398d8)
Ψ - lib/lvgl: 2022-04-11 04:44:53 -0600 --  (e19410f8)
Ψ Major problems detected, please fix these problems before proceeding.
Ψ Check out the FAQ (https://docs.qmk.fm/#/faq_build) or join the QMK Discord (https://discord.gg/Uq7gcHh) for help.

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

@remembertoremind
Copy link

I also have issues with Debian, CentOS and Arch Linux. Seems like the whole qmk setup is borked.

@fauxpark
Copy link
Member

fauxpark commented Jan 6, 2024

This is something you should take up with the respective distro packagers; it's not a QMK issue and there's not much we can do about it if they don't provide the package.

dfu-programmer is still there on Arch: https://archlinux.org/packages/extra/x86_64/dfu-programmer/
And on Debian: https://packages.debian.org/bookworm/dfu-programmer

The last release for Fedora was for 38: https://packages.fedoraproject.org/pkgs/dfu-programmer/dfu-programmer/
it seems like it has been marked as orphan, so will need someone to pick it up.

@fauxpark fauxpark closed this as completed Jan 6, 2024
@sigprof
Copy link
Contributor

sigprof commented Jan 6, 2024

One option here is to make the installation of dfu-programmer optional (similar to what we do for the RISC-V toolchain on Debian-like distros), so that qmk setup at least does something reasonable on Fedora 39; qmk doctor would still complain though.

In theory it could be possible to use avrdude -c flip1 instead of dfu-programmer, but apparently that implementation does not have an equivalent for dfu-programmer MCU reset or dfu-programmer MCU start, therefore it may be inconvenient to use unless the actual bootloader implementation is qmk-dfu (which supports using a keypress to exit the bootloader).

@remembertoremind
Copy link

dfu-programmer is still there on Arch: https://archlinux.org/packages/extra/x86_64/dfu-programmer/ And on Debian: https://packages.debian.org/bookworm/dfu-programmer

You are right. I didn't have time to write a more extensive report and didn't think it would fit in this issue. I'll look into it tomorrow and create a new issue.

@jonochurch
Copy link

jonochurch commented May 14, 2024

Just came across this bug while attempting to install on Fedora 40 which came out a couple of weeks ago - I checked the install file at util/install/fedora.sh and found there is a workaround added to change the install for Fedora 39 but doesn't work for F40. Changing it to "$VERSION_ID"== "40" made it work for me

`_qmk_install() {
echo "Installing dependencies"
. /etc/os-release
if [ "$VERSION_ID" == "39" ]; then
sudo dnf $SKIP_PROMPT copr enable erovia/dfu-programmer
fi

# TODO: Check whether devel/headers packages are really needed
sudo dnf $SKIP_PROMPT install \
    clang diffutils git gcc glibc-headers kernel-devel kernel-headers \
    make unzip wget zip python3 avr-binutils avr-gcc avr-gcc-c++ avr-libc \
    arm-none-eabi-binutils-cs arm-none-eabi-gcc-cs arm-none-eabi-gcc-cs-c++ \
    arm-none-eabi-newlib avrdude dfu-programmer dfu-util hidapi

# Handle discrepancies between different Fedora versions
sudo dnf $SKIP_PROMPT install libusb-devel \
    || sudo dnf $SKIP_PROMPT install libusb1-devel libusb-compat-0.1-devel \
    || sudo dnf $SKIP_PROMPT install libusb0-devel
python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants