libtool link undefined reference as gl_LT/LIBOBJS contain only a single entry on 2.0.1 under Cygwin
All libtool link
steps fail with undefined reference to wget_...
as gl_LT/lt/LIBOBJS/libobjs
contain only one entry on 2.0.1 under Cygwin: see below for a sample from a single link.
Import library archive .../wget2/wget2-2.0.1-1.x86_64/build/libwget/.libs/libwget.dll.a is only ~1.5KB on 2.0.1, instead of ~500KB on 2.0.0, where everything built fine with no issues, although the SO/DLL is 2.2MB in both cases!
No obvious relevant differences between files using gl_LT/lt/LIBOBJS/libobjs
.
Need pointers to where those variables are set or accumulated in the build.
CI job log is available at Cygwin Scallywag CI Github Action
libtool: link: gcc -DMALLOC_RETURNS_NONNULL -I/usr/include/p11-kit-1 -DNDEBUG -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=.../wget2/wget2-2.0.1-1.x86_64/build=/usr/src/debug/wget2-2.0.1-1 -fdebug-prefix-map=.../wget2/wget2-2.0.1-1.x86_64/src/wget2-2.0.1=/usr/src/debug/wget2-2.0.1-1 -Wno-char-subscripts -fno-PIC -o .libs/batch_loader.exe batch_loader.o ../lib/.libs/libgnu.a ../libwget/.libs/libwget.dll.a -lwget -lpthread -liconv -lintl -lpcre2-8 -lidn2 -lzstd -lbrotlidec -llzma -lz -lbz2 -lgpgme -lnghttp2 -lpsl -lgnutls -L.../wget2/wget2-2.0.1-1.x86_64/build/libwget/.libs
...
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: batch_loader.o: in function `downloader_thread':
/usr/src/debug/wget2-2.0.1-1/examples/batch_loader.c:172: undefined reference to `wget_strncasecmp_ascii'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/wget2-2.0.1-1/examples/batch_loader.c:174: undefined reference to `wget_strncasecmp_ascii'
...
collect2: error: ld returned 1 exit status
libtool: link: gcc -DMALLOC_RETURNS_NONNULL -I/usr/include/p11-kit-1 -DNDEBUG -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=.../wget2/wget2-2.0.1-1.x86_64/build=/usr/src/debug/wget2-2.0.1-1 -fdebug-prefix-map=.../wget2/wget2-2.0.1-1.x86_64/src/wget2-2.0.1=/usr/src/debug/wget2-2.0.1-1 -Wno-char-subscripts -fno-PIC -o .libs/http_multi_get.exe http_multi_get.o ../lib/.libs/libgnu.a ../libwget/.libs/libwget.dll.a -lwget -lpthread -liconv -lintl -lpcre2-8 -lidn2 -lzstd -lbrotlidec -llzma -lz -lbz2 -lgpgme -lnghttp2 -lpsl -lgnutls -L.../wget2/wget2-2.0.1-1.x86_64/build/libwget/.libs
make[2]: *** [Makefile:1939: getstream.exe] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1931: batch_loader.exe] Error 1