Closed
Bug 1444953
Opened 7 years ago
Closed 7 years ago
FreeBSD build broke: incomplete type 'union semun'
Categories
(NSPR :: NSPR, defect)
Tracking
(firefox-esr52 wontfix, firefox-esr60 wontfix, firefox59 wontfix, firefox60 wontfix, firefox61 wontfix, firefox62 wontfix, firefox63 fixed)
RESOLVED
FIXED
4.20
People
(Reporter: val, Unassigned)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file, 1 obsolete file)
1.02 KB,
patch
|
KaiE
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180312195859
Steps to reproduce:
Build current development Firefox source tree
Actual results:
nsprpub/pr/src/pthreads/ptsynch.c:941:17: error: variable has incomplete type 'union semun'
(because it tries to get it from the system header, which only defines that conditionally — on _WANT_SEMUN)
Expected results:
Adding
#define _WANT_SEMUN
at the top of the file (before *any* system header includes could happen) fixes the problem.
Reporter | ||
Updated•7 years ago
|
Component: Untriaged → General
OS: Unspecified → FreeBSD
Product: Firefox → Core
Hardware: Unspecified → All
Component: General → NSPR
Product: Core → NSPR
Version: 61 Branch → 4.19
https://treeherder.mozilla.org/#/jobs?repo=nss-try&revision=f0e81e9fe32ba4bbf7a0a1b85605e543d669617e
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b61cdeb82bcd99898692ae5044e6c4c8190a325b
Downstream:
10.3 amd64 - https://clbin.com/tKEym
10.3 i386 - https://clbin.com/UKaT8
10.4 amd64 - https://clbin.com/O6J9s
10.4 i386 - https://clbin.com/jWZLG
11.1 aarch64 - https://clbin.com/FUZJo
11.1 amd64 - https://clbin.com/FtM41
11.1 armv6 - https://clbin.com/8GZwo
11.1 i386 - https://clbin.com/vMsFi
12.0 aarch64 - https://clbin.com/vGHIT
12.0 amd64 - https://clbin.com/nj88T
12.0 armv6 - https://clbin.com/u0FW7
12.0 armv7 - https://clbin.com/11u2o
12.0 i386 - https://clbin.com/Txpz2
Attachment #8958407 -
Flags: review?(kaie)
Comment on attachment 8958407 [details] [diff] [review]
fix
Review of attachment 8958407 [details] [diff] [review]:
-----------------------------------------------------------------
::: pr/src/pthreads/ptsynch.c
@@ +910,5 @@
> /*
> * From the semctl(2) man page in glibc 2.0
> */
> #if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \
> + || (defined(FREEBSD) && __FreeBSD_version < 1200059) \
Should I check for _WANT_SEMUN here to avoid breaking consumers that define it as a workaround for *other* libraries?
Here's a list of _WANT_SEMUN consumers (where Makefile changed), none of which bundle NSPR.
https://svnweb.freebsd.org/changeset/ports/463452
Oops, wrong bug number in commit message.
Attachment #8958407 -
Attachment is obsolete: true
Attachment #8958407 -
Flags: review?(kaie)
Attachment #8958417 -
Flags: review?(kaie)
status-firefox59:
--- → wontfix
status-firefox60:
--- → fix-optional
status-firefox61:
--- → affected
status-firefox-esr52:
--- → wontfix
Can you also backport to NSPR 4.19 branch? Firefox 60 may update bundled NSPR to 4.19.1 (or later) during ESR cycle.
Flags: needinfo?(kaie)
Comment 6•7 years ago
|
||
Is this a regression?
The change is very small, and it probably doesn't justify the overhead of doing a release. Maybe this bug is sufficient documentation to allow others who run into it to find your fix?
Flags: needinfo?(kaie)
Comment 7•7 years ago
|
||
I don't mind including it in a future 4.19.1 release, but it's unclear if there will be any such branch release.
Target Milestone: --- → 4.20
Updated•7 years ago
|
Attachment #8958417 -
Flags: review?(kaie) → review+
Comment 8•7 years ago
|
||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Kai Engert, I can confirm this bug is still present.
After manually applying the suggested fix to ptsynch.c as defined in https://hg.mozilla.org/projects/nspr/rev/776db96f834c
This happens on FreeBSD 12, with a freshly built new buildworld from svn update (r333894) to what is current on this very day.
I also pulled a completely clean new hg clone of mozilla-central branch on this very day.
My .mozconfig file only contains these two lines:
export CC=clang
export CXX=clang++
I suspect the .mozconfig file could also just be left completely blank. I will try this later today. The only reason my .mozconfig file contains *anything* at all is because on previous mozilla-central builds circa ~5 months ago I had come across some issue/build brake that was fixed by these definitions in the .mozconfig file. Sadly, I've forgotten what caused the break, shame on me.
In the interest of total clarity, my /etc/make.conf file only contains some switches (NLS, DOCS, EXAMPLES, CUPS, TEST) for building FreeBSD ports, I do *not* have a /usr/src/make.conf (irrelevant), /usr/src/src.conf (irrelevant), /usr/ports/make.conf (irrelevant) or /usr/ports/src.conf (irrelevant). The point being that I am not telling anything to build things without CLANG. I do *not* use ccache either, anywhere. CLANG & LLVM versions are 6.0.0 (tags/RELEASE_600/final 326565).
Hope my experience here is of some use. Is there a chance somebody dropped the ball in committing your patch?
If you need me to provide any additional info/logs, do please request I do so.
Comment 10•6 years ago
|
||
Confirmed, blank .mozconfig file has no effect.
Again, completely fresh new hg clone of the mozilla-central branch. For what it is worth, having openssl or openssl-devel installed (or not installed) makes no difference. Adding to the general head-screwery of this bug, I have done the *exact* same procedure on FreeBSD 11 (11.0 , 11.1 , 11.2-BETA) where this bug does not appear...building on FreeBSD 11 goes without anything breaking the compile and the patch is not required.
Comment 11•6 years ago
|
||
(In reply to Kai Engert (:kaie:) from comment #6)
> Is this a regression?
Yes. Upcoming FreeBSD 12.0 fixed semctl API. See commit in URL (bugzilla field) for rationale.
https://www.freebsd.org/releases/12.0R/schedule.html
> The change is very small, and it probably doesn't justify the overhead of
> doing a release.
Should I request backport directly to bundled version in mozilla-central then? My goal is ESR60 as its lifetime intersects with FreeBSD 12.0-RELEASE: 2018-05-09..2019-05-?? vs. 2018-11-06..2019-11-??
> Maybe this bug is sufficient documentation to allow others who run into it to find your fix?
Firefox being unfixed makes bisecting unrelated regressions harder. Ditto debugging downstream-specific issues not present upstream. Mozilla doesn't provide FreeBSD binaries, so building from source is essential.
As for workarounds:
- -D_WANT_SEMUN will have an opposite effect once the fix here land in mozilla-central
- --with-system-nspr is often unusable, see bug 1341222 comment 6
Flags: needinfo?(kaie)
Comment 12•6 years ago
|
||
FreeBSD 12.0 is scheduled to be released on 2018-11-06 i.e., during Firefox 63 support life but mozilla-central is still broken.
status-firefox62:
--- → affected
status-firefox63:
--- → affected
Comment 13•6 years ago
|
||
Looks like we'll release NSPR 4.20 for FF63 see bug 1477680
Flags: needinfo?(kaie)
status-firefox-esr60:
--- → fix-optional
QA Contact: jjones
Updated•5 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•