-
Notifications
You must be signed in to change notification settings - Fork 145
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
libelf deprecation on macOS #1653
Comments
What is the replacement library recommended by Homebrew project? |
As of now, I do not know of any plans to use an alternative library for the avrdude project. BTW, for Windows MSVC build, we have a local version of libelf. |
Google says a potential "replacement" of libelf is elfutils. But then Homebrew says it is Linux only. |
Windows MSVC build: local fork version of the legacy libelf. Windows: MSYS2 mingw uses legacy libelf. macOS: Macports uses legacy libelf macOS: Homebrew still uses legacy libelf now but mark as deprecated. Debian Linux -- using elfutils to provide libelf Arch Linux -- using elfutils to provide libelf FreeBSD/OpenBSD -- using elftoolchain to provide libelf NetBSD seems to be still using legacy libelf. |
Looks like there is no easy replacement of libelf for macOS now. So I think this may not be an easy task and we may not be able to deal with it anytime soon. |
Macports have a port of elftoolchain. |
I think it is from Homebrew project point of view. Homebrew supports macOS (normal Homebrew) and Linux. As of now, it seems Homebrew only supports elfutils under Linux and not macOS. |
We need to check if it works for the purpose of avrdude though. If it works, then the solution is to ask Homebrew to provide elftoolchain. |
Under FreeBSD, the (OS-provided) elftoolchain does the job. I no longer reference any 3rd-party ELF library in the devel/avrdude port. Either way, my main point was, don't deprecate something unless there's a replacement which is at least as good as the deprecated item. FreeBSD still also offers the old libelf port (rather than kicking it out), but of course, installing it would conflict with elfutils then. You can only install one of those, because they install files into the same place. |
Thanks for the advance warning @iMichka. I agree with @dl8dtl that it seems unfortunate to deprecate elflib without an obvious replacement. AVR elf files won't have changed in the last decade or so, so that a library reading them doesn't need to be "new". @mcuee @MCUdude Is is possible to drop the reliance of MacOS on libelf before the new AVRDUDE release next week? |
I think we should stick to libelf on macOS with avrdude 7.3 release. Then we can explore the alternative for avrdude 7.4 release. |
I just took a look at elftoolchain macports and it is not in a good shape -- failed under Apple Silicon and almost no users (2 downloads in 30 days). macports libelf is quite healthy (no issues with Apple Silicon, 641 downloads in 30 days) I think we can rule out the use of elftoolchain provided libelf as a candidate to replace libelf. |
As for elfutils, I do not see much efforts to port it to macOS. Google only finds one with the last commit date on 2019-Dec-24. Unfortunately it does not seem to build well under my Mac Mini M1 (Apple macOS 14.3 with fully updated Homebrew). Good thing is that the sub libelf source codes seem to produce a static link library
|
It's a complex situation. I have read all your comments, thanks for investigating.
That's fine, don't worry, there is no rush here.
|
There is of course another option to bundle libelf with avrdude. For example, we may use the following libelf for Windows and make it compatible with macOS. |
@iMichka I have brew/avrdude related question. Avrdude 7.3 has a new dependency; libserialport. It's being used for automatic serial port discovery. However, Brew doesn't build Avrdude with libserialport. How can we change this?
|
The forumla needs to be updated -- it is missing libserialport dependancy.
You may want to raise an issue here. BTW, I usually use HEAD (to build from latest git main source codes) so I did not notice this issue.
|
Link to Homebrew issue here.
One comment in the above issue discussion.
But apparently the above efforts to get |
From the following discussion.
|
Do you have the right for the following repo? If yes, please add me there as well. Thanks. |
I added you all. |
@mariusgreuel has done a good job that avrdude-libelf actually builds under macOS. In fact it builds on Windows, Linux and macOS with CMake. |
Remove this from avrdude 7.4 milestone since there is no active development on this topic. |
If the only issue is having source code available, then this page looks like a good new reference: |
Sooo, we are planning to release AVRDUDE 8.0 sometime soon-ish. Does anyone (ideally with a Mac!) have a plan how to deal with the libelf deprecation on macOS? @MCUdude @mcuee is it a case of installing libelf source for the Mac and linking to it statically? Just to be clear I won't be able to do that but is anyone else? |
My take is to close this issue as unplanned. Worst case is just to change our CMake script to use our own libelf repo. |
Hello
I am a maintainer of the Homebrew project and wanted to give a small heads up: we would like to deprecate libelf on macOS.
The upstream
libelf
website is gone, the remaining source code can only be through archive.org ... (since at least 2019, which was 5 years ago ...). avrdude is one of the last projects that is usinglibelf
in macOS.Are there any plans for a replacement solution on your side?
The text was updated successfully, but these errors were encountered: