Stuart Henderson writes:

> On 2023/07/27 14:44, Nam Nguyen wrote:
>> Stuart Henderson writes:
>> 
>> > tests fail to run completely here:
>> >
>> > cc -I/usr/local/include -I/usr/local/include -DHAVE_LIBSSL
>> > -I/usr/local/include -DNDEBUG -O2 -pipe -I/usr/local/include
>> > -L/usr/local/lib -o ./unit-tests ./unit-tests.c
>> > ./unit-tests.c:31:10: fatal error: 'wget.h' file not found
>> 
>> I can reproduce this if I run `make check' in ${WRKSRC}. If I run `make
>> test' in the port directory it is able to run the test suite, and it
>> omits that compile line.
>
> It usually fails "make test" in the port directory for me.
> Seems I am able to get it to work (not sure if reliably or just
> sometimes) with MAKE_JOBS=6 though.

I can reproduce this wget.h not found error with MAKE_JOBS=1. naddy@
reported this error a while ago, too.

Here is an inline diff that additionally switches back to USE_GMAKE =
Yes so tests can reliably compile with MAKE_JOBS=1. Still OK?

It is weird that it successfully builds unit-tests (before ...) then
tries to rebuild it again (after ...):

--8<---------------cut here---------------start------------->8---
cc   -I/usr/local/include -I/usr/local/include  -DHAVE_LIBSSL  
-I/usr/local/include -DNDEBUG -O2 -pipe  -L/usr/local/lib -o unit-tests 
unit-tests.o ../src/libunittest.a ../lib/libgnu.a          
/usr/local/lib/libiconv.so.7.1 /usr/local/lib
/libintl.so.7.0 /usr/local/lib/libiconv.so.7.1 -Wl,-rpath,/usr/local/lib  
/usr/local/lib/libunistring.so.0.1 /usr/local/lib/libiconv.so.7.1 
-Wl,-rpath,/usr/local/lib  -L/usr/local/lib -lpcre2-8 -L/usr/local/lib -lidn2 
-lssl -lcrypto -lz -L
/usr/local/lib -lpsl

...

cd ../src && make  libunittest.a
`libunittest.a' is up to date.
cc -I/usr/local/include -I/usr/local/include  -DHAVE_LIBSSL  
-I/usr/local/include -DNDEBUG -O2 -pipe -I/usr/local/include -L/usr/local/lib 
-o ./unit-tests ./unit-tests.c
./unit-tests.c:31:10: fatal error: 'wget.h' file not found
#include "wget.h"
         ^~~~~~~~
1 error generated.
--8<---------------cut here---------------end--------------->8---

This seems like difference in behavior between make and gmake. Maybe
because unit-tests is specified as an explicit rule in [3] it somehow
wants to rebuild it at some point and the include paths are
insufficient? Maybe it is the usage of parallel-tests feature in [2] and
[4]?

[1] 
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/Make-Target-Lookup.html#Make-Target-Lookup

"OpenBSD and FreeBSD make, however, never perform a VPATH search for a
dependency that has an explicit rule. This is extremely annoying."

[2] 
https://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html#Parallel-Test-Harness

"it is not possible to specify distributed tests that are themselves
generated by means of explicit rules, in a way that is portable to all
make implementations (see Make Target Lookup in The Autoconf Manual, the
semantics of FreeBSD and OpenBSD make conflict with this). In case of
doubt you may want to require to use GNU make, or work around the issue
with inference rules to generate the tests."

[3] ${WRKSRC}/tests/Makefile

--8<---------------cut here---------------start------------->8---
   2205 unit-tests$(EXEEXT): $(unit_tests_OBJECTS) $(unit_tests_DEPENDENCIES) 
$(EXTRA_unit_tests_DEPENDENCIES)
   2206         @rm -f unit-tests$(EXEEXT)
   2207         $(AM_V_CCLD)$(LINK) $(unit_tests_OBJECTS) $(unit_tests_LDADD) 
$(LIBS)
--8<---------------cut here---------------end--------------->8---

[4] parallel-tests feature 
https://www.gnu.org/software/automake/manual/1.11.6/html_node/Simple-Tests-using-parallel_002dtests.html

--8<---------------cut here---------------start------------->8---
testenv/README
6:This Test Suite exploits the Parallel Test Harness available in GNU
Autotools.

testenv/Makefile
2077:AUTOMAKE_OPTIONS = parallel-tests

testenv/Makefile.am
109:AUTOMAKE_OPTIONS = parallel-tests

tests/Makefile
45:# see
http://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html#Parallel-Test-Harness
--8<---------------cut here---------------end--------------->8---

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/wget/Makefile,v
retrieving revision 1.91
diff -u -p -u -p -r1.91 Makefile
--- Makefile    3 Apr 2022 23:42:36 -0000       1.91
+++ Makefile    28 Jul 2023 01:43:27 -0000
@@ -1,6 +1,6 @@
 COMMENT =      retrieve files from the web via HTTP, HTTPS and FTP
 
-DISTNAME =     wget-1.21.3
+DISTNAME =     wget-1.21.4
 CATEGORIES =   net
 
 HOMEPAGE =     https://www.gnu.org/software/wget/
@@ -30,6 +30,8 @@ TEST_DEPENDS =                www/p5-HTTP-Daemon ${MOD
 TEST_DEPENDS +=                www/p5-HTTP-Message security/p5-IO-Socket-SSL
 
 FAKE_FLAGS =           sysconfdir="${PREFIX}/share/examples/wget"
+
+USE_GMAKE =    Yes
 
 CONFIGURE_STYLE =      gnu
 CONFIGURE_ARGS =       --with-ssl=openssl
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/wget/distinfo,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 distinfo
--- distinfo    3 Apr 2022 23:42:36 -0000       1.28
+++ distinfo    28 Jul 2023 01:43:27 -0000
@@ -1,2 +1,2 @@
-SHA256 (wget-1.21.3.tar.gz) = Vya7i8XKD23HEQ9kFuS7cBni0v9b+T0cov/MZlbyIOU=
-SIZE (wget-1.21.3.tar.gz) = 5079864
+SHA256 (wget-1.21.4.tar.gz) = gVQvXO+4+qzDm7vGyC3tgOPkqIUFrnLqUd8nUlvN4Ew=
+SIZE (wget-1.21.4.tar.gz) = 5059591
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/net/wget/patches/patch-Makefile_in,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 patch-Makefile_in
--- patches/patch-Makefile_in   3 Apr 2022 23:42:36 -0000       1.6
+++ patches/patch-Makefile_in   28 Jul 2023 01:43:27 -0000
@@ -1,7 +1,7 @@
 Index: Makefile.in
 --- Makefile.in.orig
 +++ Makefile.in
-@@ -1691,7 +1691,7 @@ distuninstallcheck_listfiles = find . -type f | \
+@@ -1895,7 +1895,7 @@ distuninstallcheck_listfiles = find . -type f | \
  ACLOCAL_AMFLAGS = -I m4
  
  # subdirectories in the distribution
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/wget/pkg/PLIST,v
retrieving revision 1.29
diff -u -p -u -p -r1.29 PLIST
--- pkg/PLIST   11 Mar 2022 19:48:11 -0000      1.29
+++ pkg/PLIST   28 Jul 2023 01:43:27 -0000
@@ -50,6 +50,10 @@ share/locale/it/LC_MESSAGES/wget-gnulib.
 share/locale/it/LC_MESSAGES/wget.mo
 share/locale/ja/LC_MESSAGES/wget-gnulib.mo
 share/locale/ja/LC_MESSAGES/wget.mo
+share/locale/ka/
+share/locale/ka/LC_MESSAGES/
+share/locale/ka/LC_MESSAGES/wget-gnulib.mo
+share/locale/ka/LC_MESSAGES/wget.mo
 share/locale/ko/LC_MESSAGES/wget-gnulib.mo
 share/locale/ko/LC_MESSAGES/wget.mo
 share/locale/lt/

Reply via email to