Skip to content

Conversation

lucarin91
Copy link
Contributor

@lucarin91 lucarin91 commented May 19, 2025

The repository wasn't compiling anymore due to some updates in the Ubuntu image.
The core changes are:

  • Fix build issue (in particular, using an older clang-13)
  • Update libusb and libusb-compact
  • Add libxml2library
  • Add a configure_toolchain.sh script to easily select the toolchain to use
  • Disable FTDI library for now

You can now select a cross compiler by setting the CROSS_COMPILE env variable, for instance

docker run -it --rm -e CROSS_COMPILE=aarch64-linux-gnu -v $PWD:/workdir ghcr.io/arduino/crossbuild:<version>

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the build environment by upgrading to libusb 1.0.28, adding libxml2, fixing Ubuntu build issues, and centralizing toolchain selection.

  • Remove outdated MSVC project files and old libusb docs
  • Update build_libs.sh to bump libusb/libusb-compat and add libxml2 build
  • Introduce configure_toolchain.sh and switch Dockerfiles to Ubuntu 22.04 with clang-13

Reviewed Changes

Copilot reviewed 299 out of 299 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
deps/libusb-1.0.26/msvc/* Remove legacy Visual Studio project and filter files
deps/libusb-1.0.26/libusb/* Delete version_nano.h and darwin_usb.h (macOS backend)
deps/libusb-1.0.26/INSTALL Remove detailed install instructions
deps/build_libs.sh Bump libusb versions, comment out CMake step, add libxml2
configure_toolchain.sh New script to set CC, CXX, and related toolchain vars
Taskfile.yml Exclude deps/*, simplify shell-file detection
Dockerfile Switch to Ubuntu 22.04, install clang-13, add symlinks
Comments suppressed due to low confidence (5)

deps/libusb-1.0.26/libusb/version_nano.h:1

  • Removal of version_nano.h deletes the LIBUSB_NANO definition; any code checking this macro will now fail. Please update or replace this version constant to match the new libusb release.
#define LIBUSB_NANO 11724

deps/libusb-1.0.26/libusb/os/darwin_usb.h:1

  • The entire Darwin USB backend header was removed, so any macOS builds will break due to missing darwin_usb.h. Restore this file or update the macOS build path accordingly.
/* darwin backend for libusb 1.0 */

deps/libusb-1.0.26/INSTALL:1

  • [nitpick] The INSTALL file was deleted, removing valuable installation guidance. Consider keeping or relocating these instructions in a project-level docs/ directory.
Installation Instructions

Dockerfile:8

  • Typo in comment: "Intall" should be "Install".
# Intall clang compiler used by macos

Taskfile.yml:118

  • [nitpick] Combine the -name tests with -type using parentheses to ensure the intended precedence, e.g., ( -name '*.bash' -o -name '*.sh' ) -a -type f.
-                -name '*.bash' -or -name '*.sh' -and -type f

@lucarin91 lucarin91 merged commit ae977ed into main May 19, 2025
11 of 13 checks passed
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels May 20, 2025
@per1234 per1234 deleted the updates branch May 20, 2025 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants