Closed
Bug 487162
Opened 15 years ago
Closed 15 years ago
ckfw/capi build failure on windows
Categories
(NSS :: Libraries, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
3.12.4
People
(Reporter: KaiE, Assigned: rrelyea)
References
Details
Attachments
(1 file)
577 bytes,
patch
|
rrelyea
:
review+
|
Details | Diff | Splinter Review |
When landing NSS 3.12.3 rc 0 we got a build failure when building Mozilla. Reason is that directory ckfw/capi only gets built in the Mozilla client configuration. As a quick solution I disabled building capi, r=nelson We need to fix the compiler error in staticobj.c and re-enable the build.
Reporter | ||
Comment 1•15 years ago
|
||
Build log: http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1239070965.1239072544.11625.gz Build failure: e:/builds/moz2_slave/mozilla-central-win32-unittest/build/security/nss/lib/ckfw/capi/staticobj.c(71) : error C4047: 'initializing' : 'CK_OBJECT_CLASS' differs in levels of indirection from 'void *'
Reporter | ||
Comment 2•15 years ago
|
||
Can we change ckfw/Makefile to build capi by default when doing NSS builds?
Comment 3•15 years ago
|
||
The last few lines of lib/ckfw/cpi/staticobj.c are
> ckcapiInternalObject nss_ckcapi_data[] = {
> { ckcapiRaw, { 5, nss_ckcapi_types_1, nss_ckcapi_items_1} , {((void *)0)} },
> };
>
> const PRUint32 nss_ckcapi_nObjects = 1;
The type ckcapiInternalObject contains a union. The code above is trying
to initialize one of the members of that union with a static initializer.
That's a no-no.
Assignee: nobody → rrelyea
OS: Linux → Windows XP
Comment 4•15 years ago
|
||
IMO, it doesn't belong in NSS. It uses NSS. It uses lib/ckfw. It's not part of either one. It doesn't belong under lib/ckfw any more than programs that use libc belong in the libc source tree.
Comment 5•15 years ago
|
||
lib/ckfw/Makefile contains these lines:
> ifdef MOZILLA_CLIENT
> NSS_BUILD_CAPI = 1
> endif
But NONE of the NSS team members builds routinely with MOZILLA_CLIENT defined.
So, when Mozilla takes a snapshot of NSS, they find themselves building things
that the NSS does not build and has not build for months, if ever.
I believe Kai removed those lines from Mozilla's snapshot of the Makefile.
(That was my suggestion, and I have r+ to that patch, sight unseen. :)
I'd say we should do that in the CVS tree, too.
Comment 6•15 years ago
|
||
The code was always wrong, I believe. NSS just catches it now with its more strict error checking during compilation. I believe the only portable solutions to this are: a) stop using a static initializer, or b) change this object (structure) type to remove all unions. I'll let Bob carry it from here.
Comment 7•15 years ago
|
||
I was mistaken about the cause of the error. It wasn't the initialization of the union. It was the attempt to initialize a member of type CK_OBJECT_CLASS with the value {NULL}. This patch fixes it, and makes MSVC happy. I think think it's an error to use a static initializer for a union. But the immediate issue is to pacify MSVC.
Attachment #371375 -
Flags: review?(rrelyea)
Updated•15 years ago
|
Target Milestone: --- → 3.12.4
Reporter | ||
Comment 8•15 years ago
|
||
(In reply to comment #5) > lib/ckfw/Makefile contains these lines: > > > ifdef MOZILLA_CLIENT > > NSS_BUILD_CAPI = 1 > > endif > > ... > > I believe Kai removed those lines from Mozilla's snapshot of the Makefile. yes
Reporter | ||
Comment 9•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b5f6a4b00c7f
Comment 10•15 years ago
|
||
(In reply to comment #7) >I think think it's an error to use a static initializer for a union. My hazy memory suggests that you initialise it as if it was its first member.
Assignee | ||
Updated•15 years ago
|
Attachment #371375 -
Flags: review?(rrelyea) → review+
Comment 11•15 years ago
|
||
Checking in staticobj.c; new revision: 1.3; previous revision: 1.2
Status: NEW → RESOLVED
Closed: 15 years ago
Priority: -- → P2
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•