Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve autotools build (part 2/n) #1695

Merged
merged 6 commits into from
Aug 8, 2024

Conversation

ndim
Copy link
Contributor

@ndim ndim commented Feb 19, 2024

This is a continuation which is based on #1681 to keep the PR sizes manageable both for the submitter and the reviewers.

Starting this as a Draft PR, expect rebases and force-pushing, e.g. rebasing to main after PR #1681 has been merged to main.

Some goals for this second round of fixing the autotools build:

  • let autotools build use libavrdude VERSION and SOVERSION from cmake build, and define useful rules for the values (similar to what Automatically determine Autoconf package version from cmake package version #1663 did with the PACKAGE_VERSION)
  • texi doc build related things
    • let the default rules from automake build HTML, PDF from texinfo
    • deprecate --enable-versioned-doc, have people use --docdir to deviate from the default docdir
    • make the doc builds work for out of tree builds, and therefore the whole tree work for out of tree builds
    • get rid of recursive make for doc builds, allowing direct building of the generated *.texi files
    • fix the FreeBSD doc build (texi part), possibly more
  • make builds on NetBSD succeed out of the box
  • make builds on OpenBSD succeed out of the box
  • document the tip to try "gmake" if present
  • fix the warnings generated at autoreconf runs with the automake -Wall option
  • get rid of non-libtool library (_LIBRARIES)
  • add resource file to Windows builds
  • support the release process, as described in Improve autotool build (part 1/n) #1681 (comment)

Concerning both cmake and autotools builds:

  • use pkg-config *.pc files to find our own dependencies
  • ship libavrdude.pc file for pkg-config

Optionally, move $top_srcdir/src/configure.ac to $top_srcdir/configure.ac:

  • include README.md, NEWS, and especially COPYING into make dist tarball
  • include 'CMakeLists.txt' etc. to allow cmake builds from the dist tarball
  • have make check run tools/test-avrdude, so make distcheck would cover everything in CI builds and the compile and install stages will only need to run once during make distcheck (about halves the CPU cycles needed for autotools CI builds)
  • allows shipping a dist source tarball after some processing, e.g. with complete version information, for both releases and snapshots
  • have cmake builds use the version information recorded in the dist tarball
  • to distinguish the dist tarballs from the release and snapshot tarballs generated by Github, make the dist tarballs .tar.xz and the Github tarballs .tar.gz
  • generate dist tarballs as part of CI builds for commits and releases, and add the dist tarball to the release assets

@mcuee mcuee added the enhancement New feature or request label Feb 19, 2024
@mcuee
Copy link
Collaborator

mcuee commented Feb 19, 2024

  • let the default rules automake generates build HTML, PDF, PS from texi (PostScript? really? does cmake even build avrdude.ps?)

@ndim

Yes CMake does build ps file.

Example run from git main (Linux x86_64 github action build).
https://github.com/avrdudes/avrdude/actions/runs/7908340304/job/21587300733

[ 65%] Linking C executable avrdude
[ 65%] Built target avrdude
[ 65%] Built target avrdude_binaries
[ 66%] Generating version.texi
[ 67%] Generating programmers.txt
[ 68%] Generating programmers.texi
[ 69%] Generating programmer_types.txt
[ 70%] Generating programmer_types.texi
[ 71%] Generating parts.txt
[ 72%] Generating parts.texi
[ 72%] Generating avrdude.info
[ 72%] Built target info
[ 73%] Generating avrdude.dvi
[ 79%] Built target dvi
[ 80%] Generating avrdude.pdf
[ 86%] Built target pdf
[ 86%] Generating avrdude.ps
[ 93%] Built target ps
[ 94%] Generating avrdude-html/avrdude.html
[100%] Built target html

It also installs ps file.

Run sudo cmake --build build --target install
[  1%] Built target conf
[ 62%] Built target libavrdude
[ 65%] Built target avrdude
[ 65%] Built target avrdude_binaries
[ 72%] Built target info
[ 79%] Built target dvi
[ 86%] Built target pdf
[ 93%] Built target ps
[100%] Built target html
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/bin/avrdude
-- Installing: /usr/local/lib/libavrdude.a
-- Installing: /usr/local/include/libavrdude.h
-- Installing: /usr/local/etc/avrdude.conf
-- Installing: /usr/local/share/man/man1/avrdude.1
-- Installing: /usr/local/share/info/avrdude.info
-- Installing: /usr/local/share/doc/avrdude/avrdude.dvi
-- Installing: /usr/local/share/doc/avrdude/avrdude.pdf
-- Installing: /usr/local/share/doc/avrdude/avrdude.ps
-- Installing: /usr/local/share/doc/avrdude/avrdude-html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_3.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_4.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_10.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_21.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_31.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_16.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_35.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_24.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_42.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_26.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_17.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_28.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_6.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_43.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_19.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_18.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_41.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_12.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_9.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_34.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_37.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_40.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_abt.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_33.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_29.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_23.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_32.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_11.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_7.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_1.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_5.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_36.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_15.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_toc.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_8.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_2.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_20.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_22.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_25.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_27.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_39.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_30.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_13.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_14.html
-- Installing: /usr/local/share/doc/avrdude/avrdude-html/avrdude_38.html

@mcuee mcuee added this to the AVRDUDE 7.4 milestone Feb 20, 2024
@ndim ndim force-pushed the improve-autotools-build-part-2 branch 2 times, most recently from eb8130a to 849fa5e Compare February 21, 2024 08:36
@mcuee
Copy link
Collaborator

mcuee commented Feb 24, 2024

@ndim

Strange, somehow the auto-tools build is also broken on my FreeBSD 14 Release system (virtual machine under Proxmox PVE 8.0, Intel N100 mini PC).

Two issues.

  1. It can not detect libserialport properly.
  2. The build failed.

And it is the same for git main or avrdude-7.3 release.

I remember it was working last time, probably on another FreeBSD system.

Please check on your FreeBSD system as well. If it is broken, then please add the task to fix FreeBSD autotools build as well.

BTW, I am using latest git main (5c61b9e) and not this PR.

build log under FreeBSD 14 for git main
mcuee@freebsd14vmn100:~/build/avrdude/src $ ./bootstrap
+ rm -rf autom4te.cache
+ LIBTOOLIZE=libtoolize
+ glibtoolize --version
+ export LIBTOOLIZE
+ autoreconf -i
mcuee@freebsd14vmn100:~/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 GIT_COMMIT_DATE... 20240224
checking versioninfo item GIT_COMMIT_HASH... 5c61b9e7
checking versioninfo item GIT_TAG_HASH... e599214c
checking versioninfo derived PACKAGE_VERSION... 7.3-20240224
checking versioninfo derived AVRDUDE_FULL_VERSION... 7.3-20240224 (5c61b9e7)
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 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... no
checking for ftdi_tcioflush... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for ddk/hidsdi.h... no
checking for an ANSI C-conforming const... yes
checking for netinet/in.h... yes
checking for memset... yes
checking for select... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strtol... yes
checking for strtoul... yes
checking for gettimeofday... yes
checking for usleep... yes
checking for getaddrinfo... yes
checking for a Win32 HID library... no
checking for uint_t... no
checking for ulong_t... no
checking for serial device... /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: ac_cfg.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands


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

mcuee@freebsd14vmn100:~/build/avrdude/src $ make V=1
/bin/sh ./auto-aux/ylwrap config_gram.y y.tab.c config_gram.c y.tab.h `echo config_gram.c | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/  -e s/c++$/h++/ -e s/c$/h/` y.output config_gram.output -- bison -y -d
updating config_gram.h
/bin/sh ./auto-aux/ylwrap lexer.l lex.yy.c lexer.c -- flex
make  all-recursive
Making all in .
cc -DHAVE_CONFIG_H -I.  -DCONFIG_DIR=\"/usr/local/etc\"  -Wall -Wextra -Wno-unused-parameter -I/usr/local/include -MT avrdude-main.o -MD -MP -MF .deps/avrdude-main.Tpo -c -o avrdude-main.o `test -f 'main.c' || echo './'`main.c
mv -f .deps/avrdude-main.Tpo .deps/avrdude-main.Po
cc -DHAVE_CONFIG_H -I.  -DCONFIG_DIR=\"/usr/local/etc\"  -Wall -Wextra -Wno-unused-parameter -I/usr/local/include -MT avrdude-whereami.o -MD -MP -MF .deps/avrdude-whereami.Tpo -c -o avrdude-whereami.o `test -f 'whereami.c' || echo './'`whereami.c
mv -f .deps/avrdude-whereami.Tpo .deps/avrdude-whereami.Po
cc -DHAVE_CONFIG_H -I.  -DCONFIG_DIR=\"/usr/local/etc\"  -Wall -Wextra -Wno-unused-parameter -I/usr/local/include -MT avrdude-developer_opts.o -MD -MP -MF .deps/avrdude-developer_opts.Tpo -c -o avrdude-developer_opts.o `test -f 'developer_opts.c' || echo './'`developer_opts.c
mv -f .deps/avrdude-developer_opts.Tpo .deps/avrdude-developer_opts.Po
make[2]: don't know how to make ./libavrdude.a. Stop

make[2]: stopped in /home/mcuee/build/avrdude/src
*** Error code 1

Stop.
make[1]: stopped in /home/mcuee/build/avrdude/src
*** Error code 1

Stop.
make: stopped in /home/mcuee/build/avrdude/src

No issues to use CMake.

CMake build log of git main
mcuee@freebsd14vmn100:~/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.42.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
-- 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
-- ----------------------
-- Configuring done (0.6s)
-- 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
[  3%] [FLEX][Parser] Building scanner with flex 2.6.4
[  5%] 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
[  9%] Building C object src/CMakeFiles/libavrdude.dir/avrcache.c.o
[ 10%] Building C object src/CMakeFiles/libavrdude.dir/avrftdi.c.o
[ 11%] Building C object src/CMakeFiles/libavrdude.dir/avrftdi_tpi.c.o
[ 13%] Building C object src/CMakeFiles/libavrdude.dir/avrintel.c.o
[ 14%] Building C object src/CMakeFiles/libavrdude.dir/avrpart.c.o
[ 15%] 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
[ 21%] 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
[ 25%] Building C object src/CMakeFiles/libavrdude.dir/dfu.c.o
[ 26%] Building C object src/CMakeFiles/libavrdude.dir/dryrun.c.o
[ 27%] Building C object src/CMakeFiles/libavrdude.dir/fileio.c.o
[ 28%] Building C object src/CMakeFiles/libavrdude.dir/flip1.c.o
[ 30%] Building C object src/CMakeFiles/libavrdude.dir/flip2.c.o
[ 31%] Building C object src/CMakeFiles/libavrdude.dir/ft245r.c.o
[ 32%] 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
[ 36%] 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
[ 42%] 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
[ 46%] Building C object src/CMakeFiles/libavrdude.dir/pgm_type.c.o
[ 47%] Building C object src/CMakeFiles/libavrdude.dir/pickit2.c.o
[ 48%] Building C object src/CMakeFiles/libavrdude.dir/pindefs.c.o
[ 50%] Building C object src/CMakeFiles/libavrdude.dir/ppi.c.o
[ 51%] Building C object src/CMakeFiles/libavrdude.dir/ppiwin.c.o
[ 52%] Building C object src/CMakeFiles/libavrdude.dir/serbb_posix.c.o
[ 53%] Building C object src/CMakeFiles/libavrdude.dir/serbb_win32.c.o
[ 55%] Building C object src/CMakeFiles/libavrdude.dir/ser_avrdoper.c.o
[ 56%] Building C object src/CMakeFiles/libavrdude.dir/ser_posix.c.o
[ 57%] Building C object src/CMakeFiles/libavrdude.dir/ser_win32.c.o
[ 59%] Building C object src/CMakeFiles/libavrdude.dir/serialadapter.c.o
[ 60%] Building C object src/CMakeFiles/libavrdude.dir/serialupdi.c.o
[ 61%] Building C object src/CMakeFiles/libavrdude.dir/stk500.c.o
[ 63%] Building C object src/CMakeFiles/libavrdude.dir/stk500v2.c.o
[ 64%] Building C object src/CMakeFiles/libavrdude.dir/stk500generic.c.o
[ 65%] Building C object src/CMakeFiles/libavrdude.dir/strutil.c.o
[ 67%] Building C object src/CMakeFiles/libavrdude.dir/teensy.c.o
[ 68%] Building C object src/CMakeFiles/libavrdude.dir/term.c.o
[ 69%] Building C object src/CMakeFiles/libavrdude.dir/updi_link.c.o
[ 71%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm.c.o
[ 72%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v0.c.o
[ 73%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v2.c.o
[ 75%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v3.c.o
[ 76%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v4.c.o
[ 77%] Building C object src/CMakeFiles/libavrdude.dir/updi_nvm_v5.c.o
[ 78%] Building C object src/CMakeFiles/libavrdude.dir/updi_readwrite.c.o
[ 80%] Building C object src/CMakeFiles/libavrdude.dir/updi_state.c.o
[ 81%] Building C object src/CMakeFiles/libavrdude.dir/urclock.c.o
[ 82%] Building C object src/CMakeFiles/libavrdude.dir/usbasp.c.o
[ 84%] Building C object src/CMakeFiles/libavrdude.dir/usb_hidapi.c.o
[ 85%] Building C object src/CMakeFiles/libavrdude.dir/usb_libusb.c.o
[ 86%] Building C object src/CMakeFiles/libavrdude.dir/usbtiny.c.o
[ 88%] Building C object src/CMakeFiles/libavrdude.dir/update.c.o
[ 89%] Building C object src/CMakeFiles/libavrdude.dir/wiring.c.o
[ 90%] 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
[ 94%] Linking C static library libavrdude.a
[ 94%] 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_freebsd --target install

to install.

@ndim
Copy link
Contributor Author

ndim commented Feb 24, 2024

One thing to try on systems where GNU make is not the default make tool is always to try GNU make (often called gmake on those systems like FreeBSD or OSX).

Also, the non-libtool library needs to go.

@mcuee
Copy link
Collaborator

mcuee commented Feb 25, 2024

@ndim

Ah, I see. Once I use gmake, the build is fine. Now the only issue is why libserialport is not detected.

mcuee@freebsd14vmn100:~/build/avrdude/src $ pkg-config --cflags libserialport
-I/usr/local/include
mcuee@freebsd14vmn100:~/build/avrdude/src $ pkg-config --libs libserialport
-L/usr/local/lib -lserialport
mcuee@freebsd14vmn100:~/build/libserialport $ cat /usr/local/lib/pkgconfig/libserialport.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libserialport
Description: Cross-platform serial port access library.
URL: http://sigrok.org/wiki/Libserialport
Requires.private: libusb-2.0
Version: 0.1.1
Libs: -L${libdir} -lserialport
Libs.private:
Cflags: -I${includedir}
using gmake and the build is fine
mcuee@freebsd14vmn100:~/build/avrdude $ cd src/
mcuee@freebsd14vmn100:~/build/avrdude/src $ ./bootstrap
+ rm -rf autom4te.cache
+ LIBTOOLIZE=libtoolize
+ glibtoolize --version
+ export LIBTOOLIZE
+ autoreconf -i
mcuee@freebsd14vmn100:~/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 GIT_COMMIT_DATE... 20240224
checking versioninfo item GIT_COMMIT_HASH... 5c61b9e7
checking versioninfo item GIT_TAG_HASH... e599214c
checking versioninfo derived PACKAGE_VERSION... 7.3-20240224
checking versioninfo derived AVRDUDE_FULL_VERSION... 7.3-20240224 (5c61b9e7)
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 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... no
checking for ftdi_tcioflush... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for ddk/hidsdi.h... no
checking for an ANSI C-conforming const... yes
checking for netinet/in.h... yes
checking for memset... yes
checking for select... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strtol... yes
checking for strtoul... yes
checking for gettimeofday... yes
checking for usleep... yes
checking for getaddrinfo... yes
checking for a Win32 HID library... no
checking for uint_t... no
checking for ulong_t... no
checking for serial device... /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: ac_cfg.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands


Configuration summary:
----------------------
DO HAVE    libelf
DO HAVE    libusb
DO HAVE    libusb_1_0
DO HAVE    libftdi1
DON'T HAVE libftdi
DON'T HAVE libhid
DO HAVE    libhidapi
DO HAVE    libreadline
DON'T HAVE libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi
mcuee@freebsd14vmn100:~/build/avrdude/src $ gmake
gmake  all-recursive
gmake[1]: Entering directory '/home/mcuee/build/avrdude/src'
Making all in .
gmake[2]: Entering directory '/home/mcuee/build/avrdude/src'
  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
  AR       libavrdude.a
  CCLD     avrdude
  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-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-dfu.lo
  CC       libavrdude_la-dryrun.lo
  CC       libavrdude_la-fileio.lo
  CC       libavrdude_la-flip1.lo
  CC       libavrdude_la-flip2.lo
  CC       libavrdude_la-ft245r.lo
  CC       libavrdude_la-jtagmkI.lo
  CC       libavrdude_la-jtagmkII.lo
  CC       libavrdude_la-jtag3.lo
  CC       libavrdude_la-leds.lo
  CC       libavrdude_la-linuxgpio.lo
  CC       libavrdude_la-linuxspi.lo
  CC       libavrdude_la-lists.lo
  CC       libavrdude_la-micronucleus.lo
  CC       libavrdude_la-par.lo
  CC       libavrdude_la-pgm.lo
  CC       libavrdude_la-pgm_type.lo
  CC       libavrdude_la-pickit2.lo
  CC       libavrdude_la-pindefs.lo
  CC       libavrdude_la-ppi.lo
  CC       libavrdude_la-ppiwin.lo
  CC       libavrdude_la-serbb_posix.lo
  CC       libavrdude_la-serbb_win32.lo
  CC       libavrdude_la-ser_avrdoper.lo
  CC       libavrdude_la-ser_posix.lo
  CC       libavrdude_la-ser_win32.lo
  CC       libavrdude_la-serialadapter.lo
  CC       libavrdude_la-stk500.lo
  CC       libavrdude_la-stk500v2.lo
  CC       libavrdude_la-stk500generic.lo
  CC       libavrdude_la-strutil.lo
  CC       libavrdude_la-teensy.lo
  CC       libavrdude_la-term.lo
  CC       libavrdude_la-usbasp.lo
  CC       libavrdude_la-serialupdi.lo
  CC       libavrdude_la-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
gmake[2]: Leaving directory '/home/mcuee/build/avrdude/src'
gmake[1]: Leaving directory '/home/mcuee/build/avrdude/src'
mcuee@freebsd14vmn100:~/build/avrdude/src $ ldd ./avrdude
./avrdude:
        libusb.so.3 => /usr/lib/libusb.so.3 (0x11af344bb000)
        libelf.so.2 => /lib/libelf.so.2 (0x11af34f33000)
        libthr.so.3 => /lib/libthr.so.3 (0x11af359b8000)
        libm.so.5 => /lib/libm.so.5 (0x11af363c6000)
        libhidapi.so.0 => /usr/local/lib/libhidapi.so.0 (0x11af372b0000)
        libreadline.so.8 => /usr/local/lib/libreadline.so.8 (0x11af372cc000)
        libncursesw.so.9 => /lib/libncursesw.so.9 (0x11af37503000)
        libtinfow.so.9 => /lib/libtinfow.so.9 (0x11af392c0000)
        libftdi1.so.2 => /usr/local/lib/libftdi1.so.2 (0x11af3771d000)
        libc.so.7 => /lib/libc.so.7 (0x11af37ebf000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x11af398cb000)
        [vdso] (0x11af339af000)

@ndim
Copy link
Contributor Author

ndim commented Feb 25, 2024

Not using pkgconfig for anything yet.

@mcuee
Copy link
Collaborator

mcuee commented Feb 25, 2024

Not using pkgconfig for anything yet.

I understand. On the other hand, I do not see why libserialport is special in this aspect, it is the same for other dependancies.

BTW, it is a bit strange that I need to use CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" for FreeBSD. By right you do not need to do anything if the library is located under /usr or /usr/local.

@dl8dtl
Copy link
Contributor

dl8dtl commented Feb 25, 2024

Once I use gmake, the build is fine.

gmake was basically already required before, in particular when trying to run parallel jobs (-j <N>).
I never tried to analyze what was the reason, but given that the auto tools are GNUish, it's probably not surprising that they are only really tested inside the GNU ecosystem.

@ndim ndim force-pushed the improve-autotools-build-part-2 branch from 849fa5e to 77edcdb Compare February 29, 2024 07:23
@mcuee mcuee removed this from the AVRDUDE 7.4 milestone May 20, 2024
@ndim ndim force-pushed the improve-autotools-build-part-2 branch 4 times, most recently from 84b2f2d to 646423d Compare August 1, 2024 17:42
@stefanrueger
Copy link
Collaborator

@ndim Just an advance warning that the team have started testing with a view to release v8.0 around the w/end 17/18 Aug. If you have time to bring this PR into a shape that we can merge even partial progress that would be brill (but no worries if not).

Elaborate a bit more on the VERSIONINFO_* and versioninfo_*
m4 macros. This should help me get back into things when I
come back to this in a year or so and have forgotten most
of the details.
Guard m4 macro calls with m4_pattern_forbid for all
macros which do not come with Autoconf/Automake.

All other macros might not be present on the system,
and it is better to m4_pattern_forbid them and have
autoreconf fail, than to have autoreconf generate a
malformed broken configure script which then always
fails with a weird error message.
As no-dist-built-files was only introduced in Automake 1.16.4,
we cannot rely on that feature being present and need to continue
using our own workaround.

This hooks the dist-hook in a more robust fashion in the face
of multiple dist-hook targets (and versioninfo.mk already uses
one).
@ndim ndim force-pushed the improve-autotools-build-part-2 branch from 646423d to 04c791f Compare August 6, 2024 22:38
As libtool is supposed to be able to build libraries for every
target system, we delegate library building to libtool and stop
building our own static libavrdude.a library.

You can control whether the static/dynamic library is built by
using the --(disable|enable)-(static|dynamic) configure flags.
This transfers the information from the CMakeLists.txt
libavrdude VERSION and SOVERSION into the autotools
configure script and (partly) uses the information to
build the libavrdude.la libtool library.

At this time, VERSION must always be SOVERSION.0.0 for
this to work (and that is checked).
@ndim ndim force-pushed the improve-autotools-build-part-2 branch from 04c791f to c4d903e Compare August 6, 2024 22:55
@ndim
Copy link
Contributor Author

ndim commented Aug 6, 2024

@stefanrueger While there are a considerable number of things I still want to do (see all the empty checkboxes in the above comments), the commits currently in this PR's branch are relative incomplex and I have confidence in them.

The one exception being the automatic transfer of library version information from cmake to autotools. That information transfer of the number "2" works, but the library version apart from the number "2" is certainly not a well-thought-out problem space. OK, this is a good first step.

Oh, and the CI runs succeeding is a not a good indicator that everything here works as intended. E.g. are no CI checks yet which compare the build results from cmake and automake builds.

So I am good with merging this as-is. If you want something else specifically quickly for the 8.0 release, tell me about it and I can try.

@ndim ndim marked this pull request as ready for review August 6, 2024 22:57
@stefanrueger
Copy link
Collaborator

@ndim thanks! Perhaps @mcuee can review and if OK I'll merge with the next mergefest.

@mcuee
Copy link
Collaborator

mcuee commented Aug 6, 2024

@ndim thanks! Perhaps @mcuee can review and if OK I'll merge with the next mergefest.

Yes I will carry out simple review (not an expert to really review the changes) and carry out tests across different OS over the weekend.

@mcuee
Copy link
Collaborator

mcuee commented Aug 7, 2024

First test under MSYS2 mingw64 -- OK

Windows -- no building of shared library -- this is a known issue.

MINGW64 /c/work/avr/avrdude_test/avrdude_ndim/src
$ ./configure --prefix=/mingw64
configure: loading site script /etc/config.site
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking target system type... x86_64-w64-mingw32
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/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... 20240807
checking versioninfo item GIT_COMMIT_HASH... c4d903e1
checking versioninfo item GIT_TAG_HASH... a855692d
checking versioninfo derived PACKAGE_VERSION... 7.3-20240807
checking versioninfo derived AVRDUDE_FULL_VERSION... 7.3-20240807 (c4d903e1)
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.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for gawk... (cached) gawk
checking for a sed that does not truncate output... /usr/bin/sed
checking for bison... bison -y
checking for flex... flex
checking for lex output file root... lex.yy
checking for lex library... none needed
checking whether yytext is a pointer... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw64/bin/nm -B
checking the name lister (/mingw64/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-w64-mingw32 file names to x86_64-w64-mingw32 format... func_convert_file_msys_to_w32
checking how to convert x86_64-w64-mingw32 file names to toolchain format... func_convert_file_msys_to_w32
checking for C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw64/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : 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... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -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 (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
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... /mingw64/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... yes
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... no
checking for library containing setsockopt... none required
checking for usb_get_string_simple in -lusb... yes
checking for usb.h... no
checking for lusb0_usb.h... yes
checking for libusb_init in -lusb-1.0... yes
checking for libusb-1.0/libusb.h... yes
checking for libusb.h... no
checking for libusb_init in -lusb... no
checking for libusb.h... (cached) no
checking for library containing hid_init... -lhidapi
checking for hidapi/hidapi.h... yes
checking for sp_open in -lserialport... yes
checking for libserialport.h... yes
checking for ftdi_new in -lftdi1... yes
checking for ftdi_usb_get_strings in -lftdi... no
checking for ftdi_tcioflush... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for fcntl.h... yes
checking for sys/ioctl.h... no
checking for sys/time.h... yes
checking for termios.h... no
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... no
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... yes
checking for uint_t... no
checking for ulong_t... no
checking for serial device... com1
checking if gcc accepts -Wno-pointer-sign ... yes
checking if gcc accepts -mno-cygwin... no
configure: Your compiler does not understand the -mno-cygwin option.
configure: You might want to select an alternative compiler, like
configure:
configure: CC=mingw32-gcc ./configure
configure:
checking if linker accepts -static... 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
DON'T HAVE libftdi
DO HAVE    libhid
DO HAVE    libhidapi
DO HAVE    libreadline
DO HAVE    libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi

XFCHEN@1TV4433 MINGW64 /c/work/avr/avrdude_test/avrdude_ndim/src
$ make
  YACC     config_gram.c
updating config_gram.h
  LEX      lexer.c
make  all-recursive
make[1]: Entering directory '/c/work/avr/avrdude_test/avrdude_ndim/src'
Making all in .
make[2]: Entering directory '/c/work/avr/avrdude_test/avrdude_ndim/src'
  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-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
libtool: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only
  CCLD     avrdude.exe
make[2]: Leaving directory '/c/work/avr/avrdude_test/avrdude_ndim/src'
make[1]: Leaving directory '/c/work/avr/avrdude_test/avrdude_ndim/src'
$ ../tools/test-avrdude -e ./avrdude.exe -p "-c usbasp -p m2560"
Testing ./avrdude.exePrepare "-c usbasp -p m2560" and press 'enter' or 'space' to continue. Press any other key to skip
✅   0.648 s: fuse access: clear, set and read eesave fuse bit
✅   0.620 s: fuse access: set eesave fusebit to delete EEPROM on chip erase
✅   1.283 s: chip erase
✅  36.415 s: flash -U write/verify holes_rjmp_loops_262144B.hex
✅  13.371 s: flash -T write/verify holes_rjmp_loops_262144B.hex
✅   0.800 s: eeprom check whether programmer can flip 0s to 1s
✅  11.835 s: eeprom -U write/verify holes_pack_my_box_4096B.hex
✅  23.280 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_4096B.hex
✅  14.165 s: chip erase and spot check flash is actually erased
✅   1.104 s: spot check eeprom is erased, too

@mcuee
Copy link
Collaborator

mcuee commented Aug 7, 2024

Second test under Ubuntu 20.04 -- OK for build and installation process.

mcuee@UbuntuSwift3 ~/build/avr/avrdude_ndim/src (improve-autotools-build-part-2)$ ./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@UbuntuSwift3 ~/build/avr/avrdude_ndim/src (improve-autotools-build-part-2)$ ./configure 
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/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... 20240807
checking versioninfo item GIT_COMMIT_HASH... c4d903e1
checking versioninfo item GIT_TAG_HASH... a855692d
checking versioninfo derived PACKAGE_VERSION... 7.3-20240807
checking versioninfo derived AVRDUDE_FULL_VERSION... 7.3-20240807 (c4d903e1)
checking versioninfo derived libtool -version-info for libavrdude... 2:0:0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for gawk... (cached) gawk
checking for a sed that does not truncate output... /usr/bin/sed
checking for bison... bison -y
checking for flex... flex
checking for lex output file root... lex.yy
checking for lex library... none needed
checking whether yytext is a pointer... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /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... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu 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... @
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... /usr/bin/dd
checking how to truncate binary pipes... /usr/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 -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux 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.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... yes
checking for libusb-1.0/libusb.h... yes
checking for libusb.h... no
checking for libusb_init in -lusb... no
checking for libusb.h... (cached) no
checking for library containing hid_init... -lhidapi-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... no
checking for ftdi_tcioflush... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for ddk/hidsdi.h... no
checking for an ANSI C-conforming const... yes
checking for netinet/in.h... yes
checking for memset... yes
checking for select... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strtol... yes
checking for strtoul... yes
checking for gettimeofday... yes
checking for usleep... yes
checking for getaddrinfo... yes
checking for a Win32 HID library... no
checking for uint_t... no
checking for ulong_t... no
checking for serial device... /dev/ttyS0
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
DON'T HAVE libftdi
DON'T HAVE libhid
DO HAVE    libhidapi
DO HAVE    libreadline
DO HAVE    libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi
mcuee@UbuntuSwift3 ~/build/avr/avrdude_ndim/src (improve-autotools-build-part-2)$ make
  YACC     config_gram.c
updating config_gram.h
  LEX      lexer.c
make  all-recursive
make[1]: Entering directory '/home/mcuee/build/avr/avrdude_ndim/src'
Making all in .
make[2]: Entering directory '/home/mcuee/build/avr/avrdude_ndim/src'
  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-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
make[2]: Leaving directory '/home/mcuee/build/avr/avrdude_ndim/src'
make[1]: Leaving directory '/home/mcuee/build/avr/avrdude_ndim/src'
mcuee@UbuntuSwift3 ~/build/avr/avrdude_ndim/src (improve-autotools-build-part-2)$ sudo make install
make  install-recursive
make[1]: Entering directory '/home/mcuee/build/avr/avrdude_ndim/src'
Making install in .
make[2]: Entering directory '/home/mcuee/build/avr/avrdude_ndim/src'
make[3]: Entering directory '/home/mcuee/build/avr/avrdude_ndim/src'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/bash ./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
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/usr/local/bin'
  /bin/bash ./libtool   --mode=install /usr/bin/install -c avrdude '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/avrdude /usr/local/bin/avrdude
 /usr/bin/mkdir -p '/usr/local/bin'
 /usr/bin/install -c elf2tag '/usr/local/bin'
Backing up avrdude.conf in /usr/local/etc
 /usr/bin/mkdir -p '/usr/local/etc'
 /usr/bin/install -c -m 644 avrdude.conf '/usr/local/etc'
 /usr/bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 libavrdude.h libavrdude-avrintel.h '/usr/local/include'
 /usr/bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 avrdude.1 '/usr/local/share/man/man1'
make[3]: Leaving directory '/home/mcuee/build/avr/avrdude_ndim/src'
make[2]: Leaving directory '/home/mcuee/build/avr/avrdude_ndim/src'
make[1]: Leaving directory '/home/mcuee/build/avr/avrdude_ndim/src'

There is an issue with the programming but it has nothing to do with this PR as git main also failed. Need to debug.It could be a problem of my AVRISPmkii clone as well.

mcuee@UbuntuSwift3 ~/build/avr/avrdude_ndim/src (improve-autotools-build-part-2)$ ../tools/test-avrdude -p "-c avrisp2 -p m328pb"
Testing avrdudePrepare "-c avrisp2 -p m328pb" and press 'enter' or 'space' to continue. Press any other key to skip
✅   0.437 s: fuse access: clear, set and read eesave fuse bit
✅   0.428 s: fuse access: set eesave fusebit to delete EEPROM on chip erase
✅   0.525 s: chip erase
✅   1.236 s: flash -U write/verify holes_rjmp_loops_32768B.hex
✅   0.767 s: flash -T write/verify holes_rjmp_loops_32768B.hex
✅   0.440 s: eeprom check whether programmer can flip 0s to 1s
✅   0.704 s: eeprom -U write/verify holes_pack_my_box_1024B.hex
❌   0.712 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_1024B.hex (failed command below)
$ avrdude -qq -c avrisp2 -p m328pb -T "write eeprom ../tools/test_files/holes_the_five_boxing_wizards_1024B.hex:a" -T flush -T "write eeprom ../tools/test_files/holes_pack_my_box_1024B.hex:a"
❌   0.063 s: eeprom -T write/verify lorem_ipsum_1024B.srec (failed command below)
$ avrdude -qq -c avrisp2 -p m328pb -T "write eeprom ../tools/test_files/lorem_ipsum_1024B.srec:a"
❌   0.041 s: chip erase and spot check flash is actually erased (failed command below)
$ avrdude -qq -c avrisp2 -p m328pb -e -FAU flash:w:0xff:m -U flash:v:../tools/test_files/holes_flash_0xff_32768B.hex

One or more AVRDUDE "-c avrisp2 -p m328pb" tests failed. Do you want to retry this particular test? (y/n): n

git main:

mcuee@UbuntuSwift3 ~/build/avr/avrdude_main/tools (main)$ ./test-avrdude -p "-c avrisp2 -p m328pb"
Testing avrdudePrepare "-c avrisp2 -p m328pb" and press 'enter' or 'space' to continue. Press any other key to skip
✅   0.450 s: fuse access: clear, set and read eesave fuse bit
✅   0.432 s: fuse access: set eesave fusebit to delete EEPROM on chip erase
✅   0.520 s: chip erase
❌ 134.756 s: flash -U write/verify holes_rjmp_loops_32768B.hex (failed command below)
$ avrdude -qq -c avrisp2 -p m328pb -Uflash:w:./test_files/holes_rjmp_loops_32768B.hex
❌   2.537 s: flash -U write/verify rjmp_loops_for_bootloaders_32768B.hex (failed command below)
$ avrdude -qq -c avrisp2 -p m328pb -Uflash:w:./test_files/rjmp_loops_for_bootloaders_32768B.hex
❌   2.762 s: flash -T write/verify holes_rjmp_loops_32768B.hex (failed command below)
$ avrdude -qq -c avrisp2 -p m328pb -T "write flash ./test_files/holes_rjmp_loops_32768B.hex:a"
❌   1.464 s: flash -T write/verify rjmp_loops_for_bootloaders_32768B.hex (failed command below)
$ avrdude -qq -c avrisp2 -p m328pb -T "write flash ./test_files/rjmp_loops_for_bootloaders_32768B.hex:a"
✅   0.444 s: eeprom check whether programmer can flip 0s to 1s
✅   0.719 s: eeprom -U write/verify holes_pack_my_box_1024B.hex
✅   1.069 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_1024B.hex
✅   0.862 s: chip erase and spot check flash is actually erased
✅   0.488 s: spot check eeprom is erased, too

One or more AVRDUDE "-c avrisp2 -p m328pb" tests failed. Do you want to retry this particular test? (y/n): n

@stefanrueger
Copy link
Collaborator

@mcuee Thanks for testing. I will merge soon.

@stefanrueger stefanrueger merged commit 3cfce5d into avrdudes:main Aug 8, 2024
13 checks passed
@ndim ndim deleted the improve-autotools-build-part-2 branch August 9, 2024 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants