Giter VIP home page Giter VIP logo

Comments (19)

ndim avatar ndim commented on August 20, 2024 1

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.

from avrdude.

stefanrueger avatar stefanrueger commented on August 20, 2024 1

@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

from avrdude.

MCUdude avatar MCUdude commented on August 20, 2024 1

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.

from avrdude.

ndim avatar ndim commented on August 20, 2024 1

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.

from avrdude.

mcuee avatar mcuee commented on August 20, 2024 1

@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

from avrdude.

stefanrueger avatar stefanrueger commented on August 20, 2024

libelf depreciation in MacOS?

from avrdude.

MCUdude avatar MCUdude commented on August 20, 2024

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

from avrdude.

ndim avatar ndim commented on August 20, 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.

from avrdude.

MCUdude avatar MCUdude commented on August 20, 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

from avrdude.

mcuee avatar mcuee commented on August 20, 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

from avrdude.

mcuee avatar mcuee commented on August 20, 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.

from avrdude.

MCUdude avatar MCUdude commented on August 20, 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

from avrdude.

MCUdude avatar MCUdude commented on August 20, 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

from avrdude.

mcuee avatar mcuee commented on August 20, 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.

from avrdude.

ndim avatar ndim commented on August 20, 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?

from avrdude.

MCUdude avatar MCUdude commented on August 20, 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

from avrdude.

ndim avatar ndim commented on August 20, 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.

from avrdude.

mcuee avatar mcuee commented on August 20, 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

from avrdude.

mcuee avatar mcuee commented on August 20, 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

from avrdude.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.