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

avrdude: update dependencies and head build #102264

Closed
wants to merge 1 commit into from

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented May 25, 2022

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@cho-m cho-m added do not merge in progress Stale bot should stay away labels May 25, 2022
Comment on lines 39 to +40
depends_on "hidapi"
depends_on "libftdi0"
depends_on "libhid"
depends_on "libusb-compat"
depends_on "libftdi"
depends_on "libusb"
Copy link
Member Author

Choose a reason for hiding this comment

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

Build instructions mention using newer/maintained variants at https://github.com/avrdudes/avrdude/wiki/Building-AVRDUDE-for-macOS and https://github.com/avrdudes/avrdude/wiki/General-Build-Instructions though may need to check if feature-complete.

  • libusb vs libusb-compat
  • hidapi vs libhid
  • libftdi vs libftdi0

Copy link
Member

Choose a reason for hiding this comment

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

BSD is GPL-compatible, so elftoolchain should be fine.

Comment on lines -50 to +46
depends_on "libelf"
depends_on "libelf" => :build
Copy link
Member Author

@cho-m cho-m May 25, 2022

Choose a reason for hiding this comment

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

I think this only uses libelf.a (no dynamic lib in formula). Could also consider disabling ELF feature since not sure how to handle unmaintained libelf. Was previously looking at elftoolchain but not ideal to mix BSD license while elfutils doesn't build on macOS. Upstream does have its own repo copy of libelf but mainly for Windows build.

if build.head?
inreplace "bootstrap", /libtoolize/, "glibtoolize"
system "./bootstrap"
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
Copy link
Member Author

@cho-m cho-m May 25, 2022

Choose a reason for hiding this comment

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

Note that this only builds static lib. Was trying -DBUILD_SHARED_LIBS=ON but hit some undefined symbols and haven't had time to debug it. Though, only using cmake on HEAD since this is what upstream recommends while tarball only has autoconf files. So, may not be too important about libs.

Copy link
Member

Choose a reason for hiding this comment

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

Try -undefined dynamic_lookup for undefined symbols.

@cho-m cho-m marked this pull request as ready for review May 25, 2022 20:49
@cho-m cho-m removed in progress Stale bot should stay away do not merge labels May 25, 2022
@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Jun 16, 2022
@cho-m cho-m added in progress Stale bot should stay away and removed stale No recent activity labels Jun 16, 2022
@cho-m cho-m force-pushed the avrdude-updates branch from d4e8994 to f92d7d7 Compare June 17, 2022 07:26
@cho-m cho-m added ready to merge PR can be merged once CI is green and removed in progress Stale bot should stay away labels Jun 17, 2022
@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@mcuee
Copy link

mcuee commented Jun 18, 2022

@cho-m You need to add back libusb-compat, if not many programmers will not be supported, so far only usbasp supports libusb-1.0.

mcuee@mcuees-Mac-mini bin % brew info avrdude
avrdude: stable 7.0 (bottled), HEAD
Atmel AVR MCU programmer
https://www.nongnu.org/avrdude/
/opt/homebrew/Cellar/avrdude/7.0_1 (9 files, 2.3MB) *
  Poured from bottle on 2022-06-18 at 09:07:46
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/avrdude.rb
License: GPL-2.0-or-later
==> Dependencies
Build: libelf ✔
Required: hidapi ✔, libftdi ✔, libusb ✔
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 3,389 (30 days), 8,720 (90 days), 34,016 (365 days)
install-on-request: 1,488 (30 days), 3,914 (90 days), 15,446 (365 days)
build-error: 2 (30 days)

mcuee@mcuees-Mac-mini bin % avrdude -p m2560 -c usbtiny -vv 

avrdude: Version 7.0
         Copyright (c) Brian Dean, http://www.bdmicro.com/
         Copyright (c) Joerg Wunsch

         System wide configuration file is "/opt/homebrew/Cellar/avrdude/7.0_1/bin/../etc/avrdude.conf"
         User configuration file is "/Users/mcuee/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: error: no usb support. Please compile again with libusb installed.
avrdude: opening programmer "usbtiny" on port "usb" failed

avrdude done.  Thank you.

Ref:

@cho-m cho-m mentioned this pull request Jun 18, 2022
6 tasks
@github-actions github-actions bot added the outdated PR was locked due to age label Jul 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2022
@cho-m cho-m deleted the avrdude-updates branch September 18, 2022 06:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants