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

[MacOS] Avrdude built using autotools doesn't work #1884

Open
MCUdude opened this issue Aug 12, 2024 · 24 comments · Fixed by #1888
Open

[MacOS] Avrdude built using autotools doesn't work #1884

MCUdude opened this issue Aug 12, 2024 · 24 comments · Fixed by #1888
Labels
unconfirmed Maybe a bug, needs to be reproduced by someone else

Comments

@MCUdude
Copy link
Collaborator

MCUdude commented Aug 12, 2024

This regression must have been introduced recently. When building Avrdude using ./bootstrap && ./configure && make, I'm getting this error when trying the execute the binary:

$ ./avrdude
dyld[17397]: symbol not found in flat namespace (_elf32_getehdr)
Abort trap: 6

Not sure what's causing this. Do you have any idea @stefanrueger or @ndim?

@stefanrueger
Copy link
Collaborator

libelf depreciation in MacOS?

@MCUdude
Copy link
Collaborator Author

MCUdude commented Aug 12, 2024

I do have libelf installed. And the binary works if I build using build.sh

@ndim
Copy link
Contributor

ndim commented Aug 12, 2024

The build.sh script uses /opt/local or /opt/homebrew or such directories to look for include files and to link libraries to. The shown call to configure does not.

A simple test for this hypothesis would be to call make with CFLAGS=-I/opt/homebrew/include and especially LDFLAGS=-L/opt/homebrew/lib to on the command line.

@MCUdude
Copy link
Collaborator Author

MCUdude commented Aug 12, 2024

I tried running

$ make clean

$./bootstrap

$ ./configure

$ make CFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib

But I'm still getting the exact same error when running ./avrdude from the src folder

@mcuee mcuee added bug Something isn't working invalid This doesn't seem right and removed bug Something isn't working labels Aug 12, 2024
@mcuee
Copy link
Collaborator

mcuee commented Aug 12, 2024

@MCUdude

Your steps are wrong. The right steps are as following.

$ make clean
$./bootstrap
$ CFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib ./configure
$ make 

If I follow your step, I can see the following configuration summary output.

Configuration summary:
----------------------
DON'T HAVE libelf
DON'T HAVE libusb
DON'T HAVE libusb_1_0
DON'T HAVE libftdi1
DON'T HAVE libftdi
DON'T HAVE libhid
DON'T HAVE libhidapi
DO HAVE    libreadline
DON'T HAVE libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi

Using my steps, here is the output.

Configuration summary:
----------------------
DO HAVE    libelf
DO HAVE    libusb
DO HAVE    libusb_1_0
DO HAVE    libftdi1
DON'T HAVE libftdi
DON'T HAVE libhid
DO HAVE    libhidapi
DO HAVE    libreadline
DO HAVE    libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi

@mcuee
Copy link
Collaborator

mcuee commented Aug 13, 2024

Wiki updated.
https://github.com/avrdudes/avrdude/wiki/Building-AVRDUDE-for-macOS#building-using-auto-tools

@MCUdude
Please review the above Wiki page to see if I need to change anything. Thanks.

@mcuee mcuee closed this as completed Aug 13, 2024
@MCUdude
Copy link
Collaborator Author

MCUdude commented Aug 13, 2024

That doesn't fix the issue:

$ ./bootstrap
+ rm -rf autom4te.cache
+ LIBTOOLIZE=libtoolize
+ glibtoolize --version
+ LIBTOOLIZE=glibtoolize
+ export LIBTOOLIZE
+ autoreconf -i

$ CFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib ./configure
checking build system type... x86_64-apple-darwin21.6.0
checking host system type... x86_64-apple-darwin21.6.0
checking target system type... x86_64-apple-darwin21.6.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... mkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking versioninfo item CMAKE_PROJECT_VERSION... 7.3
checking versioninfo item CMAKE_LIBAVRDUDE_VERSION... 2.0.0
checking versioninfo item CMAKE_LIBAVRDUDE_SOVERSION... 2
checking versioninfo item GIT_COMMIT_DATE... 20240812
checking versioninfo item GIT_COMMIT_HASH... cd956e82
checking versioninfo item GIT_TAG_HASH... e599214c
checking versioninfo derived PACKAGE_VERSION... 7.3-20240812
checking versioninfo derived AVRDUDE_FULL_VERSION... 7.3-20240812 (cd956e82)
checking versioninfo derived libtool -version-info for libavrdude... 2:0:0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for gawk... (cached) awk
checking for a sed that does not truncate output... /usr/bin/sed
checking for bison... bison -y
checking for flex... flex
checking for lex output file root... lex.yy
checking for lex library... none needed
checking whether yytext is a pointer... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert x86_64-apple-darwin21.6.0 file names to x86_64-apple-darwin21.6.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin21.6.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.23... yes
checking whether yylex_destroy is generated by flex... version Apple(flex-34) => yes
checking for WSAStartup in -lws2_32... no
checking for tputs in -ltermcap... yes
checking for tputs in -lncurses... yes
checking for readline in -lreadline... yes
checking for elf_getshdrstrndx in -lelf... yes
checking for libelf.h... no
checking for libelf/libelf.h... yes
checking for library containing gethostent... none required
checking for library containing setsockopt... none required
checking for usb_get_string_simple in -lusb... yes
checking for usb.h... yes
checking for lusb0_usb.h... no
checking for libusb_init in -lusb-1.0... yes
checking for libusb-1.0/libusb.h... yes
checking for libusb.h... no
checking for libusb_init in -lusb... no
checking for libusb.h... (cached) no
checking for library containing hid_init... -lhidapi
checking for hidapi/hidapi.h... yes
checking for sp_open in -lserialport... yes
checking for libserialport.h... yes
checking for ftdi_new in -lftdi1... yes
checking for ftdi_usb_get_strings in -lftdi... no
checking for ftdi_tcioflush... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for ddk/hidsdi.h... no
checking for an ANSI C-conforming const... yes
checking for netinet/in.h... yes
checking for memset... yes
checking for select... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strtol... yes
checking for strtoul... yes
checking for gettimeofday... yes
checking for usleep... yes
checking for getaddrinfo... yes
checking for a Win32 HID library... no
checking for uint_t... no
checking for ulong_t... no
checking for serial device... unknown
checking if gcc accepts -Wno-pointer-sign ... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating doc/Makefile
config.status: creating avrdude.spec
config.status: creating Makefile
config.status: creating GNUmakefile
config.status: creating avrdude.conf.tmp
config.status: creating ac_cfg.h
config.status: executing depfiles commands
config.status: executing libtool commands


Configuration summary:
----------------------
DO HAVE    libelf
DO HAVE    libusb
DO HAVE    libusb_1_0
DO HAVE    libftdi1
DON'T HAVE libftdi
DON'T HAVE libhid
DO HAVE    libhidapi
DO HAVE    libreadline
DO HAVE    libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi

$ make
  YACC     config_gram.c
updating config_gram.h
  LEX      lexer.c
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in .
  CC       avrdude-main.o
  CC       avrdude-whereami.o
  CC       avrdude-developer_opts.o
  CC       libavrdude_la-config_gram.lo
  CC       libavrdude_la-lexer.lo
lexer.c:2378:38: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
        if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
  CC       libavrdude_la-arduino.lo
  CC       libavrdude_la-avr.lo
  CC       libavrdude_la-avr910.lo
  CC       libavrdude_la-avrcache.lo
  CC       libavrdude_la-avrftdi.lo
  CC       libavrdude_la-avrftdi_tpi.lo
  CC       libavrdude_la-avrintel.lo
  CC       libavrdude_la-avrpart.lo
  CC       libavrdude_la-avr_opcodes.lo
  CC       libavrdude_la-bitbang.lo
  CC       libavrdude_la-buspirate.lo
  CC       libavrdude_la-butterfly.lo
  CC       libavrdude_la-ch341a.lo
  CC       libavrdude_la-config.lo
  CC       libavrdude_la-confwin.lo
  CC       libavrdude_la-disasm.lo
  CC       libavrdude_la-dfu.lo
  CC       libavrdude_la-dryrun.lo
  CC       libavrdude_la-fileio.lo
  CC       libavrdude_la-flip1.lo
  CC       libavrdude_la-flip2.lo
  CC       libavrdude_la-ft245r.lo
  CC       libavrdude_la-jtagmkI.lo
  CC       libavrdude_la-jtagmkII.lo
  CC       libavrdude_la-jtag3.lo
  CC       libavrdude_la-leds.lo
  CC       libavrdude_la-linuxgpio.lo
  CC       libavrdude_la-linuxspi.lo
  CC       libavrdude_la-lists.lo
  CC       libavrdude_la-micronucleus.lo
  CC       libavrdude_la-par.lo
  CC       libavrdude_la-pgm.lo
  CC       libavrdude_la-pgm_type.lo
  CC       libavrdude_la-pickit2.lo
  CC       libavrdude_la-pindefs.lo
  CC       libavrdude_la-ppi.lo
  CC       libavrdude_la-ppiwin.lo
  CC       libavrdude_la-serbb_posix.lo
  CC       libavrdude_la-serbb_win32.lo
  CC       libavrdude_la-ser_avrdoper.lo
  CC       libavrdude_la-ser_posix.lo
  CC       libavrdude_la-ser_win32.lo
  CC       libavrdude_la-serialadapter.lo
  CC       libavrdude_la-stk500.lo
  CC       libavrdude_la-stk500v2.lo
  CC       libavrdude_la-stk500generic.lo
  CC       libavrdude_la-strutil.lo
  CC       libavrdude_la-teensy.lo
  CC       libavrdude_la-term.lo
  CC       libavrdude_la-usbasp.lo
  CC       libavrdude_la-serialupdi.lo
  CC       libavrdude_la-serprog.lo
  CC       libavrdude_la-updi_link.lo
  CC       libavrdude_la-updi_state.lo
  CC       libavrdude_la-updi_readwrite.lo
  CC       libavrdude_la-updi_nvm.lo
  CC       libavrdude_la-updi_nvm_v0.lo
  CC       libavrdude_la-updi_nvm_v2.lo
  CC       libavrdude_la-updi_nvm_v3.lo
  CC       libavrdude_la-updi_nvm_v4.lo
  CC       libavrdude_la-updi_nvm_v5.lo
  CC       libavrdude_la-urclock.lo
  CC       libavrdude_la-usb_hidapi.lo
  CC       libavrdude_la-usb_libusb.lo
  CC       libavrdude_la-usbtiny.lo
  CC       libavrdude_la-update.lo
  CC       libavrdude_la-wiring.lo
  CC       libavrdude_la-xbee.lo
  CCLD     libavrdude.la
ld: warning: directory not found for option '-L/opt/homebrew/lib'
ld: warning: -undefined dynamic_lookup may not work with chained fixups
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-confwin.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ppi.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ppiwin.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-serbb_win32.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ser_win32.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-confwin.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ppi.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ppiwin.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-serbb_win32.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ser_win32.o) has no symbols
  CCLD     avrdude
ld: warning: directory not found for option '-L/opt/homebrew/lib'
ld: warning: directory not found for option '-FCoreFoundation'

$ ./avrdude
dyld[43732]: symbol not found in flat namespace (_elf32_getehdr)
Abort trap: 6

@MCUdude
Copy link
Collaborator Author

MCUdude commented Aug 13, 2024

... But I think this warning is new:

ld: warning: directory not found for option '-L/opt/homebrew/lib'

The -FCoreFoundation one has always been there

@mcuee mcuee reopened this Aug 13, 2024
@mcuee
Copy link
Collaborator

mcuee commented Aug 13, 2024

@MCUdude

Hmm, it seems to me your Homebrew installation is broken...

I have no issues on my side.

Anyway, I have re-opened the issue.

@mcuee mcuee added unconfirmed Maybe a bug, needs to be reproduced by someone else and removed invalid This doesn't seem right labels Aug 13, 2024
@ndim
Copy link
Contributor

ndim commented Aug 14, 2024

The CI ˋbuild.ymlˋ tests (macos, msvc, mingw) should probably test that the ˋavrdudeˋ executable` which they have just built actually runs.

The native linux builds (both cmake and automake) run the ˋDryrun_testˋ stage which should check that by running ˋ./tools/test-avrdudeˋ.

Hmmm.... now that I take a look at the output for the non-cmake case, I am not sure that stage actually runs `avrdudeˋ. The script does not fail, though.

I guess I should make certain that the tools/test-avrdude script actually fails if it cannot run avrdude, and that tools/test-avrdude is run for all non-crosscompile builds (i.e. add it for macos, msvc, and mingw builds).

Then I can hopefully reproduce the linking issue on the macos CI builds, and then try to fix it.

Plan B: Ask a friend to borrow his Mac for a bit.

@stefanrueger
Copy link
Collaborator

@ndim Great plan A.

actually fails if it cannot run `avrdudeˋ

Pro tip: use the -e option to specify the path of avrdude:

$ echo | tools/test-avrdude -p "-c dryrun -p m328p" -e invalidpath || echo FAILED
test-avrdude: cannot execute invalidpath
FAILED

@MCUdude
Copy link
Collaborator Author

MCUdude commented Aug 14, 2024

We don't have to resolve this before the 8.0 release. I'm currently building using CMmake, and I'm prioritizing testing various programmers and targets. There have been quite a few regressions discovered in the JTAG3 code base, and I hope we're able to iron all these out.

@ndim
Copy link
Contributor

ndim commented Aug 15, 2024

This could be a consequence of removing the static libavrdude.a target, relying on libtool library libavrdude.la instead, which can be either shared or static.

If formerly static linking worked and now dynamic linking fails.... That could be it. Is the homebrew libelf library existing as both shared/dynamic and static, by chance?

@MCUdude
Copy link
Collaborator Author

MCUdude commented Aug 15, 2024

Is the homebrew libelf library existing as both shared/dynamic and static, by chance?

How do I check this? BTW I just tried building PR #1888 using make, but I'm still getting the same error.
And there are nothing in the /opt path. But I'm not sure there has ever been.

$ make
  YACC     config_gram.c
updating config_gram.h
  LEX      lexer.c
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in .
  CC       avrdude-main.o
  CC       avrdude-whereami.o
  CC       avrdude-developer_opts.o
  CC       libavrdude_la-config_gram.lo
  CC       libavrdude_la-lexer.lo
lexer.c:2378:38: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
        if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
  CC       libavrdude_la-arduino.lo
  CC       libavrdude_la-avr.lo
  CC       libavrdude_la-avr910.lo
  CC       libavrdude_la-avrcache.lo
  CC       libavrdude_la-avrftdi.lo
  CC       libavrdude_la-avrftdi_tpi.lo
  CC       libavrdude_la-avrintel.lo
  CC       libavrdude_la-avrpart.lo
  CC       libavrdude_la-avr_opcodes.lo
  CC       libavrdude_la-bitbang.lo
  CC       libavrdude_la-buspirate.lo
  CC       libavrdude_la-butterfly.lo
  CC       libavrdude_la-ch341a.lo
  CC       libavrdude_la-config.lo
  CC       libavrdude_la-confwin.lo
  CC       libavrdude_la-crc16.lo
  CC       libavrdude_la-disasm.lo
  CC       libavrdude_la-dfu.lo
  CC       libavrdude_la-dryrun.lo
  CC       libavrdude_la-fileio.lo
  CC       libavrdude_la-flip1.lo
  CC       libavrdude_la-flip2.lo
  CC       libavrdude_la-ft245r.lo
  CC       libavrdude_la-jtagmkI.lo
  CC       libavrdude_la-jtagmkII.lo
  CC       libavrdude_la-jtag3.lo
  CC       libavrdude_la-leds.lo
  CC       libavrdude_la-linuxgpio.lo
  CC       libavrdude_la-linuxspi.lo
  CC       libavrdude_la-lists.lo
  CC       libavrdude_la-micronucleus.lo
  CC       libavrdude_la-par.lo
  CC       libavrdude_la-pgm.lo
  CC       libavrdude_la-pgm_type.lo
  CC       libavrdude_la-pickit2.lo
  CC       libavrdude_la-pindefs.lo
  CC       libavrdude_la-ppi.lo
  CC       libavrdude_la-ppiwin.lo
  CC       libavrdude_la-serbb_posix.lo
  CC       libavrdude_la-serbb_win32.lo
  CC       libavrdude_la-ser_avrdoper.lo
  CC       libavrdude_la-ser_posix.lo
  CC       libavrdude_la-ser_win32.lo
  CC       libavrdude_la-serialadapter.lo
  CC       libavrdude_la-stk500.lo
  CC       libavrdude_la-stk500v2.lo
  CC       libavrdude_la-stk500generic.lo
  CC       libavrdude_la-strutil.lo
  CC       libavrdude_la-teensy.lo
  CC       libavrdude_la-term.lo
  CC       libavrdude_la-usbasp.lo
  CC       libavrdude_la-serialupdi.lo
  CC       libavrdude_la-serprog.lo
  CC       libavrdude_la-updi_link.lo
  CC       libavrdude_la-updi_state.lo
  CC       libavrdude_la-updi_readwrite.lo
  CC       libavrdude_la-updi_nvm.lo
  CC       libavrdude_la-updi_nvm_v0.lo
  CC       libavrdude_la-updi_nvm_v2.lo
  CC       libavrdude_la-updi_nvm_v3.lo
  CC       libavrdude_la-updi_nvm_v4.lo
  CC       libavrdude_la-updi_nvm_v5.lo
  CC       libavrdude_la-urclock.lo
  CC       libavrdude_la-usb_hidapi.lo
  CC       libavrdude_la-usb_libusb.lo
  CC       libavrdude_la-usbtiny.lo
  CC       libavrdude_la-update.lo
  CC       libavrdude_la-wiring.lo
  CC       libavrdude_la-xbee.lo
  CCLD     libavrdude.la
ld: warning: directory not found for option '-L/opt/homebrew/lib'
ld: warning: -undefined dynamic_lookup may not work with chained fixups
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-confwin.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ppi.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ppiwin.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-serbb_win32.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ser_win32.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-confwin.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ppi.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ppiwin.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-serbb_win32.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libavrdude.a(libavrdude_la-ser_win32.o) has no symbols
  CCLD     avrdude
ld: warning: directory not found for option '-L/opt/homebrew/lib'
ld: warning: directory not found for option '-FCoreFoundation'

$ ./avrdude 
dyld[43872]: symbol not found in flat namespace (_elf32_getehdr)
Abort trap: 6

@ndim
Copy link
Contributor

ndim commented Aug 15, 2024

On the GitHub macos worker, brew list libelf shows only a static library libelf.a, with no shared library:

2024-08-15T15:39:52.4785210Z /opt/homebrew/Cellar/libelf/0.8.13_1/INSTALL_RECEIPT.json
2024-08-15T15:39:52.4786510Z /opt/homebrew/Cellar/libelf/0.8.13_1/.brew/libelf.rb
2024-08-15T15:39:52.4787480Z /opt/homebrew/Cellar/libelf/0.8.13_1/ChangeLog
2024-08-15T15:39:52.4788550Z /opt/homebrew/Cellar/libelf/0.8.13_1/include/libelf/libelf.h
2024-08-15T15:39:52.4789750Z /opt/homebrew/Cellar/libelf/0.8.13_1/include/libelf/elf_repl.h
2024-08-15T15:39:52.4791070Z /opt/homebrew/Cellar/libelf/0.8.13_1/include/libelf/nlist.h
2024-08-15T15:39:52.4792260Z /opt/homebrew/Cellar/libelf/0.8.13_1/include/libelf/sys_elf.h
2024-08-15T15:39:52.4793490Z /opt/homebrew/Cellar/libelf/0.8.13_1/include/libelf/gelf.h
2024-08-15T15:39:52.4794570Z /opt/homebrew/Cellar/libelf/0.8.13_1/sbom.spdx.json
2024-08-15T15:39:52.4812880Z /opt/homebrew/Cellar/libelf/0.8.13_1/README
2024-08-15T15:39:52.4814010Z /opt/homebrew/Cellar/libelf/0.8.13_1/COPYING.LIB
2024-08-15T15:39:52.4815100Z /opt/homebrew/Cellar/libelf/0.8.13_1/lib/pkgconfig/libelf.pc
2024-08-15T15:39:52.4816410Z /opt/homebrew/Cellar/libelf/0.8.13_1/lib/locale/de/LC_MESSAGES/libelf.cat
2024-08-15T15:39:52.4817670Z /opt/homebrew/Cellar/libelf/0.8.13_1/lib/libelf.a

So dyld looking for symbols (_elf32_getehdr) and not finding them appears wrong, so linking the avrdude executable has been doing something wrong.

@ndim
Copy link
Contributor

ndim commented Aug 15, 2024

OK... let's continue this after 8.0 with finding out how the homebrew on @MCUdude's mac differs from the github worker (brew list libelf, and what is the prefix to which all the files from the Cellar are linked to).

If we are lucky, just switching to using pkg-config for finding all dependencies which provide a .pc file (and libelf is one of them) might already happen to bring the proper linker flags, but that is a thing for after the upcoming 8.0 release weekend.

@mcuee
Copy link
Collaborator

mcuee commented Aug 16, 2024

As mentioned, I do not have issues with my Mac Mini M1 with Homebrew (both Apple Silicon and x86_64). I tend to think @MCUdude's homebrew installation is broken...

Maybe there are permission problems of sub-directories under '/opt/homebrew', say /opt/homebrew/lib.

ld: warning: directory not found for option '-L/opt/homebrew/lib'

@MCUdude

Please help to post the output of the following command. Thanks.

ls -la /opt/homebrew

@mcuee
Copy link
Collaborator

mcuee commented Aug 16, 2024

@ndim and @MCUdude

build.sh is a bit strange but somehow it works so I have never bothered to look further.

            # Apple M1 (may be new version of homebrew also)
            if [ -d /opt/homebrew ]
            then
                build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/opt/homebrew/include -D CMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/Cellar"
            else
                build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/usr/local/include -D CMAKE_EXE_LINKER_FLAGS=-L/usr/local/Cellar"
            fi

@mcuee
Copy link
Collaborator

mcuee commented Aug 16, 2024

@MCUdude

Can you try the following configure option to be in line with build.sh?

CFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/Cellar ./configure

@mcuee
Copy link
Collaborator

mcuee commented Aug 22, 2024

Here is my build log under macOS.

avrdude_main/src - (main)> ./bootstrap 
+ rm -rf autom4te.cache
+ LIBTOOLIZE=libtoolize
+ glibtoolize --version
+ LIBTOOLIZE=glibtoolize
+ export LIBTOOLIZE
+ autoreconf -i

avrdude_main/src - (main)> CFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib ./configure
checking build system type... aarch64-apple-darwin23.5.0
checking host system type... aarch64-apple-darwin23.5.0
checking target system type... aarch64-apple-darwin23.5.0
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking whether sleep supports fractional seconds... yes
checking filesystem timestamp resolution... 2
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /opt/homebrew/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking xargs -n works... yes
checking versioninfo item CMAKE_PROJECT_VERSION... 7.3
checking versioninfo item CMAKE_LIBAVRDUDE_VERSION... 2.0.0
checking versioninfo item CMAKE_LIBAVRDUDE_SOVERSION... 2
checking versioninfo item GIT_COMMIT_DATE... 20240822
checking versioninfo item GIT_COMMIT_HASH... a9594622
checking versioninfo item GIT_TAG_HASH... e599214c
checking versioninfo derived PACKAGE_VERSION... 7.3-20240822
checking versioninfo derived AVRDUDE_FULL_VERSION... 7.3-20240822 (a9594622)
checking versioninfo derived libtool -version-info for libavrdude... 2:0:0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for gawk... (cached) gawk
checking for a sed that does not truncate output... /usr/bin/sed
checking for bison... bison -y
checking for flex... flex
checking for lex output file root... lex.yy
checking for lex library... none needed
checking whether yytext is a pointer... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert aarch64-apple-darwin23.5.0 file names to aarch64-apple-darwin23.5.0 format... func_convert_file_noop
checking how to convert aarch64-apple-darwin23.5.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... ld: warning: -single_module is obsolete
no
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin23.5.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /opt/homebrew/bin/pkg-config
checking pkg-config is at least version 0.23... yes
checking whether yylex_destroy is generated by flex... version Apple(flex-34) => yes
checking for WSAStartup in -lws2_32... no
checking for tputs in -ltermcap... yes
checking for tputs in -lncurses... yes
checking for readline in -lreadline... yes
checking for elf_getshdrstrndx in -lelf... yes
checking for libelf.h... no
checking for libelf/libelf.h... yes
checking for library containing gethostent... none required
checking for library containing setsockopt... none required
checking for usb_get_string_simple in -lusb... yes
checking for usb.h... yes
checking for lusb0_usb.h... no
checking for libusb_init in -lusb-1.0... yes
checking for libusb-1.0/libusb.h... yes
checking for libusb.h... no
checking for libusb_init in -lusb... no
checking for libusb.h... (cached) no
checking for library containing hid_init... -lhidapi
checking for hidapi/hidapi.h... yes
checking for sp_open in -lserialport... yes
checking for libserialport.h... yes
checking for ftdi_new in -lftdi1... yes
checking for ftdi_usb_get_strings in -lftdi... no
checking for ftdi_tcioflush... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for ddk/hidsdi.h... no
checking for an ANSI C-conforming const... yes
checking for netinet/in.h... yes
checking for memset... yes
checking for select... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strtol... yes
checking for strtoul... yes
checking for gettimeofday... yes
checking for usleep... yes
checking for getaddrinfo... yes
checking for a Win32 HID library... no
checking for uint_t... no
checking for ulong_t... no
checking for serial device... unknown
checking if gcc accepts -Wno-pointer-sign ... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating doc/Makefile
config.status: creating avrdude.spec
config.status: creating Makefile
config.status: creating GNUmakefile
config.status: creating avrdude.conf.tmp
config.status: creating ac_cfg.h
config.status: executing depfiles commands
config.status: executing libtool commands


Configuration summary:
----------------------
DO HAVE    libelf
DO HAVE    libusb
DO HAVE    libusb_1_0
DO HAVE    libftdi1
DON'T HAVE libftdi
DON'T HAVE libhid
DO HAVE    libhidapi
DO HAVE    libreadline
DO HAVE    libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi

avrdude_main/src - (main)> make
  YACC     config_gram.c
updating config_gram.h
  LEX      lexer.c
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in .
  CC       avrdude-main.o
  CC       avrdude-whereami.o
  CC       avrdude-developer_opts.o
  CC       libavrdude_la-config_gram.lo
  CC       libavrdude_la-lexer.lo
lexer.c:2378:38: warning: comparison of integers of different signs: 'yy_size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
        if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
  CC       libavrdude_la-arduino.lo
  CC       libavrdude_la-avr.lo
  CC       libavrdude_la-avr910.lo
  CC       libavrdude_la-avrcache.lo
  CC       libavrdude_la-avrftdi.lo
  CC       libavrdude_la-avrftdi_tpi.lo
  CC       libavrdude_la-avrintel.lo
  CC       libavrdude_la-avrpart.lo
  CC       libavrdude_la-avr_opcodes.lo
  CC       libavrdude_la-bitbang.lo
  CC       libavrdude_la-buspirate.lo
  CC       libavrdude_la-butterfly.lo
  CC       libavrdude_la-ch341a.lo
  CC       libavrdude_la-config.lo
  CC       libavrdude_la-confwin.lo
  CC       libavrdude_la-crc16.lo
  CC       libavrdude_la-disasm.lo
  CC       libavrdude_la-dfu.lo
  CC       libavrdude_la-dryrun.lo
  CC       libavrdude_la-fileio.lo
  CC       libavrdude_la-flip1.lo
  CC       libavrdude_la-flip2.lo
  CC       libavrdude_la-ft245r.lo
  CC       libavrdude_la-jtagmkI.lo
  CC       libavrdude_la-jtagmkII.lo
  CC       libavrdude_la-jtag3.lo
  CC       libavrdude_la-leds.lo
  CC       libavrdude_la-linuxgpio.lo
  CC       libavrdude_la-linuxspi.lo
  CC       libavrdude_la-lists.lo
  CC       libavrdude_la-micronucleus.lo
  CC       libavrdude_la-par.lo
  CC       libavrdude_la-pgm.lo
  CC       libavrdude_la-pgm_type.lo
  CC       libavrdude_la-pickit2.lo
  CC       libavrdude_la-pickit5_updi_lut.lo
  CC       libavrdude_la-pickit5.lo
  CC       libavrdude_la-pindefs.lo
  CC       libavrdude_la-ppi.lo
  CC       libavrdude_la-ppiwin.lo
  CC       libavrdude_la-serbb_posix.lo
  CC       libavrdude_la-serbb_win32.lo
  CC       libavrdude_la-ser_avrdoper.lo
  CC       libavrdude_la-ser_posix.lo
  CC       libavrdude_la-ser_win32.lo
  CC       libavrdude_la-serialadapter.lo
  CC       libavrdude_la-stk500.lo
  CC       libavrdude_la-stk500v2.lo
  CC       libavrdude_la-stk500generic.lo
  CC       libavrdude_la-strutil.lo
  CC       libavrdude_la-teensy.lo
  CC       libavrdude_la-term.lo
  CC       libavrdude_la-usbasp.lo
  CC       libavrdude_la-serialupdi.lo
  CC       libavrdude_la-serprog.lo
  CC       libavrdude_la-updi_link.lo
  CC       libavrdude_la-updi_state.lo
  CC       libavrdude_la-updi_readwrite.lo
  CC       libavrdude_la-updi_nvm.lo
  CC       libavrdude_la-updi_nvm_v0.lo
  CC       libavrdude_la-updi_nvm_v2.lo
  CC       libavrdude_la-updi_nvm_v3.lo
  CC       libavrdude_la-updi_nvm_v4.lo
  CC       libavrdude_la-updi_nvm_v5.lo
  CC       libavrdude_la-urclock.lo
  CC       libavrdude_la-usb_hidapi.lo
  CC       libavrdude_la-usb_libusb.lo
  CC       libavrdude_la-usbtiny.lo
  CC       libavrdude_la-update.lo
  CC       libavrdude_la-wiring.lo
  CC       libavrdude_la-xbee.lo
  CCLD     libavrdude.la
  CCLD     avrdude
ld: warning: search path 'CoreFoundation' not found

@mcuee
Copy link
Collaborator

mcuee commented Aug 22, 2024

The produced binay is also working.

avrdude_main/src - (main)> ./avrdude 
Usage: avrdude [options]
Options:
  -p <partno>            Specify AVR device; -p ? lists all known parts
  -p <wildcard>/<flags>  Run developer options for matched AVR devices,
                         e.g., -p ATmega328P/s or /S for part definition
  -b <baudrate>          Override RS-232 baud rate
  -B <bitclock>          Specify bit clock period (us)
  -C <config-file>       Specify location of configuration file
  -C +<config-file>      Specify additional config file, can be repeated
  -N                     Do not load config file 
  -c <programmer>        Specify programmer; -c ? and -c ?type list all
  -c <wildcard>/<flags>  Run developer options for matched programmers,
                         e.g., -c 'ur*'/s for programmer info/definition
  -A                     Disable trailing-0xff removal for file/AVR read
  -D                     Disable auto-erase for flash memory; implies -A
  -i <delay>             ISP Clock Delay [in microseconds]
  -P <port>              Connection; -P ?s or -P ?sa lists serial ones
  -r                     Reconnect to -P port after "touching" it; wait
                         400 ms for each -r; needed for some USB boards
  -F                     Override invalid signature or initial checks
  -e                     Perform a chip erase at the beginning
  -O                     Perform RC oscillator calibration (see AVR053)
  -t                     Run an interactive terminal when it is its turn
  -T <terminal cmd line> Run terminal line when it is its turn
  -U <memstr>:r|w|v:<filename>[:format]
                         Carry out memory operation when it is its turn
                         Multiple -t, -T and -U options can be specified
  -n                     Do not write to the device whilst processing -U
  -V                     Do not automatically verify during -U
  -E <exitsp>[,<exitsp>] List programmer exit specifications
  -x <extended_param>    Pass <extended_param> to programmer, see -x help
  -v                     Verbose output; -v -v for more
  -q                     Quell progress output; -q -q for less
  -l logfile             Use logfile rather than stderr for diagnostics
  -?                     Display this usage

avrdude version 7.3-20240822 (a9594622), https://github.com/avrdudes/avrdude

avrdude_main/src - (main)> otool -L .libs/avrdude 
.libs/avrdude:
	/usr/local/lib/libavrdude.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	/opt/homebrew/opt/libusb/lib/libusb-1.0.0.dylib (compatibility version 5.0.0, current version 5.0.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/opt/homebrew/opt/libusb-compat/lib/libusb-0.1.4.dylib (compatibility version 9.0.0, current version 9.4.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 2420.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
	/opt/homebrew/opt/libserialport/lib/libserialport.0.dylib (compatibility version 2.0.0, current version 2.0.0)
	/opt/homebrew/opt/hidapi/lib/libhidapi.0.dylib (compatibility version 0.0.0, current version 0.14.0)
	/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/opt/homebrew/opt/libftdi/lib/libftdi1.2.dylib (compatibility version 2.0.0, current version 2.5.0)

avrdude_main/src - (main)> otool -L .libs/libavrdude.dylib 
.libs/libavrdude.dylib:
	/usr/local/lib/libavrdude.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	/opt/homebrew/opt/hidapi/lib/libhidapi.0.dylib (compatibility version 0.0.0, current version 0.14.0)
	/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/opt/homebrew/opt/libftdi/lib/libftdi1.2.dylib (compatibility version 2.0.0, current version 2.5.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)

@mcuee
Copy link
Collaborator

mcuee commented Aug 22, 2024

BTW, homebrew formular may need a bit of change if they want the Python bindings to be installed. Somehow it does not work under my system.

/Users/mcuee > brew reinstall avrdude
==> Fetching avrdude
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/87e96013a1516e59f51557fdc5a601a7e3a31f83/Formula/a/avrdude.rb
Already downloaded: /Users/mcuee/Library/Caches/Homebrew/downloads/d3be2565908b1a01a220498639939b4c1c3ce08d2b3aede5f3e6a7cf3d04a6b1--avrdude.rb
==> Cloning https://github.com/avrdudes/avrdude.git
Updating /Users/mcuee/Library/Caches/Homebrew/avrdude--git
==> Checking out branch main
Already on 'main'
Your branch is up to date with 'origin/main'.
HEAD is now at a9594622 Document: remove one more place where Windows parallel ports are mentioned
==> Reinstalling avrdude 
==> cmake -S . -B build/shared -DCMAKE_INSTALL_SYSCONFDIR=/opt/homebrew/etc -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_RPATH=@loader_path/../lib -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-undefined,dy
==> cmake --build build/shared
==> cmake --install build/shared
Last 15 lines from /Users/mcuee/Library/Logs/Homebrew/avrdude/03.cmake:
-- Installing: /opt/homebrew/Cellar/avrdude/HEAD-a959462/lib/libavrdude.dylib
-- Installing: /opt/homebrew/Cellar/avrdude/HEAD-a959462/include/libavrdude.h
-- Installing: /opt/homebrew/Cellar/avrdude/HEAD-a959462/include/libavrdude-avrintel.h
-- Installing: /opt/homebrew/etc/avrdude.conf
-- Installing: /opt/homebrew/Cellar/avrdude/HEAD-a959462/share/man/man1/avrdude.1
-- Installing: /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/_swig_avrdude.so
CMake Error at build/shared/src/cmake_install.cmake:119 (file):
  file INSTALL cannot copy file
  "/tmp/avrdude-20240822-18309-1scuh2/build/shared/src/_swig_avrdude.so" to
  "/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/_swig_avrdude.so":
  Operation not permitted.
Call Stack (most recent call first):
  build/shared/cmake_install.cmake:42 (include)



READ THIS: https://docs.brew.sh/Troubleshooting

avrdude's formula was built from an unstable upstream --HEAD.
This build failure is expected behaviour.
Do not create issues about this on Homebrew's GitHub repositories.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

@ndim
Copy link
Contributor

ndim commented Aug 24, 2024

This issue has not been resolved. The automatic closing of this issue is an unintended byproduct of the automation.

Could someone with enough karma points reopen this?

@stefanrueger stefanrueger reopened this Aug 24, 2024
@mcuee
Copy link
Collaborator

mcuee commented Nov 10, 2024

@MCUdude

Please help to try again to see if you still have issues or not.

I can not reproduct the issue and I actually believe it is more of a problem of your macOS system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed Maybe a bug, needs to be reproduced by someone else
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants