Bug 239986 - devel/nspr: 4.22 fails to build with TEST=on
Summary: devel/nspr: 4.22 fails to build with TEST=on
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gecko (Nobody)
Keywords: regression
Depends on:
Reported: 2019-08-20 09:20 UTC by Ross McKelvie
Modified: 2019-08-23 22:05 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gecko)

nspr-4.22.log generated by poudriere (88.52 KB, text/plain)
2019-08-20 09:20 UTC, Ross McKelvie
no flags Details
svn-diff-nspr (5.55 KB, patch)
2019-08-20 12:31 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-nspr_v2 (5.10 KB, patch)
2019-08-20 12:41 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-nspr_v3 (15.04 KB, patch)
2019-08-22 09:58 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ross McKelvie 2019-08-20 09:20:54 UTC
Created attachment 206722 [details]
nspr-4.22.log generated by poudriere

I'm experiencing build errors in devel/nspr since the update to version 4.22 and have attached the poudriere build log.

attach.c:170:2: error: unterminated conditional directive
attach.c:275:2: error: expected '}'
attach.c:109:1: note: to match this '{'
attach.c:176:8: error: use of undeclared label 'exit_now'
                goto exit_now;
3 errors generated.
gmake[1]: *** [../../config/rules.mk:450: attach.o] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/nspr/work/nspr-4.22/nspr/pr/tests'
*** Error code 2

make: stopped in /usr/ports/devel/nspr
Comment 1 Walter Schwarzenfeld freebsd_triage 2019-08-20 12:31:36 UTC
Created attachment 206723 [details]

Patch for tests.
Comment 2 Walter Schwarzenfeld freebsd_triage 2019-08-20 12:41:31 UTC
Created attachment 206724 [details]

Removed unwanted doubled lines in patch-nonblock.c.
Comment 3 gja822 2019-08-21 10:33:38 UTC
Thanks! For me your patch solved the build.

But by the way, layer and nblayer tests (run via make test) hang forever (and it's for a long time for the port). Not to mention just failed tests.
Comment 4 Walter Schwarzenfeld freebsd_triage 2019-08-21 13:51:01 UTC
Does not hang on 11.3amd64:

Passed nearly all tests except three (PR_loadlibrary failed libfilename and libmyso. libmy.so does not exist) and (fdcach:	fd stack malfunctioned)

but ends with:
       vercheck			Passed
         version			Passed
          writev			Passed
         xnotify			Passed
         zerolen			Passed
END			Wed Aug 21 15:46:22 CEST 2019
*** Error code 1
Comment 5 gja822 2019-08-21 17:26:51 UTC
(In reply to Walter Schwarzenfeld from comment #4)
Really? I have on amd64 11-STABLE the hang of layer and nblayer for a very long time. I use only ports (with portsnap support).
I have to kill "layer" and "nblayer" processes otherwise the test did not end forever. My failed are:

        dlltest			FAILED
	dlltest:	PR_LoadLibrary failed (-5977, 0, Cannot open "dll/libmy.so")
          fdcach			FAILED
	fdcach:	fd stack malfunctioned
         initclk			FAILED
	initclk:	Elapsed time should be 3000 ms but is 3108 ms
	initclk:	FAIL
           layer			FAILED
	layer:	Beginning non-layered test
	layer:	Ending non-layered test
	layer:	Beginning layered test
     libfilename			FAILED
	libfilename:	PR_LoadLibrary failed
         nblayer			FAILED
	nblayer:	Beginning non-layered test
	nblayer:	Ending non-layered test
	nblayer:	Beginning layered test
        timetest			FAILED
	timetest:	PR_ParseTimeString() incorrect
	timetest:	t is -1664496000000000, t2 is -1664495960000000, time string is Wed Apr 4 05:31:40 +0531 1917
END			Thu Aug 22 00:22:43 +07 2019
*** Error code 1

And if "layer" waits something (part of ps -ax after hours of waiting shows no CPU usage):

20896  2  I+       0:00.08 ./layer

the "nblayer" uses some CPU cycles (after waiting dozens of minutes):

21724  2  I+      39:46.26 ./nblayer
Comment 6 Walter Schwarzenfeld freebsd_triage 2019-08-22 09:54:06 UTC
You can try chang in
work/pr/tests/runtests.sh to

208 printf " ${TEST_TIMEOUT}"
209 if [ $OS_PLATFORM = "Windows_95" ] || [ $OS_PLATFORM = "Windows_98" ] || [ $OS_PLATFORM = "Windows_NT" ] || [  $OS_PLATFORM = "OS/2"] || [ $OS_PLATFORM = "FreeBSD" ] ; then

Change the value of TEST_TIMEOUT as you need.
I cannot test it, cause I cannot reproduce.
Comment 7 Walter Schwarzenfeld freebsd_triage 2019-08-22 09:58:18 UTC
Created attachment 206784 [details]

I remove the tests for libfilename and dlltest (both needs libmy.so which not exists and fdcache (which  seems and old bug I found in mozilla bug PR's).
Comment 8 Jan Beich freebsd_committer 2019-08-22 11:55:07 UTC
Comment on attachment 206784 [details]

- Build fails even without patches under files/ directory, so this is an upstream regression and should be reported upstream in order to get the fix right
- Patches for tests should be in files/patch-tests unless they're patch of an upstream fix; splitting patches per-file doesn't scale with many unrelated changes
- Tests are not installed, so bumping PORTREVISION is not necessary
Comment 9 Jan Beich freebsd_committer 2019-08-22 12:07:50 UTC
I've filed upstream bug. The link is in See Also field.
Comment 10 commit-hook freebsd_committer 2019-08-23 21:56:03 UTC
A commit references this bug:

Author: jbeich
Date: Fri Aug 23 21:55:41 UTC 2019
New revision: 509663
URL: https://svnweb.freebsd.org/changeset/ports/509663

  devel/nspr: unbreak TEST=on build after r509330

  attach.c:170:2: error: unterminated conditional directive
   #ifdef _PR_PTHREADS
  attach.c:275:2: error: expected '}'
  attach.c:109:1: note: to match this '{'
  attach.c:176:8: error: use of undeclared label 'exit_now'
                  goto exit_now;

  PR:		239986
  Reported by:	Ross McKelvie