avrdudes / avrdude

AVRDUDE is a utility to program AVR microcontrollers
GNU General Public License v2.0
760 stars 139 forks source link

Warnings when build under NetBSD 10 and OpenBSD 7.5 #1904

Closed mcuee closed 3 months ago

mcuee commented 3 months ago

There are some compiler warnings.

@stefanrueger Please take a look. Probably not so important.

Build log:

netbsd10vm$ cc -v
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/libexec/lto-wrapper
Target: x86_64--netbsd
Configured with: /usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=x86_64--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/support/send-pr.html --with-pkgversion='NetBSD nb2 20230710' --with-system-zlib --without-isl --enable-__cxa_atexit --enable-libstdcxx-time=rt --enable-libstdcxx-threads --with-diagnostics-color=auto-if-env --with-tune=nocona --with-default-libstdcxx-abi=new --with-mpc-lib=/var/obj/mknative/amd64-x86_64/usr/src/external/lgpl3/mpc/lib/libmpc --with-mpfr-lib=/var/obj/mknative/amd64-x86_64/usr/src/external/lgpl3/mpfr/lib/libmpfr --with-gmp-lib=/var/obj/mknative/amd64-x86_64/usr/src/external/lgpl3/gmp/lib/libgmp --with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src --with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/x86_64 --enable-tls --disable-multilib --disable-libstdcxx-pch --build=x86_64--netbsd --host=x86_64--netbsd --with-sysroot=/var/obj/mknative/amd64-x86_64/usr/src/destdir.amd64
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.5.0 (nb3 20231008)
netbsd10vm$ uname -a
NetBSD netbsd10vm.localdomain 10.0 NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

netbsd10vm$ ./build.sh
-- The C compiler identification is GNU 10.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /usr/pkg/bin/git (found version "2.45.2")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found YACC: /usr/bin/yacc
-- Looking for libelf.h
-- Looking for libelf.h - found
-- Looking for libelf/libelf.h
-- Looking for libelf/libelf.h - found
-- Looking for usb.h
-- Looking for usb.h - found
-- Looking for lusb0_usb.h
-- Looking for lusb0_usb.h - not found
-- Looking for libusb.h
-- Looking for libusb.h - not found
-- Looking for libusb-1.0/libusb.h
-- Looking for libusb-1.0/libusb.h - found
-- Looking for hidapi/hidapi.h
-- Looking for hidapi/hidapi.h - found
-- Looking for ftdi_tcioflush
-- Looking for ftdi_tcioflush - found
-- Could NOT find SWIG: Found unsuitable version "1.3.38", but required is at least "4.0" (found /usr/pkg/bin/swig, found components: python)
-- Configuration summary:
-- ----------------------
-- DO HAVE    libelf
-- DO HAVE    libusb
-- DO HAVE    libusb_1_0
-- DO HAVE    libhidapi
-- DO HAVE    libftdi (but prefer to use libftdi1)
-- DO HAVE    libftdi1
-- DO HAVE    libreadline
-- DO HAVE    libserialport
-- DISABLED   doc
-- DISABLED   parport
-- DISABLED   linuxgpio
-- DISABLED   linuxspi
-- DON'T HAVE swig+Python3
-- ----------------------
-- Configuring done (1.3s)
-- Generating done (0.0s)
-- Build files have been written to: /home/mcuee/build/avr/avrdude/build_netbsd
[  1%] Generating avrdude.conf
[  1%] Built target conf
[  2%] [FLEX][Parser] Building scanner with flex 2.6.4
[  3%] [YACC][Parser] Building parser with yacc
[  4%] Building C object src/CMakeFiles/libavrdude.dir/arduino.c.o
[  6%] Building C object src/CMakeFiles/libavrdude.dir/avr.c.o
[  7%] Building C object src/CMakeFiles/libavrdude.dir/avr910.c.o
[  8%] Building C object src/CMakeFiles/libavrdude.dir/avrcache.c.o
[  9%] Building C object src/CMakeFiles/libavrdude.dir/avrftdi.c.o
[ 11%] Building C object src/CMakeFiles/libavrdude.dir/avrftdi_tpi.c.o
[ 12%] Building C object src/CMakeFiles/libavrdude.dir/avrintel.c.o
[ 13%] Building C object src/CMakeFiles/libavrdude.dir/avr_opcodes.c.o
[ 14%] Building C object src/CMakeFiles/libavrdude.dir/avrpart.c.o
[ 16%] Building C object src/CMakeFiles/libavrdude.dir/bitbang.c.o
[ 17%] Building C object src/CMakeFiles/libavrdude.dir/buspirate.c.o
[ 18%] Building C object src/CMakeFiles/libavrdude.dir/butterfly.c.o
[ 19%] Building C object src/CMakeFiles/libavrdude.dir/ch341a.c.o
[ 20%] Building C object src/CMakeFiles/libavrdude.dir/config.c.o
[ 22%] Building C object src/CMakeFiles/libavrdude.dir/confwin.c.o
[ 23%] Building C object src/CMakeFiles/libavrdude.dir/crc16.c.o
[ 24%] Building C object src/CMakeFiles/libavrdude.dir/disasm.c.o
In file included from /home/mcuee/build/avr/avrdude/src/disasm.c:42:
/home/mcuee/build/avr/avrdude/src/disasm.c: In function 'output_references':
/home/mcuee/build/avr/avrdude/src/disasm.c:457:38: warning: array subscript has type 'char' [-Wchar-subscripts]
  457 |   disasm_out("; %c%s from ", toupper(*m), m + 1);
      |                                      ^
/home/mcuee/build/avr/avrdude/src/avrdude.h:95:106: note: in definition of macro 'term_out'
   95 | #define term_out(...)       avrdude_message2(stdout, __LINE__, __FILE__, __func__, MSG2_FLUSH, MSG_INFO, __VA_ARGS__)
      |                                                                                                          ^~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/disasm.c:457:3: note: in expansion of macro 'disasm_out'
  457 |   disasm_out("; %c%s from ", toupper(*m), m + 1);
      |   ^~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/disasm.c: In function 'lineout':
/home/mcuee/build/avr/avrdude/src/disasm.c:516:48: warning: array subscript has type 'char' [-Wchar-subscripts]
  516 |           str_ccprintf("%c%s from %s", toupper(*mnestr), mnestr + 1, reflist));
      |                                                ^
/home/mcuee/build/avr/avrdude/src/avrdude.h:95:106: note: in definition of macro 'term_out'
   95 | #define term_out(...)       avrdude_message2(stdout, __LINE__, __FILE__, __func__, MSG2_FLUSH, MSG_INFO, __VA_ARGS__)
      |                                                                                                          ^~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/disasm.c:515:9: note: in expansion of macro 'disasm_out'
  515 |         disasm_out("%-*s ; %s\n", commentcol(), str_ccprintf("%s:", name),
      |         ^~~~~~~~~~
[ 25%] Building C object src/CMakeFiles/libavrdude.dir/dfu.c.o
[ 27%] Building C object src/CMakeFiles/libavrdude.dir/dryrun.c.o
[ 28%] Building C object src/CMakeFiles/libavrdude.dir/fileio.c.o
[ 29%] Building C object src/CMakeFiles/libavrdude.dir/flip1.c.o
[ 30%] Building C object src/CMakeFiles/libavrdude.dir/flip2.c.o
[ 32%] Building C object src/CMakeFiles/libavrdude.dir/ft245r.c.o
[ 33%] Building C object src/CMakeFiles/libavrdude.dir/jtagmkI.c.o
[ 34%] Building C object src/CMakeFiles/libavrdude.dir/jtagmkII.c.o
[ 35%] Building C object src/CMakeFiles/libavrdude.dir/jtag3.c.o
[ 37%] Building C object src/CMakeFiles/libavrdude.dir/leds.c.o
[ 38%] Building C object src/CMakeFiles/libavrdude.dir/linuxgpio.c.o
[ 39%] Building C object src/CMakeFiles/libavrdude.dir/linuxspi.c.o
[ 40%] Building C object src/CMakeFiles/libavrdude.dir/lists.c.o
[ 41%] Building C object src/CMakeFiles/libavrdude.dir/micronucleus.c.o
[ 43%] Building C object src/CMakeFiles/libavrdude.dir/par.c.o
[ 44%] Building C object src/CMakeFiles/libavrdude.dir/pgm.c.o
[ 45%] Building C object src/CMakeFiles/libavrdude.dir/pgm_type.c.o
[ 46%] Building C object src/CMakeFiles/libavrdude.dir/pickit2.c.o
[ 48%] Building C object src/CMakeFiles/libavrdude.dir/pickit5_updi_lut.c.o
[ 49%] Building C object src/CMakeFiles/libavrdude.dir/pickit5.c.o
[ 50%] Building C object src/CMakeFiles/libavrdude.dir/pindefs.c.o
[ 51%] Building C object src/CMakeFiles/libavrdude.dir/ppi.c.o
[ 53%] Building C object src/CMakeFiles/libavrdude.dir/ppiwin.c.o
[ 54%] Building C object src/CMakeFiles/libavrdude.dir/serbb_posix.c.o
[ 55%] Building C object src/CMakeFiles/libavrdude.dir/serbb_win32.c.o
[ 56%] Building C object src/CMakeFiles/libavrdude.dir/ser_avrdoper.c.o
[ 58%] Building C object src/CMakeFiles/libavrdude.dir/ser_posix.c.o
[ 59%] Building C object src/CMakeFiles/libavrdude.dir/ser_win32.c.o
[ 60%] Building C object src/CMakeFiles/libavrdude.dir/serialadapter.c.o
[ 61%] Building C object src/CMakeFiles/libavrdude.dir/serialupdi.c.o
[ 62%] Building C object src/CMakeFiles/libavrdude.dir/serprog.c.o
[ 64%] Building C object src/CMakeFiles/libavrdude.dir/stk500.c.o
[ 65%] Building C object src/CMakeFiles/libavrdude.dir/stk500v2.c.o
[ 66%] Building C object src/CMakeFiles/libavrdude.dir/stk500generic.c.o
[ 67%] Building C object src/CMakeFiles/libavrdude.dir/strutil.c.o
In file included from /usr/include/ctype.h:100,
                 from /home/mcuee/build/avr/avrdude/src/strutil.c:27:
/home/mcuee/build/avr/avrdude/src/strutil.c: In function 'str_todata':
/home/mcuee/build/avr/avrdude/src/strutil.c:830:24: warning: array subscript has type 'char' [-Wchar-subscripts]
  830 |         switch(toupper(*p)) {
      |                        ^
/home/mcuee/build/avr/avrdude/src/strutil.c:850:31: warning: array subscript has type 'char' [-Wchar-subscripts]
  850 |         if(nu == 0 || toupper(*end_ptr) == 'U' || toupper(str[arglen - 1]) == 'U') {
      |                               ^
/home/mcuee/build/avr/avrdude/src/strutil.c:850:62: warning: array subscript has type 'char' [-Wchar-subscripts]
  850 |         if(nu == 0 || toupper(*end_ptr) == 'U' || toupper(str[arglen - 1]) == 'U') {
      |                                                              ^
/home/mcuee/build/avr/avrdude/src/strutil.c:943:34: warning: array subscript has type 'char' [-Wchar-subscripts]
  943 |     if(end_ptr != str && toupper(*end_ptr) == 'D' && end_ptr[1] == 0) {
      |                                  ^
/home/mcuee/build/avr/avrdude/src/strutil.c:954:34: warning: array subscript has type 'char' [-Wchar-subscripts]
  954 |     if(end_ptr != str && toupper(*end_ptr) == 'F' && end_ptr[1] == 0)
      |                                  ^
[ 69%] Building C object src/CMakeFiles/libavrdude.dir/teensy.c.o
[ 70%] Building C object src/CMakeFiles/libavrdude.dir/term.c.o
In file included from /usr/include/ctype.h:100,
                 from /home/mcuee/build/avr/avrdude/src/term.c:23:
/home/mcuee/build/avr/avrdude/src/term.c: In function 'readbuf':
/home/mcuee/build/avr/avrdude/src/term.c:261:29: warning: array subscript has type 'char' [-Wchar-subscripts]
  261 |   const char *cmd = tolower(**argv) == 'r'? "read": str_casestarts(*argv, "di")? "disasm": "dump";
      |                             ^
In file included from /home/mcuee/build/avr/avrdude/src/term.c:54:
/home/mcuee/build/avr/avrdude/src/term.c: In function 'printproperty':
/home/mcuee/build/avr/avrdude/src/term.c:1606:38: warning: array subscript has type 'char' [-Wchar-subscripts]
 1606 |       term_out("# %c%.*s\n", toupper(*cc[ii].t->ccomment), cclen - 1, cc[ii].t->ccomment + 1);
      |                                      ^
/home/mcuee/build/avr/avrdude/src/avrdude.h:95:106: note: in definition of macro 'term_out'
   95 | #define term_out(...)       avrdude_message2(stdout, __LINE__, __FILE__, __func__, MSG2_FLUSH, MSG_INFO, __VA_ARGS__)
      |                                                                                                          ^~~~~~~~~~~
[ 71%] Building C object src/CMakeFiles/libavrdude.dir/updi_link.c.o
[ 72%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm.c.o
[ 74%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v0.c.o
[ 75%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v2.c.o
[ 76%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v3.c.o
[ 77%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v4.c.o
[ 79%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v5.c.o
[ 80%] Building C object src/CMakeFiles/libavrdude.dir/updi_readwrite.c.o
[ 81%] Building C object src/CMakeFiles/libavrdude.dir/updi_state.c.o
[ 82%] Building C object src/CMakeFiles/libavrdude.dir/urclock.c.o
[ 83%] Building C object src/CMakeFiles/libavrdude.dir/usbasp.c.o
[ 85%] Building C object src/CMakeFiles/libavrdude.dir/usb_hidapi.c.o
[ 86%] Building C object src/CMakeFiles/libavrdude.dir/usb_libusb.c.o
[ 87%] Building C object src/CMakeFiles/libavrdude.dir/usbtiny.c.o
[ 88%] Building C object src/CMakeFiles/libavrdude.dir/update.c.o
[ 90%] Building C object src/CMakeFiles/libavrdude.dir/wiring.c.o
[ 91%] Building C object src/CMakeFiles/libavrdude.dir/xbee.c.o
[ 92%] Building C object src/CMakeFiles/libavrdude.dir/__/lexer.c.o
[ 93%] Building C object src/CMakeFiles/libavrdude.dir/__/config_gram.c.o
[ 95%] Linking C static library libavrdude.a
[ 95%] Built target libavrdude
[ 96%] Building C object src/CMakeFiles/avrdude.dir/main.c.o
[ 97%] Building C object src/CMakeFiles/avrdude.dir/developer_opts.c.o
[ 98%] Building C object src/CMakeFiles/avrdude.dir/whereami.c.o
[100%] Linking C executable avrdude
[100%] Built target avrdude

Build succeeded.

Run

sudo cmake --build build_netbsd --target install

to install.

netbsd10vm$ sudo cmake --build build_netbsd --target install
[  1%] Built target conf
[ 95%] Built target libavrdude
[100%] Built target avrdude
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/pkg/bin/avrdude
-- Set non-toolchain portion of runtime path of "/usr/pkg/bin/avrdude" to ""
-- Up-to-date: /usr/pkg/bin/elf2tag
-- Installing: /usr/pkg/lib/libavrdude.a
-- Up-to-date: /usr/pkg/include/libavrdude.h
-- Up-to-date: /usr/pkg/include/libavrdude-avrintel.h
-- Installing: /usr/pkg/etc/avrdude.conf
-- Up-to-date: /usr/pkg/man/man1/avrdude.1
netbsd10vm$ 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

netbsd10vm$ ./tools/test-avrdude  -d0 -p "-c dryrun -p m4809"
Testing /usr/pkg/bin/avrdude 7.3-20240822 (a9594622)
Prepare "-c dryrun -p m4809" and press 'enter' or 'space' to continue. Press any other key to skip
✅   0.078 s: fuse access: clear, set and read eesave fuse bit
✅   0.078 s: fuse access: set eesave fusebit to delete EEPROM on chip erase
✅   0.081 s: chip erase
✅   0.074 s: flash -U write/verify holes_rjmp_loops_49152B.hex
✅   0.086 s: flash -T write/verify holes_rjmp_loops_49152B.hex
✅   0.079 s: eeprom check whether programmer can flip 0s to 1s
✅   0.073 s: eeprom -U write/verify holes_pack_my_box_256B.hex
✅   0.087 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_256B.hex
✅   0.080 s: chip erase and spot check flash is actually erased
✅   0.083 s: spot check eeprom is erased, too
✅   0.080 s: usersig -T/-U write/read random_data_64B.bin
mcuee commented 3 months ago

@ndim and @stefanrueger

Auto-tools build for your reference as well. Looks good.

netbsd10vm$ ./bootstrap
+ rm -rf autom4te.cache
+ LIBTOOLIZE=libtoolize
+ glibtoolize --version >/dev/null 2>&1
+ export LIBTOOLIZE
+ autoreconf -i
netbsd10vm$ CFLAGS="-I/usr/pkg/include" LDFLAGS="-L/usr/pkg/lib" ./configure --prefix=/usr/pkg
checking build system type... x86_64-unknown-netbsd10.0
checking host system type... x86_64-unknown-netbsd10.0
checking target system type... x86_64-unknown-netbsd10.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... gawk
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... 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... no
checking for byacc... no
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... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
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... 196608
checking how to convert x86_64-unknown-netbsd10.0 file names to x86_64-unknown-netbsd10.0 format... func_convert_file_noop
checking how to convert x86_64-unknown-netbsd10.0 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... match_pattern /lib[^/]+(\.so|_pic\.a)$
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
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... mt
checking if mt is a manifest tool... no
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... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... NetBSD ld.elf_so
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/pkg/bin/pkg-config
checking pkg-config is at least version 0.23... yes
checking whether yylex_destroy is generated by flex... version 2.6.4 => 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... yes
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... yes
checking for libusb.h... (cached) no
checking for library containing hid_init... -lhidapi-libusb
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... yes
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 ... yes
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
DO HAVE    libftdi (but prefer to use libftdi1)
DON'T HAVE libhid
DO HAVE    libhidapi
DO HAVE    libreadline
DO HAVE    libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi
netbsd10vm$ make
  YACC     config_gram.c
updating config_gram.h
  LEX      lexer.c
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
  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
In file included from disasm.c:42:
disasm.c: In function 'output_references':
disasm.c:457:38: warning: array subscript has type 'char' [-Wchar-subscripts]
  457 |   disasm_out("; %c%s from ", toupper(*m), m + 1);
      |                                      ^
avrdude.h:95:106: note: in definition of macro 'term_out'
   95 | #define term_out(...)       avrdude_message2(stdout, __LINE__, __FILE__, __func__, MSG2_FLUSH, MSG_INFO, __VA_ARGS__)
      |                                                                                                          ^~~~~~~~~~~
disasm.c:457:3: note: in expansion of macro 'disasm_out'
  457 |   disasm_out("; %c%s from ", toupper(*m), m + 1);
      |   ^~~~~~~~~~
disasm.c: In function 'lineout':
disasm.c:516:48: warning: array subscript has type 'char' [-Wchar-subscripts]
  516 |           str_ccprintf("%c%s from %s", toupper(*mnestr), mnestr + 1, reflist));
      |                                                ^
avrdude.h:95:106: note: in definition of macro 'term_out'
   95 | #define term_out(...)       avrdude_message2(stdout, __LINE__, __FILE__, __func__, MSG2_FLUSH, MSG_INFO, __VA_ARGS__)
      |                                                                                                          ^~~~~~~~~~~
disasm.c:515:9: note: in expansion of macro 'disasm_out'
  515 |         disasm_out("%-*s ; %s\n", commentcol(), str_ccprintf("%s:", name),
      |         ^~~~~~~~~~
  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
In file included from /usr/include/ctype.h:100,
                 from strutil.c:27:
strutil.c: In function 'str_todata':
strutil.c:830:24: warning: array subscript has type 'char' [-Wchar-subscripts]
  830 |         switch(toupper(*p)) {
      |                        ^
strutil.c:850:31: warning: array subscript has type 'char' [-Wchar-subscripts]
  850 |         if(nu == 0 || toupper(*end_ptr) == 'U' || toupper(str[arglen - 1]) == 'U') {
      |                               ^
strutil.c:850:62: warning: array subscript has type 'char' [-Wchar-subscripts]
  850 |         if(nu == 0 || toupper(*end_ptr) == 'U' || toupper(str[arglen - 1]) == 'U') {
      |                                                              ^
strutil.c:943:34: warning: array subscript has type 'char' [-Wchar-subscripts]
  943 |     if(end_ptr != str && toupper(*end_ptr) == 'D' && end_ptr[1] == 0) {
      |                                  ^
strutil.c:954:34: warning: array subscript has type 'char' [-Wchar-subscripts]
  954 |     if(end_ptr != str && toupper(*end_ptr) == 'F' && end_ptr[1] == 0)
      |                                  ^
strutil.c: In function 'str_sprintf':
strutil.c:251:10: warning: null destination pointer [-Wformat-truncation=]
  251 |   size = vsnprintf(NULL, size, fmt, ap);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
strutil.c: In function 'str_ccprintf':
strutil.c:277:10: warning: null destination pointer [-Wformat-truncation=]
  277 |   size = vsnprintf(NULL, size, fmt, ap);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC       libavrdude_la-teensy.lo
  CC       libavrdude_la-term.lo
In file included from /usr/include/ctype.h:100,
                 from term.c:23:
term.c: In function 'readbuf':
term.c:261:29: warning: array subscript has type 'char' [-Wchar-subscripts]
  261 |   const char *cmd = tolower(**argv) == 'r'? "read": str_casestarts(*argv, "di")? "disasm": "dump";
      |                             ^
In file included from term.c:54:
term.c: In function 'printproperty':
term.c:1606:38: warning: array subscript has type 'char' [-Wchar-subscripts]
 1606 |       term_out("# %c%.*s\n", toupper(*cc[ii].t->ccomment), cclen - 1, cc[ii].t->ccomment + 1);
      |                                      ^
avrdude.h:95:106: note: in definition of macro 'term_out'
   95 | #define term_out(...)       avrdude_message2(stdout, __LINE__, __FILE__, __func__, MSG2_FLUSH, MSG_INFO, __VA_ARGS__)
      |                                                                                                          ^~~~~~~~~~~
  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
netbsd10vm$ sudo make install
Password:
make  install-recursive
Making install in .
 mkdir -p '/usr/pkg/lib'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libavrdude.la '/usr/pkg/lib'
libtool: install: /usr/bin/install -c .libs/libavrdude.so.2.0 /usr/pkg/lib/libavrdude.so.2.0
libtool: install: (cd /usr/pkg/lib && { ln -s -f libavrdude.so.2.0 libavrdude.so.2 || { rm -f libavrdude.so.2 && ln -s libavrdude.so.2.0 libavrdude.so.2; }; })
libtool: install: (cd /usr/pkg/lib && { ln -s -f libavrdude.so.2.0 libavrdude.so || { rm -f libavrdude.so && ln -s libavrdude.so.2.0 libavrdude.so; }; })
libtool: install: /usr/bin/install -c .libs/libavrdude.lai /usr/pkg/lib/libavrdude.la
libtool: install: /usr/bin/install -c .libs/libavrdude.a /usr/pkg/lib/libavrdude.a
libtool: install: chmod 644 /usr/pkg/lib/libavrdude.a
libtool: install: ranlib /usr/pkg/lib/libavrdude.a
 mkdir -p '/usr/pkg/bin'
  /bin/sh ./libtool   --mode=install /usr/bin/install -c avrdude '/usr/pkg/bin'
libtool: install: /usr/bin/install -c .libs/avrdude /usr/pkg/bin/avrdude
 mkdir -p '/usr/pkg/bin'
 /usr/bin/install -c elf2tag '/usr/pkg/bin'
Backing up avrdude.conf in /usr/pkg/etc
 mkdir -p '/usr/pkg/etc'
 /usr/bin/install -c -m 644 avrdude.conf '/usr/pkg/etc'
 mkdir -p '/usr/pkg/include'
 /usr/bin/install -c -m 644 libavrdude.h libavrdude-avrintel.h '/usr/pkg/include'
 mkdir -p '/usr/pkg/share/man/man1'
 /usr/bin/install -c -m 644 avrdude.1 '/usr/pkg/share/man/man1'
netbsd10vm$ 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

netbsd10vm$ ../tools/test-avrdude  -d0 -p "-c dryrun -p m4809"
Testing /usr/pkg/bin/avrdude 7.3-20240822 (a9594622)
Prepare "-c dryrun -p m4809" and press 'enter' or 'space' to continue. Press any other key to skip
✅   0.099 s: fuse access: clear, set and read eesave fuse bit
✅   0.096 s: fuse access: set eesave fusebit to delete EEPROM on chip erase
✅   0.102 s: chip erase
✅   0.105 s: flash -U write/verify holes_rjmp_loops_49152B.hex
✅   0.116 s: flash -T write/verify holes_rjmp_loops_49152B.hex
✅   0.106 s: eeprom check whether programmer can flip 0s to 1s
✅   0.112 s: eeprom -U write/verify holes_pack_my_box_256B.hex
✅   0.115 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_256B.hex
✅   0.113 s: chip erase and spot check flash is actually erased
✅   0.111 s: spot check eeprom is erased, too
✅   0.104 s: usersig -T/-U write/read random_data_64B.bin
mcuee commented 3 months ago

BTW, it is all clean under FreeBSD 14.

``` mcuee@FreeBSD14n100new:~/build/avrdude $ rm -rf build_freebsd/ mcuee@FreeBSD14n100new:~/build/avrdude $ ./build.sh -- The C compiler identification is Clang 16.0.6 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Found Git: /usr/local/bin/git (found version "2.43.0") -- Found FLEX: /usr/bin/flex (found version "2.6.4") -- Found BISON: /usr/local/bin/bison (found version "3.8.2") -- Looking for libelf.h -- Looking for libelf.h - found -- Looking for libelf/libelf.h -- Looking for libelf/libelf.h - not found -- Looking for usb.h -- Looking for usb.h - found -- Looking for lusb0_usb.h -- Looking for lusb0_usb.h - not found -- Looking for libusb.h -- Looking for libusb.h - found -- Looking for libusb-1.0/libusb.h -- Looking for libusb-1.0/libusb.h - not found -- Looking for hidapi/hidapi.h -- Looking for hidapi/hidapi.h - found -- Looking for ftdi_tcioflush -- Looking for ftdi_tcioflush - found -- Found SWIG: /usr/local/bin/swig (found suitable version "4.1.1", minimum required is "4.0") found components: python -- Found Python3: /usr/local/bin/python3 (found version "3.9.18") found components: Interpreter Development Development.Module Development.Embed -- Configuration summary: -- ---------------------- -- DO HAVE libelf -- DO HAVE libusb -- DO HAVE libusb_1_0 -- DO HAVE libhidapi -- DO HAVE libftdi (but prefer to use libftdi1) -- DO HAVE libftdi1 -- DO HAVE libreadline -- DO HAVE libserialport -- DISABLED doc -- DISABLED parport -- DISABLED linuxgpio -- DISABLED linuxspi -- DO HAVE swig+Python3 -- ---------------------- -- Configuring done (2.2s) -- Generating done (0.0s) -- Build files have been written to: /home/mcuee/build/avrdude/build_freebsd [ 1%] Generating avrdude.conf [ 1%] Built target conf [ 2%] [BISON][Parser] Building parser with bison 3.8.2 [ 2%] [FLEX][Parser] Building scanner with flex 2.6.4 [ 3%] Building C object src/CMakeFiles/libavrdude.dir/arduino.c.o [ 3%] Building C object src/CMakeFiles/libavrdude.dir/avr.c.o [ 4%] Building C object src/CMakeFiles/libavrdude.dir/avr910.c.o [ 4%] Building C object src/CMakeFiles/libavrdude.dir/avrcache.c.o [ 5%] Building C object src/CMakeFiles/libavrdude.dir/avrftdi.c.o [ 6%] Building C object src/CMakeFiles/libavrdude.dir/avrftdi_tpi.c.o [ 6%] Building C object src/CMakeFiles/libavrdude.dir/avrintel.c.o [ 7%] Building C object src/CMakeFiles/libavrdude.dir/avr_opcodes.c.o [ 8%] Building C object src/CMakeFiles/libavrdude.dir/avrpart.c.o [ 8%] Building C object src/CMakeFiles/libavrdude.dir/bitbang.c.o [ 9%] Building C object src/CMakeFiles/libavrdude.dir/buspirate.c.o [ 9%] Building C object src/CMakeFiles/libavrdude.dir/butterfly.c.o [ 10%] Building C object src/CMakeFiles/libavrdude.dir/ch341a.c.o [ 11%] Building C object src/CMakeFiles/libavrdude.dir/config.c.o [ 11%] Building C object src/CMakeFiles/libavrdude.dir/confwin.c.o [ 12%] Building C object src/CMakeFiles/libavrdude.dir/crc16.c.o [ 13%] Building C object src/CMakeFiles/libavrdude.dir/disasm.c.o [ 13%] Building C object src/CMakeFiles/libavrdude.dir/dfu.c.o [ 14%] Building C object src/CMakeFiles/libavrdude.dir/dryrun.c.o [ 14%] Building C object src/CMakeFiles/libavrdude.dir/fileio.c.o [ 15%] Building C object src/CMakeFiles/libavrdude.dir/flip1.c.o [ 16%] Building C object src/CMakeFiles/libavrdude.dir/flip2.c.o [ 16%] Building C object src/CMakeFiles/libavrdude.dir/ft245r.c.o [ 17%] Building C object src/CMakeFiles/libavrdude.dir/jtagmkI.c.o [ 18%] Building C object src/CMakeFiles/libavrdude.dir/jtagmkII.c.o [ 18%] Building C object src/CMakeFiles/libavrdude.dir/jtag3.c.o [ 19%] Building C object src/CMakeFiles/libavrdude.dir/leds.c.o [ 20%] Building C object src/CMakeFiles/libavrdude.dir/linuxgpio.c.o [ 20%] Building C object src/CMakeFiles/libavrdude.dir/linuxspi.c.o [ 21%] Building C object src/CMakeFiles/libavrdude.dir/lists.c.o [ 21%] Building C object src/CMakeFiles/libavrdude.dir/micronucleus.c.o [ 22%] Building C object src/CMakeFiles/libavrdude.dir/par.c.o [ 23%] Building C object src/CMakeFiles/libavrdude.dir/pgm.c.o [ 23%] Building C object src/CMakeFiles/libavrdude.dir/pgm_type.c.o [ 24%] Building C object src/CMakeFiles/libavrdude.dir/pickit2.c.o [ 25%] Building C object src/CMakeFiles/libavrdude.dir/pickit5_updi_lut.c.o [ 25%] Building C object src/CMakeFiles/libavrdude.dir/pickit5.c.o [ 26%] Building C object src/CMakeFiles/libavrdude.dir/pindefs.c.o [ 26%] Building C object src/CMakeFiles/libavrdude.dir/ppi.c.o [ 27%] Building C object src/CMakeFiles/libavrdude.dir/ppiwin.c.o [ 28%] Building C object src/CMakeFiles/libavrdude.dir/serbb_posix.c.o [ 28%] Building C object src/CMakeFiles/libavrdude.dir/serbb_win32.c.o [ 29%] Building C object src/CMakeFiles/libavrdude.dir/ser_avrdoper.c.o [ 30%] Building C object src/CMakeFiles/libavrdude.dir/ser_posix.c.o [ 30%] Building C object src/CMakeFiles/libavrdude.dir/ser_win32.c.o [ 31%] Building C object src/CMakeFiles/libavrdude.dir/serialadapter.c.o [ 31%] Building C object src/CMakeFiles/libavrdude.dir/serialupdi.c.o [ 32%] Building C object src/CMakeFiles/libavrdude.dir/serprog.c.o [ 33%] Building C object src/CMakeFiles/libavrdude.dir/stk500.c.o [ 33%] Building C object src/CMakeFiles/libavrdude.dir/stk500v2.c.o [ 34%] Building C object src/CMakeFiles/libavrdude.dir/stk500generic.c.o [ 35%] Building C object src/CMakeFiles/libavrdude.dir/strutil.c.o [ 35%] Building C object src/CMakeFiles/libavrdude.dir/teensy.c.o [ 36%] Building C object src/CMakeFiles/libavrdude.dir/term.c.o [ 36%] Building C object src/CMakeFiles/libavrdude.dir/updi_link.c.o [ 37%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm.c.o [ 38%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v0.c.o [ 38%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v2.c.o [ 39%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v3.c.o [ 40%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v4.c.o [ 40%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v5.c.o [ 41%] Building C object src/CMakeFiles/libavrdude.dir/updi_readwrite.c.o [ 42%] Building C object src/CMakeFiles/libavrdude.dir/updi_state.c.o [ 42%] Building C object src/CMakeFiles/libavrdude.dir/urclock.c.o [ 43%] Building C object src/CMakeFiles/libavrdude.dir/usbasp.c.o [ 43%] Building C object src/CMakeFiles/libavrdude.dir/usb_hidapi.c.o [ 44%] Building C object src/CMakeFiles/libavrdude.dir/usb_libusb.c.o [ 45%] Building C object src/CMakeFiles/libavrdude.dir/usbtiny.c.o [ 45%] Building C object src/CMakeFiles/libavrdude.dir/update.c.o [ 46%] Building C object src/CMakeFiles/libavrdude.dir/wiring.c.o [ 47%] Building C object src/CMakeFiles/libavrdude.dir/xbee.c.o [ 47%] Building C object src/CMakeFiles/libavrdude.dir/__/lexer.c.o [ 48%] Building C object src/CMakeFiles/libavrdude.dir/__/config_gram.c.o [ 48%] Linking C static library libavrdude.a [ 48%] Built target libavrdude [ 48%] Building C object src/CMakeFiles/avrdude.dir/main.c.o [ 49%] Building C object src/CMakeFiles/avrdude.dir/developer_opts.c.o [ 49%] Building C object src/CMakeFiles/avrdude.dir/whereami.c.o [ 50%] Linking C executable avrdude [ 50%] Built target avrdude [ 51%] Swig compile libavrdude.i for python [ 51%] Built target swig_avrdude_swig_compilation [ 51%] Building C object src/CMakeFiles/swig_avrdude.dir/CMakeFiles/swig_avrdude.dir/libavrdudePYTHON_wrap.c.o [ 52%] Building C object src/CMakeFiles/swig_avrdude.dir/arduino.c.o [ 53%] Building C object src/CMakeFiles/swig_avrdude.dir/avr.c.o [ 53%] Building C object src/CMakeFiles/swig_avrdude.dir/avr910.c.o [ 54%] Building C object src/CMakeFiles/swig_avrdude.dir/avrcache.c.o [ 54%] Building C object src/CMakeFiles/swig_avrdude.dir/avrftdi.c.o [ 55%] Building C object src/CMakeFiles/swig_avrdude.dir/avrftdi_tpi.c.o [ 56%] Building C object src/CMakeFiles/swig_avrdude.dir/avrintel.c.o [ 56%] Building C object src/CMakeFiles/swig_avrdude.dir/avr_opcodes.c.o [ 57%] Building C object src/CMakeFiles/swig_avrdude.dir/avrpart.c.o [ 58%] Building C object src/CMakeFiles/swig_avrdude.dir/bitbang.c.o [ 58%] Building C object src/CMakeFiles/swig_avrdude.dir/buspirate.c.o [ 59%] Building C object src/CMakeFiles/swig_avrdude.dir/butterfly.c.o [ 60%] Building C object src/CMakeFiles/swig_avrdude.dir/ch341a.c.o [ 60%] Building C object src/CMakeFiles/swig_avrdude.dir/config.c.o [ 61%] Building C object src/CMakeFiles/swig_avrdude.dir/confwin.c.o [ 61%] Building C object src/CMakeFiles/swig_avrdude.dir/crc16.c.o [ 62%] Building C object src/CMakeFiles/swig_avrdude.dir/disasm.c.o [ 63%] Building C object src/CMakeFiles/swig_avrdude.dir/dfu.c.o [ 63%] Building C object src/CMakeFiles/swig_avrdude.dir/dryrun.c.o [ 64%] Building C object src/CMakeFiles/swig_avrdude.dir/fileio.c.o [ 65%] Building C object src/CMakeFiles/swig_avrdude.dir/flip1.c.o [ 65%] Building C object src/CMakeFiles/swig_avrdude.dir/flip2.c.o [ 66%] Building C object src/CMakeFiles/swig_avrdude.dir/ft245r.c.o [ 66%] Building C object src/CMakeFiles/swig_avrdude.dir/jtagmkI.c.o [ 67%] Building C object src/CMakeFiles/swig_avrdude.dir/jtagmkII.c.o [ 68%] Building C object src/CMakeFiles/swig_avrdude.dir/jtag3.c.o [ 68%] Building C object src/CMakeFiles/swig_avrdude.dir/leds.c.o [ 69%] Building C object src/CMakeFiles/swig_avrdude.dir/linuxgpio.c.o [ 70%] Building C object src/CMakeFiles/swig_avrdude.dir/linuxspi.c.o [ 70%] Building C object src/CMakeFiles/swig_avrdude.dir/lists.c.o [ 71%] Building C object src/CMakeFiles/swig_avrdude.dir/micronucleus.c.o [ 71%] Building C object src/CMakeFiles/swig_avrdude.dir/par.c.o [ 72%] Building C object src/CMakeFiles/swig_avrdude.dir/pgm.c.o [ 73%] Building C object src/CMakeFiles/swig_avrdude.dir/pgm_type.c.o [ 73%] Building C object src/CMakeFiles/swig_avrdude.dir/pickit2.c.o [ 74%] Building C object src/CMakeFiles/swig_avrdude.dir/pickit5_updi_lut.c.o [ 75%] Building C object src/CMakeFiles/swig_avrdude.dir/pickit5.c.o [ 75%] Building C object src/CMakeFiles/swig_avrdude.dir/pindefs.c.o [ 76%] Building C object src/CMakeFiles/swig_avrdude.dir/ppi.c.o [ 76%] Building C object src/CMakeFiles/swig_avrdude.dir/ppiwin.c.o [ 77%] Building C object src/CMakeFiles/swig_avrdude.dir/serbb_posix.c.o [ 78%] Building C object src/CMakeFiles/swig_avrdude.dir/serbb_win32.c.o [ 78%] Building C object src/CMakeFiles/swig_avrdude.dir/ser_avrdoper.c.o [ 79%] Building C object src/CMakeFiles/swig_avrdude.dir/ser_posix.c.o [ 80%] Building C object src/CMakeFiles/swig_avrdude.dir/ser_win32.c.o [ 80%] Building C object src/CMakeFiles/swig_avrdude.dir/serialadapter.c.o [ 81%] Building C object src/CMakeFiles/swig_avrdude.dir/serialupdi.c.o [ 82%] Building C object src/CMakeFiles/swig_avrdude.dir/serprog.c.o [ 82%] Building C object src/CMakeFiles/swig_avrdude.dir/stk500.c.o [ 83%] Building C object src/CMakeFiles/swig_avrdude.dir/stk500v2.c.o [ 83%] Building C object src/CMakeFiles/swig_avrdude.dir/stk500generic.c.o [ 84%] Building C object src/CMakeFiles/swig_avrdude.dir/strutil.c.o [ 85%] Building C object src/CMakeFiles/swig_avrdude.dir/teensy.c.o [ 85%] Building C object src/CMakeFiles/swig_avrdude.dir/term.c.o [ 86%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_link.c.o [ 87%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm.c.o [ 87%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v0.c.o [ 88%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v2.c.o [ 88%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v3.c.o [ 89%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v4.c.o [ 90%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v5.c.o [ 90%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_readwrite.c.o [ 91%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_state.c.o [ 92%] Building C object src/CMakeFiles/swig_avrdude.dir/urclock.c.o [ 92%] Building C object src/CMakeFiles/swig_avrdude.dir/usbasp.c.o [ 93%] Building C object src/CMakeFiles/swig_avrdude.dir/usb_hidapi.c.o [ 93%] Building C object src/CMakeFiles/swig_avrdude.dir/usb_libusb.c.o [ 94%] Building C object src/CMakeFiles/swig_avrdude.dir/usbtiny.c.o [ 95%] Building C object src/CMakeFiles/swig_avrdude.dir/update.c.o [ 95%] Building C object src/CMakeFiles/swig_avrdude.dir/wiring.c.o [ 96%] Building C object src/CMakeFiles/swig_avrdude.dir/xbee.c.o [ 97%] Building C object src/CMakeFiles/swig_avrdude.dir/__/lexer.c.o [ 97%] Building C object src/CMakeFiles/swig_avrdude.dir/__/config_gram.c.o [ 98%] Linking C shared module _swig_avrdude.so [100%] Built target swig_avrdude Build succeeded. Run sudo cmake --build build_freebsd --target install to install. mcuee@FreeBSD14n100new:~/build/avrdude $ sudo cmake --build build_freebsd --target install Password: [ 1%] Built target conf [ 48%] Built target libavrdude [ 50%] Built target avrdude [ 51%] Built target swig_avrdude_swig_compilation [100%] Built target swig_avrdude Install the project... -- Install configuration: "RelWithDebInfo" -- Installing: /usr/local/bin/avrdude -- Installing: /usr/local/bin/elf2tag -- Installing: /usr/local/lib/libavrdude.a -- Installing: /usr/local/include/libavrdude.h -- Installing: /usr/local/include/libavrdude-avrintel.h -- Installing: /usr/local/etc/avrdude.conf -- Installing: /usr/local/share/man/man1/avrdude.1 -- Installing: /usr/local/lib/python3.9/site-packages/_swig_avrdude.so -- Installing: /usr/local/lib/python3.9/site-packages/swig_avrdude.py -- Installing: /usr/local/share/avrdude -- Installing: /usr/local/share/avrdude/devinfo.ui -- Installing: /usr/local/share/avrdude/adgui.ui -- Installing: /usr/local/share/avrdude/memories.ui -- Installing: /usr/local/share/avrdude/about.ui -- Installing: /usr/local/share/avrdude/programmer.ui -- Installing: /usr/local/share/avrdude/askfuse.ui -- Installing: /usr/local/share/avrdude/device.ui -- Installing: /usr/local/share/avrdude/loglevel.ui -- Installing: /usr/local/share/avrdude/help.ui -- Up-to-date: /usr/local/share/avrdude -- Installing: /usr/local/share/avrdude/swigtest.py -- Installing: /usr/local/share/avrdude/adgui.py -- Installing: /usr/local/bin/avrdude-gui mcuee@FreeBSD14n100new:~/build/avrdude $ avrdude Usage: avrdude [options] Options: -p Specify AVR device; -p ? lists all known parts -p / Run developer options for matched AVR devices, e.g., -p ATmega328P/s or /S for part definition -b Override RS-232 baud rate -B Specify bit clock period (us) -C Specify location of configuration file -C + Specify additional config file, can be repeated -N Do not load config file -c Specify programmer; -c ? and -c ?type list all -c / 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 ISP Clock Delay [in microseconds] -P 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 Run terminal line when it is its turn -U :r|w|v:[: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 [,] List programmer exit specifications -x Pass 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 mcuee@FreeBSD14n100new:~/build/avrdude $ ./tools/test-avrdude -d0 -p "-c dryrun -p t13" Testing /usr/local/bin/avrdude 7.3-20240822 (a9594622) Prepare "-c dryrun -p t13" and press 'enter' or 'space' to continue. Press any other key to skip ✅ 0.089 s: fuse access: clear, set and read eesave fuse bit ✅ 0.089 s: fuse access: set eesave fusebit to delete EEPROM on chip erase ✅ 0.089 s: chip erase ✅ 0.089 s: flash -U write/verify holes_rjmp_loops_1024B.hex ✅ 0.090 s: flash -T write/verify holes_rjmp_loops_1024B.hex ✅ 0.089 s: eeprom check whether programmer can flip 0s to 1s ✅ 0.090 s: eeprom -U write/verify holes_pack_my_box_64B.hex ✅ 0.105 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_64B.hex ✅ 0.090 s: chip erase and spot check flash is actually erased ✅ 0.090 s: spot check eeprom is erased, too mcuee@FreeBSD14n100new:~/build/avrdude $ cc -v FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152) Target: x86_64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin mcuee@FreeBSD14n100new:~/build/avrdude $ uname -a FreeBSD FreeBSD14n100new 14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:23 UTC 2023 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 ```
mcuee commented 3 months ago

FreeBSD 14 build using auto-tools is also all good.

``` mcuee@FreeBSD14n100new:~/build/avrdude/src $ ./bootstrap + rm -rf autom4te.cache + LIBTOOLIZE=libtoolize + glibtoolize --version + export LIBTOOLIZE + autoreconf -i libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'auto-aux'. libtoolize: copying file 'auto-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'auto-m4'. libtoolize: copying file 'auto-m4/libtool.m4' libtoolize: copying file 'auto-m4/ltoptions.m4' libtoolize: copying file 'auto-m4/ltsugar.m4' libtoolize: copying file 'auto-m4/ltversion.m4' libtoolize: copying file 'auto-m4/lt~obsolete.m4' configure.ac:129: installing 'auto-aux/ar-lib' configure.ac:123: installing 'auto-aux/compile' configure.ac:55: installing 'auto-aux/config.guess' configure.ac:55: installing 'auto-aux/config.sub' configure.ac:59: installing 'auto-aux/install-sh' configure.ac:59: installing 'auto-aux/missing' Makefile.am: installing 'auto-aux/depcomp' configure.ac: installing 'auto-aux/ylwrap' doc/Makefile.am:29: installing 'auto-aux/mdate-sh' doc/Makefile.am:29: installing 'auto-aux/texinfo.tex' mcuee@FreeBSD14n100new:~/build/avrdude/src $ CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure checking build system type... amd64-unknown-freebsd14.0 checking host system type... amd64-unknown-freebsd14.0 checking target system type... amd64-unknown-freebsd14.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... ./auto-aux/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... nawk 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... 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... no checking for cc... cc 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 cc accepts -g... yes checking for cc option to enable C11 features... none needed checking whether cc understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of cc... gcc3 checking for gawk... (cached) nawk 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 cc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm checking the name lister (/usr/bin/nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 393216 checking how to convert amd64-unknown-freebsd14.0 file names to amd64-unknown-freebsd14.0 format... func_convert_file_noop checking how to convert amd64-unknown-freebsd14.0 file names to toolchain format... func_convert_file_noop checking for /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 output from cc 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... mt checking if mt is a manifest tool... no 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 cc supports -fno-rtti -fno-exceptions... yes checking for cc option to produce PIC... -fPIC -DPIC checking if cc PIC flag -fPIC -DPIC works... yes checking if cc static flag -static works... yes checking if cc supports -c -o file.o... yes checking if cc supports -c -o file.o... (cached) yes checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... freebsd14.0 ld.so 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 2.6.4 => 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... yes checking for libelf/libelf.h... no 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... no checking for libusb_init in -lusb... yes checking for libusb.h... yes checking for library containing hid_init... -lhidapi checking for hidapi/hidapi.h... yes checking for sp_open in -lserialport... no checking for ftdi_new in -lftdi1... yes checking for ftdi_usb_get_strings in -lftdi... yes 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... /dev/cuad0 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 DO HAVE libftdi (but prefer to use libftdi1) DON'T HAVE libhid DO HAVE libhidapi DO HAVE libreadline DON'T HAVE libserialport DO HAVE pthread DISABLED doc DISABLED parport DISABLED linuxgpio DISABLED linuxspi mcuee@FreeBSD14n100new:~/build/avrdude/src $ make YACC config_gram.c updating config_gram.h LEX lexer.c 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 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 mcuee@FreeBSD14n100new:~/build/avrdude/src $ sudo make install Password: make install-recursive Making install in . ./auto-aux/install-sh -c -d '/usr/local/lib' /bin/sh ./libtool --mode=install /usr/bin/install -c libavrdude.la '/usr/local/lib' libtool: install: /usr/bin/install -c .libs/libavrdude.so.2.0.0 /usr/local/lib/libavrdude.so.2.0.0 libtool: install: (cd /usr/local/lib && { ln -s -f libavrdude.so.2.0.0 libavrdude.so.2 || { rm -f libavrdude.so.2 && ln -s libavrdude.so.2.0.0 libavrdude.so.2; }; }) libtool: install: (cd /usr/local/lib && { ln -s -f libavrdude.so.2.0.0 libavrdude.so || { rm -f libavrdude.so && ln -s libavrdude.so.2.0.0 libavrdude.so; }; }) libtool: install: /usr/bin/install -c .libs/libavrdude.lai /usr/local/lib/libavrdude.la libtool: install: /usr/bin/install -c .libs/libavrdude.a /usr/local/lib/libavrdude.a libtool: install: chmod 644 /usr/local/lib/libavrdude.a libtool: install: ranlib /usr/local/lib/libavrdude.a ./auto-aux/install-sh -c -d '/usr/local/bin' /bin/sh ./libtool --mode=install /usr/bin/install -c avrdude '/usr/local/bin' libtool: install: /usr/bin/install -c .libs/avrdude /usr/local/bin/avrdude ./auto-aux/install-sh -c -d '/usr/local/bin' /usr/bin/install -c elf2tag '/usr/local/bin' Backing up avrdude.conf in /usr/local/etc ./auto-aux/install-sh -c -d '/usr/local/etc' /usr/bin/install -c -m 644 avrdude.conf '/usr/local/etc' ./auto-aux/install-sh -c -d '/usr/local/include' /usr/bin/install -c -m 644 libavrdude.h libavrdude-avrintel.h '/usr/local/include' ./auto-aux/install-sh -c -d '/usr/local/share/man/man1' /usr/bin/install -c -m 644 avrdude.1 '/usr/local/share/man/man1' mcuee@FreeBSD14n100new:~/build/avrdude/src $ ../tools/test-avrdude -d0 -p "-c dryrun -p t13" Testing /usr/local/bin/avrdude 7.3-20240822 (a9594622) Prepare "-c dryrun -p t13" and press 'enter' or 'space' to continue. Press any other key to skip ✅ 0.103 s: fuse access: clear, set and read eesave fuse bit ✅ 0.104 s: fuse access: set eesave fusebit to delete EEPROM on chip erase ✅ 0.104 s: chip erase ✅ 0.122 s: flash -U write/verify holes_rjmp_loops_1024B.hex ✅ 0.112 s: flash -T write/verify holes_rjmp_loops_1024B.hex ✅ 0.103 s: eeprom check whether programmer can flip 0s to 1s ✅ 0.112 s: eeprom -U write/verify holes_pack_my_box_64B.hex ✅ 0.115 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_64B.hex ✅ 0.111 s: chip erase and spot check flash is actually erased ✅ 0.112 s: spot check eeprom is erased, too ```
mcuee commented 3 months ago

Some warnings under OpenBSD 7.5 as well.

openbsd75vm$ ./build.sh
-- The C compiler identification is Clang 16.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /usr/local/bin/git (found version "2.44.1")
-- Found FLEX: /usr/bin/flex (found version "2.5.39")
-- Found BISON: /usr/local/bin/bison (found version "3.8.2")
-- Looking for libelf.h
-- Looking for libelf.h - found
-- Looking for libelf/libelf.h
-- Looking for libelf/libelf.h - not found
-- Looking for usb.h
-- Looking for usb.h - found
-- Looking for lusb0_usb.h
-- Looking for lusb0_usb.h - not found
-- Looking for libusb.h
-- Looking for libusb.h - not found
-- Looking for libusb-1.0/libusb.h
-- Looking for libusb-1.0/libusb.h - found
-- Looking for hidapi/hidapi.h
-- Looking for hidapi/hidapi.h - found
-- Looking for ftdi_tcioflush
-- Looking for ftdi_tcioflush - found
-- Found SWIG: /usr/local/bin/swig (found suitable version "4.1.0", minimum required is "4.0") found components: python
-- Found Python3: /usr/local/bin/python3.10 (found version "3.10.14") found components: Interpreter Development Development.Module Development.Embed
-- Configuration summary:
-- ----------------------
-- DO HAVE    libelf
-- DO HAVE    libusb
-- DO HAVE    libusb_1_0
-- DO HAVE    libhidapi
-- DON'T HAVE libftdi
-- DO HAVE    libftdi1
-- DO HAVE    libreadline
-- DO HAVE    libserialport
-- DISABLED   doc
-- DISABLED   parport
-- DISABLED   linuxgpio
-- DISABLED   linuxspi
-- DO HAVE    swig+Python3
-- ----------------------
-- Configuring done (4.1s)
-- Generating done (0.1s)
-- Build files have been written to: /home/mcuee/build/avr/avrdude/build_openbsd
[  1%] Generating avrdude.conf
[  1%] Built target conf
[  2%] [BISON][Parser] Building parser with bison 3.8.2
[  2%] [FLEX][Parser] Building scanner with flex 2.5.39
[  3%] Building C object src/CMakeFiles/libavrdude.dir/arduino.c.o
[  3%] Building C object src/CMakeFiles/libavrdude.dir/avr.c.o
[  4%] Building C object src/CMakeFiles/libavrdude.dir/avr910.c.o
[  4%] Building C object src/CMakeFiles/libavrdude.dir/avrcache.c.o
[  5%] Building C object src/CMakeFiles/libavrdude.dir/avrftdi.c.o
[  6%] Building C object src/CMakeFiles/libavrdude.dir/avrftdi_tpi.c.o
[  6%] Building C object src/CMakeFiles/libavrdude.dir/avrintel.c.o
[  7%] Building C object src/CMakeFiles/libavrdude.dir/avr_opcodes.c.o
[  8%] Building C object src/CMakeFiles/libavrdude.dir/avrpart.c.o
[  8%] Building C object src/CMakeFiles/libavrdude.dir/bitbang.c.o
[  9%] Building C object src/CMakeFiles/libavrdude.dir/buspirate.c.o
[  9%] Building C object src/CMakeFiles/libavrdude.dir/butterfly.c.o
[ 10%] Building C object src/CMakeFiles/libavrdude.dir/ch341a.c.o
[ 11%] Building C object src/CMakeFiles/libavrdude.dir/config.c.o
[ 11%] Building C object src/CMakeFiles/libavrdude.dir/confwin.c.o
[ 12%] Building C object src/CMakeFiles/libavrdude.dir/crc16.c.o
[ 13%] Building C object src/CMakeFiles/libavrdude.dir/disasm.c.o
[ 13%] Building C object src/CMakeFiles/libavrdude.dir/dfu.c.o
[ 14%] Building C object src/CMakeFiles/libavrdude.dir/dryrun.c.o
[ 14%] Building C object src/CMakeFiles/libavrdude.dir/fileio.c.o
[ 15%] Building C object src/CMakeFiles/libavrdude.dir/flip1.c.o
[ 16%] Building C object src/CMakeFiles/libavrdude.dir/flip2.c.o
[ 16%] Building C object src/CMakeFiles/libavrdude.dir/ft245r.c.o
[ 17%] Building C object src/CMakeFiles/libavrdude.dir/jtagmkI.c.o
[ 18%] Building C object src/CMakeFiles/libavrdude.dir/jtagmkII.c.o
[ 18%] Building C object src/CMakeFiles/libavrdude.dir/jtag3.c.o
[ 19%] Building C object src/CMakeFiles/libavrdude.dir/leds.c.o
[ 20%] Building C object src/CMakeFiles/libavrdude.dir/linuxgpio.c.o
[ 20%] Building C object src/CMakeFiles/libavrdude.dir/linuxspi.c.o
[ 21%] Building C object src/CMakeFiles/libavrdude.dir/lists.c.o
[ 21%] Building C object src/CMakeFiles/libavrdude.dir/micronucleus.c.o
[ 22%] Building C object src/CMakeFiles/libavrdude.dir/par.c.o
[ 23%] Building C object src/CMakeFiles/libavrdude.dir/pgm.c.o
[ 23%] Building C object src/CMakeFiles/libavrdude.dir/pgm_type.c.o
[ 24%] Building C object src/CMakeFiles/libavrdude.dir/pickit2.c.o
[ 25%] Building C object src/CMakeFiles/libavrdude.dir/pickit5_updi_lut.c.o
[ 25%] Building C object src/CMakeFiles/libavrdude.dir/pickit5.c.o
[ 26%] Building C object src/CMakeFiles/libavrdude.dir/pindefs.c.o
[ 26%] Building C object src/CMakeFiles/libavrdude.dir/ppi.c.o
[ 27%] Building C object src/CMakeFiles/libavrdude.dir/ppiwin.c.o
[ 28%] Building C object src/CMakeFiles/libavrdude.dir/serbb_posix.c.o
[ 28%] Building C object src/CMakeFiles/libavrdude.dir/serbb_win32.c.o
[ 29%] Building C object src/CMakeFiles/libavrdude.dir/ser_avrdoper.c.o
[ 30%] Building C object src/CMakeFiles/libavrdude.dir/ser_posix.c.o
[ 30%] Building C object src/CMakeFiles/libavrdude.dir/ser_win32.c.o
[ 31%] Building C object src/CMakeFiles/libavrdude.dir/serialadapter.c.o
[ 31%] Building C object src/CMakeFiles/libavrdude.dir/serialupdi.c.o
[ 32%] Building C object src/CMakeFiles/libavrdude.dir/serprog.c.o
[ 33%] Building C object src/CMakeFiles/libavrdude.dir/stk500.c.o
[ 33%] Building C object src/CMakeFiles/libavrdude.dir/stk500v2.c.o
[ 34%] Building C object src/CMakeFiles/libavrdude.dir/stk500generic.c.o
[ 35%] Building C object src/CMakeFiles/libavrdude.dir/strutil.c.o
[ 35%] Building C object src/CMakeFiles/libavrdude.dir/teensy.c.o
[ 36%] Building C object src/CMakeFiles/libavrdude.dir/term.c.o
[ 36%] Building C object src/CMakeFiles/libavrdude.dir/updi_link.c.o
[ 37%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm.c.o
[ 38%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v0.c.o
[ 38%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v2.c.o
[ 39%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v3.c.o
[ 40%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v4.c.o
[ 40%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v5.c.o
[ 41%] Building C object src/CMakeFiles/libavrdude.dir/updi_readwrite.c.o
[ 42%] Building C object src/CMakeFiles/libavrdude.dir/updi_state.c.o
[ 42%] Building C object src/CMakeFiles/libavrdude.dir/urclock.c.o
[ 43%] Building C object src/CMakeFiles/libavrdude.dir/usbasp.c.o
[ 43%] Building C object src/CMakeFiles/libavrdude.dir/usb_hidapi.c.o
[ 44%] Building C object src/CMakeFiles/libavrdude.dir/usb_libusb.c.o
[ 45%] Building C object src/CMakeFiles/libavrdude.dir/usbtiny.c.o
[ 45%] Building C object src/CMakeFiles/libavrdude.dir/update.c.o
[ 46%] Building C object src/CMakeFiles/libavrdude.dir/wiring.c.o
[ 47%] Building C object src/CMakeFiles/libavrdude.dir/xbee.c.o
/home/mcuee/build/avr/avrdude/src/xbee.c:233:5: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'long long') [-Wformat]
    summary->minimum.tv_sec, (unsigned long) summary->minimum.tv_usec);
    ^~~~~~~~~~~~~~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/avrdude.h:69:138: note: expanded from macro 'pmsg_notice'
#define pmsg_notice(...)    avrdude_message2(stderr, __LINE__, __FILE__, __func__, MSG2_UCFIRST|MSG2_FLUSH|MSG2_LEFT_MARGIN, MSG_NOTICE, __VA_ARGS__)
                                                                                                                                         ^~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/xbee.c:235:5: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'long long') [-Wformat]
    summary->maximum.tv_sec, (unsigned long) summary->maximum.tv_usec);
    ^~~~~~~~~~~~~~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/avrdude.h:69:138: note: expanded from macro 'pmsg_notice'
#define pmsg_notice(...)    avrdude_message2(stderr, __LINE__, __FILE__, __func__, MSG2_UCFIRST|MSG2_FLUSH|MSG2_LEFT_MARGIN, MSG_NOTICE, __VA_ARGS__)
                                                                                                                                         ^~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/xbee.c:250:55: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'long long') [-Wformat]
  pmsg_notice("  Average response time: %lu.%06lu\n", average.tv_sec, (unsigned long) average.tv_usec);
                                        ~~~           ^~~~~~~~~~~~~~
                                        %lld
/home/mcuee/build/avr/avrdude/src/avrdude.h:69:138: note: expanded from macro 'pmsg_notice'
#define pmsg_notice(...)    avrdude_message2(stderr, __LINE__, __FILE__, __func__, MSG2_UCFIRST|MSG2_FLUSH|MSG2_LEFT_MARGIN, MSG_NOTICE, __VA_ARGS__)
                                                                                                                                         ^~~~~~~~~~~
3 warnings generated.
[ 47%] Building C object src/CMakeFiles/libavrdude.dir/__/lexer.c.o
[ 48%] Building C object src/CMakeFiles/libavrdude.dir/__/config_gram.c.o
[ 48%] Linking C static library libavrdude.a
[ 48%] Built target libavrdude
[ 48%] Building C object src/CMakeFiles/avrdude.dir/main.c.o
[ 49%] Building C object src/CMakeFiles/avrdude.dir/developer_opts.c.o
[ 49%] Building C object src/CMakeFiles/avrdude.dir/whereami.c.o
[ 50%] Linking C executable avrdude
main.c:1014 (/home/mcuee/build/avr/avrdude/src/main.c:1014)(CMakeFiles/avrdude.dir/main.c.o:(main)): warning: strcpy() is almost always misused, please use strlcpy()
main.c:668 (/home/mcuee/build/avr/avrdude/src/main.c:668)(CMakeFiles/avrdude.dir/main.c.o:(concatpath)): warning: strcat() is almost always misused, please use strlcat()
main.c:408 (/home/mcuee/build/avr/avrdude/src/main.c:408)(CMakeFiles/avrdude.dir/main.c.o:(part_ccdesc)): warning: sprintf() is often misused, please use snprintf()
dryrun.c:559 (/home/mcuee/build/avr/avrdude/src/dryrun.c:559)(dryrun.c.o:(dryrun_enable) in archive libavrdude.a): warning: rand() may return deterministic values, is that what you want?
[ 50%] Built target avrdude
[ 51%] Swig compile libavrdude.i for python
[ 51%] Built target swig_avrdude_swig_compilation
[ 51%] Building C object src/CMakeFiles/swig_avrdude.dir/CMakeFiles/swig_avrdude.dir/libavrdudePYTHON_wrap.c.o
[ 52%] Building C object src/CMakeFiles/swig_avrdude.dir/arduino.c.o
[ 53%] Building C object src/CMakeFiles/swig_avrdude.dir/avr.c.o
[ 53%] Building C object src/CMakeFiles/swig_avrdude.dir/avr910.c.o
[ 54%] Building C object src/CMakeFiles/swig_avrdude.dir/avrcache.c.o
[ 54%] Building C object src/CMakeFiles/swig_avrdude.dir/avrftdi.c.o
[ 55%] Building C object src/CMakeFiles/swig_avrdude.dir/avrftdi_tpi.c.o
[ 56%] Building C object src/CMakeFiles/swig_avrdude.dir/avrintel.c.o
[ 56%] Building C object src/CMakeFiles/swig_avrdude.dir/avr_opcodes.c.o
[ 57%] Building C object src/CMakeFiles/swig_avrdude.dir/avrpart.c.o
[ 58%] Building C object src/CMakeFiles/swig_avrdude.dir/bitbang.c.o
[ 58%] Building C object src/CMakeFiles/swig_avrdude.dir/buspirate.c.o
[ 59%] Building C object src/CMakeFiles/swig_avrdude.dir/butterfly.c.o
[ 60%] Building C object src/CMakeFiles/swig_avrdude.dir/ch341a.c.o
[ 60%] Building C object src/CMakeFiles/swig_avrdude.dir/config.c.o
[ 61%] Building C object src/CMakeFiles/swig_avrdude.dir/confwin.c.o
[ 61%] Building C object src/CMakeFiles/swig_avrdude.dir/crc16.c.o
[ 62%] Building C object src/CMakeFiles/swig_avrdude.dir/disasm.c.o
[ 63%] Building C object src/CMakeFiles/swig_avrdude.dir/dfu.c.o
[ 63%] Building C object src/CMakeFiles/swig_avrdude.dir/dryrun.c.o
[ 64%] Building C object src/CMakeFiles/swig_avrdude.dir/fileio.c.o
[ 65%] Building C object src/CMakeFiles/swig_avrdude.dir/flip1.c.o
[ 65%] Building C object src/CMakeFiles/swig_avrdude.dir/flip2.c.o
[ 66%] Building C object src/CMakeFiles/swig_avrdude.dir/ft245r.c.o
[ 66%] Building C object src/CMakeFiles/swig_avrdude.dir/jtagmkI.c.o
[ 67%] Building C object src/CMakeFiles/swig_avrdude.dir/jtagmkII.c.o
[ 68%] Building C object src/CMakeFiles/swig_avrdude.dir/jtag3.c.o
[ 68%] Building C object src/CMakeFiles/swig_avrdude.dir/leds.c.o
[ 69%] Building C object src/CMakeFiles/swig_avrdude.dir/linuxgpio.c.o
[ 70%] Building C object src/CMakeFiles/swig_avrdude.dir/linuxspi.c.o
[ 70%] Building C object src/CMakeFiles/swig_avrdude.dir/lists.c.o
[ 71%] Building C object src/CMakeFiles/swig_avrdude.dir/micronucleus.c.o
[ 71%] Building C object src/CMakeFiles/swig_avrdude.dir/par.c.o
[ 72%] Building C object src/CMakeFiles/swig_avrdude.dir/pgm.c.o
[ 73%] Building C object src/CMakeFiles/swig_avrdude.dir/pgm_type.c.o
[ 73%] Building C object src/CMakeFiles/swig_avrdude.dir/pickit2.c.o
[ 74%] Building C object src/CMakeFiles/swig_avrdude.dir/pickit5_updi_lut.c.o
[ 75%] Building C object src/CMakeFiles/swig_avrdude.dir/pickit5.c.o
[ 75%] Building C object src/CMakeFiles/swig_avrdude.dir/pindefs.c.o
[ 76%] Building C object src/CMakeFiles/swig_avrdude.dir/ppi.c.o
[ 76%] Building C object src/CMakeFiles/swig_avrdude.dir/ppiwin.c.o
[ 77%] Building C object src/CMakeFiles/swig_avrdude.dir/serbb_posix.c.o
[ 78%] Building C object src/CMakeFiles/swig_avrdude.dir/serbb_win32.c.o
[ 78%] Building C object src/CMakeFiles/swig_avrdude.dir/ser_avrdoper.c.o
[ 79%] Building C object src/CMakeFiles/swig_avrdude.dir/ser_posix.c.o
[ 80%] Building C object src/CMakeFiles/swig_avrdude.dir/ser_win32.c.o
[ 80%] Building C object src/CMakeFiles/swig_avrdude.dir/serialadapter.c.o
[ 81%] Building C object src/CMakeFiles/swig_avrdude.dir/serialupdi.c.o
[ 82%] Building C object src/CMakeFiles/swig_avrdude.dir/serprog.c.o
[ 82%] Building C object src/CMakeFiles/swig_avrdude.dir/stk500.c.o
[ 83%] Building C object src/CMakeFiles/swig_avrdude.dir/stk500v2.c.o
[ 83%] Building C object src/CMakeFiles/swig_avrdude.dir/stk500generic.c.o
[ 84%] Building C object src/CMakeFiles/swig_avrdude.dir/strutil.c.o
[ 85%] Building C object src/CMakeFiles/swig_avrdude.dir/teensy.c.o
[ 85%] Building C object src/CMakeFiles/swig_avrdude.dir/term.c.o
[ 86%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_link.c.o
[ 87%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm.c.o
[ 87%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v0.c.o
[ 88%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v2.c.o
[ 88%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v3.c.o
[ 89%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v4.c.o
[ 90%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_nvm_v5.c.o
[ 90%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_readwrite.c.o
[ 91%] Building C object src/CMakeFiles/swig_avrdude.dir/updi_state.c.o
[ 92%] Building C object src/CMakeFiles/swig_avrdude.dir/urclock.c.o
[ 92%] Building C object src/CMakeFiles/swig_avrdude.dir/usbasp.c.o
[ 93%] Building C object src/CMakeFiles/swig_avrdude.dir/usb_hidapi.c.o
[ 93%] Building C object src/CMakeFiles/swig_avrdude.dir/usb_libusb.c.o
[ 94%] Building C object src/CMakeFiles/swig_avrdude.dir/usbtiny.c.o
[ 95%] Building C object src/CMakeFiles/swig_avrdude.dir/update.c.o
[ 95%] Building C object src/CMakeFiles/swig_avrdude.dir/wiring.c.o
[ 96%] Building C object src/CMakeFiles/swig_avrdude.dir/xbee.c.o
/home/mcuee/build/avr/avrdude/src/xbee.c:233:5: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'long long') [-Wformat]
    summary->minimum.tv_sec, (unsigned long) summary->minimum.tv_usec);
    ^~~~~~~~~~~~~~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/avrdude.h:69:138: note: expanded from macro 'pmsg_notice'
#define pmsg_notice(...)    avrdude_message2(stderr, __LINE__, __FILE__, __func__, MSG2_UCFIRST|MSG2_FLUSH|MSG2_LEFT_MARGIN, MSG_NOTICE, __VA_ARGS__)
                                                                                                                                         ^~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/xbee.c:235:5: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'long long') [-Wformat]
    summary->maximum.tv_sec, (unsigned long) summary->maximum.tv_usec);
    ^~~~~~~~~~~~~~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/avrdude.h:69:138: note: expanded from macro 'pmsg_notice'
#define pmsg_notice(...)    avrdude_message2(stderr, __LINE__, __FILE__, __func__, MSG2_UCFIRST|MSG2_FLUSH|MSG2_LEFT_MARGIN, MSG_NOTICE, __VA_ARGS__)
                                                                                                                                         ^~~~~~~~~~~
/home/mcuee/build/avr/avrdude/src/xbee.c:250:55: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'long long') [-Wformat]
  pmsg_notice("  Average response time: %lu.%06lu\n", average.tv_sec, (unsigned long) average.tv_usec);
                                        ~~~           ^~~~~~~~~~~~~~
                                        %lld
/home/mcuee/build/avr/avrdude/src/avrdude.h:69:138: note: expanded from macro 'pmsg_notice'
#define pmsg_notice(...)    avrdude_message2(stderr, __LINE__, __FILE__, __func__, MSG2_UCFIRST|MSG2_FLUSH|MSG2_LEFT_MARGIN, MSG_NOTICE, __VA_ARGS__)
                                                                                                                                         ^~~~~~~~~~~
3 warnings generated.
[ 97%] Building C object src/CMakeFiles/swig_avrdude.dir/__/lexer.c.o
[ 97%] Building C object src/CMakeFiles/swig_avrdude.dir/__/config_gram.c.o
[ 98%] Linking C shared module _swig_avrdude.so
[100%] Built target swig_avrdude

Build succeeded.

Run

sudo cmake --build build_openbsd --target install

to install.

openbsd75vm$ sudo cmake --build build_openbsd --target install
[  1%] Built target conf
[ 48%] Built target libavrdude
[ 50%] Built target avrdude
[ 51%] Built target swig_avrdude_swig_compilation
[100%] Built target swig_avrdude
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/bin/avrdude
-- Installing: /usr/local/bin/elf2tag
-- Installing: /usr/local/lib/libavrdude.a
-- Installing: /usr/local/include/libavrdude.h
-- Installing: /usr/local/include/libavrdude-avrintel.h
-- Installing: /usr/local/etc/avrdude.conf
-- Installing: /usr/local/man/man1/avrdude.1
-- Installing: /usr/local/lib/python3.10/site-packages/_swig_avrdude.so
-- Installing: /usr/local/lib/python3.10/site-packages/swig_avrdude.py
-- Installing: /usr/local/share/avrdude
-- Installing: /usr/local/share/avrdude/about.ui
-- Installing: /usr/local/share/avrdude/adgui.ui
-- Installing: /usr/local/share/avrdude/askfuse.ui
-- Installing: /usr/local/share/avrdude/device.ui
-- Installing: /usr/local/share/avrdude/devinfo.ui
-- Installing: /usr/local/share/avrdude/help.ui
-- Installing: /usr/local/share/avrdude/loglevel.ui
-- Installing: /usr/local/share/avrdude/memories.ui
-- Installing: /usr/local/share/avrdude/programmer.ui
-- Up-to-date: /usr/local/share/avrdude
-- Installing: /usr/local/share/avrdude/adgui.py
-- Installing: /usr/local/share/avrdude/swigtest.py
-- Installing: /usr/local/bin/avrdude-gui

openbsd75vm$ 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-20240823 (79f85d04), https://github.com/avrdudes/avrdude

openbsd75vm$ ./tools/test-avrdude -d0 -p "-c dryrun -p avr64dd32"
Testing /usr/local/bin/avrdude 7.3-20240823 (79f85d04)
Prepare "-c dryrun -p avr64dd32" and press 'enter' or 'space' to continue. Press any other key to skip
✅   0.121 s: fuse access: clear, set and read eesave fuse bit
✅   0.129 s: fuse access: set eesave fusebit to delete EEPROM on chip erase
✅   0.131 s: chip erase
✅   0.151 s: flash -U write/verify holes_rjmp_loops_65536B.hex
✅   0.139 s: flash -T write/verify holes_rjmp_loops_65536B.hex
✅   0.127 s: eeprom check whether programmer can flip 0s to 1s
✅   0.141 s: eeprom -U write/verify holes_pack_my_box_256B.hex
✅   0.159 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_256B.hex
✅   0.151 s: chip erase and spot check flash is actually erased
✅   0.137 s: spot check eeprom is erased, too
✅   0.142 s: usersig -T/-U write/read random_data_32B.bin

openbsd75vm$ uname -a
OpenBSD openbsd75vm.my.domain 7.5 GENERIC.MP#82 amd64

openbsd75vm$ cc -v
OpenBSD clang version 16.0.6
Target: amd64-unknown-openbsd7.5
Thread model: posix
InstalledDir: /usr/bin
mcuee commented 3 months ago

@ndim

Somehow auto-tools build failed under a fresh installation of OpenBSD 7.5. It does not detect hidapi properly.

openbsd75vm$ ./bootstrap
+ rm -rf autom4te.cache
+ LIBTOOLIZE=libtoolize
+ glibtoolize --version
+ > /dev/null
+ 2>&1
+ export LIBTOOLIZE
+ autoreconf -i
openbsd75vm$ CFLAGS="-I/usr/local/include -I/usr/include" LDFLAGS="-L/usr/local/lib -L/usr/lib" ./configure
checking build system type... x86_64-unknown-openbsd7.5
checking host system type... x86_64-unknown-openbsd7.5
checking target system type... x86_64-unknown-openbsd7.5
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... auto-aux/install-sh -c -d
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... 20240823
checking versioninfo item GIT_COMMIT_HASH... 79f85d04
checking versioninfo item GIT_TAG_HASH... e599214c
checking versioninfo derived PACKAGE_VERSION... 7.3-20240823
checking versioninfo derived AVRDUDE_FULL_VERSION... 7.3-20240823 (79f85d04)
checking versioninfo derived libtool -version-info for libavrdude... 2:0:0
checking for gcc... no
checking for cc... cc
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 we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of cc... 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 lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... print -r
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 cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
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... 393216
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert x86_64-unknown-openbsd7.5 file names to x86_64-unknown-openbsd7.5 format... func_convert_file_noop
checking how to convert x86_64-unknown-openbsd7.5 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$
checking for dlltool... no
checking how to associate runtime and link libraries... print -r --
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... openbsd7.5 ld.so
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/bin/pkg-config
checking pkg-config is at least version 0.23... yes
checking whether yylex_destroy is generated by flex... version 2.5.39 => 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 libelf.h usability... yes
checking libelf.h presence... yes
checking for libelf.h... yes
checking libelf/libelf.h usability... no
checking libelf/libelf.h presence... no
checking for libelf/libelf.h... no
checking for library containing gethostent... none required
checking for library containing setsockopt... none required
checking for usb_get_string_simple in -lusb... yes
checking usb.h usability... yes
checking usb.h presence... no
configure: WARNING: usb.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: usb.h: proceeding with the compiler's result
checking for usb.h... yes
checking lusb0_usb.h usability... no
checking lusb0_usb.h presence... no
checking for lusb0_usb.h... no
checking for libusb_init in -lusb-1.0... yes
checking libusb-1.0/libusb.h usability... yes
checking libusb-1.0/libusb.h presence... no
configure: WARNING: libusb-1.0/libusb.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: libusb-1.0/libusb.h: proceeding with the compiler's result
checking for libusb-1.0/libusb.h... yes
checking libusb.h usability... no
checking libusb.h presence... no
checking for libusb.h... no
checking for libusb_init in -lusb... no
checking for libusb.h... (cached) no
checking for library containing hid_init... no
checking for sp_open in -lserialport... yes
checking libserialport.h usability... yes
checking libserialport.h presence... no
configure: WARNING: libserialport.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: libserialport.h: proceeding with the compiler's result
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 pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... 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 netinet/in.h usability... yes
checking netinet/in.h presence... 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
DON'T HAVE libhidapi
DO HAVE    libreadline
DO HAVE    libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi
openbsd75vm$ make
  YACC     config_gram.c
updating config_gram.h
  LEX      lexer.c
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
  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
xbee.c:233:5: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'long long') [-Wformat]
    summary->minimum.tv_sec, (unsigned long) summary->minimum.tv_usec);
    ^~~~~~~~~~~~~~~~~~~~~~~
./avrdude.h:69:138: note: expanded from macro 'pmsg_notice'
#define pmsg_notice(...)    avrdude_message2(stderr, __LINE__, __FILE__, __func__, MSG2_UCFIRST|MSG2_FLUSH|MSG2_LEFT_MARGIN, MSG_NOTICE, __VA_ARGS__)
                                                                                                                                         ^~~~~~~~~~~
xbee.c:235:5: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'long long') [-Wformat]
    summary->maximum.tv_sec, (unsigned long) summary->maximum.tv_usec);
    ^~~~~~~~~~~~~~~~~~~~~~~
./avrdude.h:69:138: note: expanded from macro 'pmsg_notice'
#define pmsg_notice(...)    avrdude_message2(stderr, __LINE__, __FILE__, __func__, MSG2_UCFIRST|MSG2_FLUSH|MSG2_LEFT_MARGIN, MSG_NOTICE, __VA_ARGS__)
                                                                                                                                         ^~~~~~~~~~~
xbee.c:250:55: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'long long') [-Wformat]
  pmsg_notice("  Average response time: %lu.%06lu\n", average.tv_sec, (unsigned long) average.tv_usec);
                                        ~~~           ^~~~~~~~~~~~~~
                                        %lld
./avrdude.h:69:138: note: expanded from macro 'pmsg_notice'
#define pmsg_notice(...)    avrdude_message2(stderr, __LINE__, __FILE__, __func__, MSG2_UCFIRST|MSG2_FLUSH|MSG2_LEFT_MARGIN, MSG_NOTICE, __VA_ARGS__)
                                                                                                                                         ^~~~~~~~~~~
3 warnings generated.
  CCLD     libavrdude.la
  CCLD     avrdude
developer_opts.c(avrdude-developer_opts.o:(dev_output_pgm_defs)): warning: strcpy() is almost always misused, please use strlcpy()
main.c(avrdude-main.o:(main)): warning: strcat() is almost always misused, please use strlcat()
developer_opts.c(avrdude-developer_opts.o:(opsnm)): warning: sprintf() is often misused, please use snprintf()
ld: error: undefined symbol: str_contains
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_has_subsstr_comms)

ld: error: undefined symbol: cfg_get_prologue
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)

ld: error: undefined symbol: avrdude_conf_version
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced by main.c
>>>               avrdude-main.o:(main)
>>> referenced by main.c
>>>               avrdude-main.o:(main)
>>> referenced 1 more times

ld: error: undefined symbol: cfg_escape
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced 13 more times

ld: error: undefined symbol: default_spi
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced by main.c
>>>               avrdude-main.o:(main)

ld: error: undefined symbol: default_baudrate
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced by main.c
>>>               avrdude-main.o:(main)
>>> referenced by main.c
>>>               avrdude-main.o:(main)
>>> referenced 4 more times

ld: error: undefined symbol: default_linuxgpio
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced by main.c
>>>               avrdude-main.o:(main)
>>> referenced by main.c
>>>               avrdude-main.o:(main)

ld: error: undefined symbol: allow_subshells
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced by main.c
>>>               avrdude-main.o:(main)

ld: error: undefined symbol: cfg_strdup
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_part)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced 35 more times

ld: error: undefined symbol: str_eq
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced 28 more times

ld: error: undefined symbol: str_casematch
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_part_defs)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_part_strct)
>>> referenced 4 more times

ld: error: undefined symbol: locate_programmer_type_id
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_pgm_strct)

ld: error: undefined symbol: dev_prog_modes
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_part_defs)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_part_strct)
>>> referenced 1 more times

ld: error: undefined symbol: is_serialadapter
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_pgm_strct)
>>> referenced by main.c
>>>               avrdude-main.o:(main)

ld: error: undefined symbol: str_ccpgmids
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)

ld: error: undefined symbol: cache_string
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced by main.c
>>>               avrdude-main.o:(main)

ld: error: undefined symbol: jtag3_updi_initpgm
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)

ld: error: undefined symbol: jtag3_tpi_initpgm
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)

ld: error: undefined symbol: str_ccprintf
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)
>>> referenced by main.c
>>>               avrdude-main.o:(part_ccdesc)

ld: error: undefined symbol: str_asciiname
>>> referenced by developer_opts.c
>>>               avrdude-developer_opts.o:(dev_output_pgm_defs)

ld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error 1 in . (Makefile:950 'avrdude': @echo "  CCLD    " avrdude;/bin/sh ./libtool --silent --tag=CC    --mode=link cc -Wall -Wextra -Wn...)
*** Error 1 in . (Makefile:1785 'all-recursive': @fail=;  if (target_option=k; case ${target_option-} in  ?) ;;  *) echo "am__make_running_w...)
*** Error 2 in /home/mcuee/build/avr/avrdude/src (Makefile:798 'all')
mcuee commented 3 months ago

Also problem when building avrdude 7.3 release as well under OpenBSD 7.3.

openbsd75vm$ ./bootstrap
+ rm -rf autom4te.cache
+ LIBTOOLIZE=libtoolize
+ glibtoolize --version
+ > /dev/null
+ 2>&1
+ libtoolize
libtoolize: putting auxiliary files in `.'.
libtoolize: linking file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: linking file `m4/libtool.m4'
libtoolize: linking file `m4/ltoptions.m4'
libtoolize: linking file `m4/ltsugar.m4'
libtoolize: linking file `m4/ltversion.m4'
libtoolize: linking file `m4/lt~obsolete.m4'
+ aclocal
+ autoheader
+ autoconf
+ automake -a -c
configure.ac:54: installing './compile'
configure.ac:31: installing './config.guess'
configure.ac:31: installing './config.sub'
configure.ac:35: installing './install-sh'
configure.ac:35: installing './missing'
Makefile.am: installing './depcomp'
configure.ac: installing './ylwrap'
doc/Makefile.am:33: installing 'doc/mdate-sh'
doc/Makefile.am:33: installing 'doc/texinfo.tex'
openbsd75vm$ CFLAGS="-I/usr/local/include -I/usr/include" LDFLAGS="-L/usr/local/lib -L/usr/lib" ./configure
checking build system type... x86_64-unknown-openbsd7.5
checking host system type... x86_64-unknown-openbsd7.5
checking target system type... x86_64-unknown-openbsd7.5
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
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 how to print strings... print -r
checking whether make supports the include directive... yes (GNU style)
checking for gcc... no
checking for cc... cc
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 we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking dependency style of cc... gcc3
checking for a sed that does not truncate output... /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 cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
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... 393216
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert x86_64-unknown-openbsd7.5 file names to x86_64-unknown-openbsd7.5 format... func_convert_file_noop
checking how to convert x86_64-unknown-openbsd7.5 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$
checking for dlltool... no
checking how to associate runtime and link libraries... print -r --
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... openbsd7.5 ld.so
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 whether make supports nested variables... (cached) yes
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... (cached) none needed
checking whether cc understands -c and -o together... (cached) yes
checking dependency style of cc... (cached) gcc3
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for -ar... ar
checking whether yylex_destroy is generated by flex... version 2.5.39 => 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 libelf.h usability... yes
checking libelf.h presence... yes
checking for libelf.h... yes
checking libelf/libelf.h usability... no
checking libelf/libelf.h presence... no
checking for libelf/libelf.h... no
checking for library containing gethostent... none required
checking for library containing setsockopt... none required
checking for usb_get_string_simple in -lusb... yes
checking usb.h usability... yes
checking usb.h presence... no
configure: WARNING: usb.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: usb.h: proceeding with the compiler's result
checking for usb.h... yes
checking lusb0_usb.h usability... no
checking lusb0_usb.h presence... no
checking for lusb0_usb.h... no
checking for libusb_init in -lusb-1.0... yes
checking libusb-1.0/libusb.h usability... yes
checking libusb-1.0/libusb.h presence... no
configure: WARNING: libusb-1.0/libusb.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: libusb-1.0/libusb.h: proceeding with the compiler's result
checking for libusb-1.0/libusb.h... yes
checking libusb.h usability... no
checking libusb.h presence... no
checking for libusb.h... no
checking for libusb_init in -lusb... no
checking for libusb.h... (cached) no
checking for library containing hid_init... no
checking for sp_open in -lserialport... yes
checking libserialport.h usability... yes
checking libserialport.h presence... no
configure: WARNING: libserialport.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: libserialport.h: proceeding with the compiler's result
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 pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... 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 whether time.h and sys/time.h may both be included... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... 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
DON'T HAVE libhidapi
DON'T HAVE libreadline
DO HAVE    libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi
openbsd75vm$ make
  YACC     config_gram.c
updating config_gram.h
  LEX      lexer.c
make  all-recursive
Making all in .
  CC       avrdude-main.o
  CC       avrdude-whereami.o
  CC       avrdude-developer_opts.o
  CC       libavrdude_a-config_gram.o
  CC       libavrdude_a-lexer.o
  CC       libavrdude_a-arduino.o
  CC       libavrdude_a-avr.o
  CC       libavrdude_a-avr910.o
  CC       libavrdude_a-avrcache.o
  CC       libavrdude_a-avrftdi.o
  CC       libavrdude_a-avrftdi_tpi.o
  CC       libavrdude_a-avrintel.o
  CC       libavrdude_a-avrpart.o
  CC       libavrdude_a-bitbang.o
  CC       libavrdude_a-buspirate.o
  CC       libavrdude_a-butterfly.o
  CC       libavrdude_a-ch341a.o
  CC       libavrdude_a-config.o
  CC       libavrdude_a-confwin.o
  CC       libavrdude_a-crc16.o
  CC       libavrdude_a-dfu.o
  CC       libavrdude_a-dryrun.o
  CC       libavrdude_a-fileio.o
  CC       libavrdude_a-flip1.o
  CC       libavrdude_a-flip2.o
  CC       libavrdude_a-ft245r.o
  CC       libavrdude_a-jtagmkI.o
  CC       libavrdude_a-jtagmkII.o
  CC       libavrdude_a-jtag3.o
  CC       libavrdude_a-leds.o
  CC       libavrdude_a-linuxgpio.o
  CC       libavrdude_a-linuxspi.o
  CC       libavrdude_a-lists.o
  CC       libavrdude_a-micronucleus.o
  CC       libavrdude_a-par.o
  CC       libavrdude_a-pgm.o
  CC       libavrdude_a-pgm_type.o
  CC       libavrdude_a-pickit2.o
  CC       libavrdude_a-pindefs.o
  CC       libavrdude_a-ppi.o
  CC       libavrdude_a-ppiwin.o
  CC       libavrdude_a-serbb_posix.o
  CC       libavrdude_a-serbb_win32.o
  CC       libavrdude_a-ser_avrdoper.o
  CC       libavrdude_a-ser_posix.o
  CC       libavrdude_a-ser_win32.o
  CC       libavrdude_a-serialadapter.o
  CC       libavrdude_a-stk500.o
  CC       libavrdude_a-stk500v2.o
  CC       libavrdude_a-stk500generic.o
  CC       libavrdude_a-strutil.o
  CC       libavrdude_a-teensy.o
  CC       libavrdude_a-term.o
  CC       libavrdude_a-usbasp.o
  CC       libavrdude_a-serialupdi.o
  CC       libavrdude_a-updi_link.o
  CC       libavrdude_a-updi_state.o
  CC       libavrdude_a-updi_readwrite.o
  CC       libavrdude_a-updi_nvm.o
  CC       libavrdude_a-updi_nvm_v0.o
  CC       libavrdude_a-updi_nvm_v2.o
  CC       libavrdude_a-updi_nvm_v3.o
  CC       libavrdude_a-updi_nvm_v4.o
  CC       libavrdude_a-updi_nvm_v5.o
  CC       libavrdude_a-urclock.o
  CC       libavrdude_a-usb_hidapi.o
  CC       libavrdude_a-usb_libusb.o
  CC       libavrdude_a-usbtiny.o
  CC       libavrdude_a-update.o
  CC       libavrdude_a-wiring.o
  CC       libavrdude_a-xbee.o
Warning: target ./libavrdude.a (prerequisite of: avrdude) does not have any command (BUG)
  CCLD     avrdude
cc: error: no such file or directory: './libavrdude.a'
*** Error 1 in . (Makefile:1050 'avrdude': @echo "  CCLD    " avrdude;/bin/sh ./libtool --silent --tag=CC    --mode=link cc -Wall -Wextra -W...)
*** Error 1 in . (Makefile:2827 'all-recursive': @fail=;  if (target_option=k; case ${target_option-} in  ?) ;;  *) echo "am__make_running_w...)
*** Error 2 in /home/mcuee/build/avr/avrdude-7.3/src (Makefile:890 'all')