Closed Bug 227792 Opened 18 years ago Closed 5 years ago

building without crypto fails with missing "nsIPK11TokenDB.h" and "nsIPK11Token.h" files


(Firefox Build System :: General, defect)

Not set


(Not tracked)



(Reporter: bugzilla, Unassigned)



I'm trying to build firebird without crypto enabled and got this:

28: nsIPK11TokenDB.h: No such file or directory
26: nsIPK11Token.h: No such file or directory
c:/mozilla/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp: In

   static member function `static void nsPasswordManager::EnsureDecoderRing()':
9: `
   nsIPK11TokenDB' undeclared (first use this function)
9: (Each
   undeclared identifier is reported only once for each function it appears
9: template
   argument 1 is invalid
9: warning: ISO
   C++ forbids declaration of `tokenDB' with no type
9: `
   NS_PK11TOKENDB_CONTRACTID' undeclared (first use this function)
3: `
   nsIPK11Token' undeclared (first use this function)
3: template
   argument 1 is invalid
3: warning: ISO
   C++ forbids declaration of `token' with no type
4: base
   operand of `->' is not a pointer
4: no
   matching function for call to `getter_AddRefs(int&)'
7: base
   operand of `->' is not a pointer
0: base
   operand of `->' is not a pointer
make[6]: *** [nsPasswordManager.o] Error 1
make[6]: Leaving directory `/cygdrive/c/mozilla/mozilla/toolkit/components/passw
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/cygdrive/c/mozilla/mozilla/toolkit/components/passw
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/c/mozilla/mozilla/toolkit/components'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla/toolkit'
make[2]: *** [tier_50] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make: *** [build] Error 2
Here's a little extra data about this bug if you're having trouble reproducing 
it.  I've found that this bug seems to be related to having these two options 
in your mozconfig:

ac_add_options --disable-shared
ac_add_options --enable-static

If you build Firefox with the default settings, except for removing crypto 
support, it should build okay.
Okay - I don't know what possessed me yesterday.  Please ignore my previous
comment.  I can't build Firefox without enabling crypto.  My guess is that I
forgot to clear out a crypto module in my build tree yesterday - so even though
I had crypto disabled in the mozconfig, the build found a missing module and

This bug is really bad for cross-compiling.  Since you have to disable crypto to
cross-compile ( see and ), this bug prevents me from
creating builds cross platform. (e.g. intel to mips).  Firebird 0.7 seemed to
cross-compile okay.
Note that this is a blocker for anybody with the VC standard edition, too.
I noticed that this fails on my Firefox build under Linux (Fedora Core 3). May
be due to the new build config options....
OS: Windows XP → All
If the two files don't even exist in the tree anymore, would there be any harm
in removing the two entries from nsPasswordManager.cpp?
Flags: blocking-aviary1.1?
> If the two files don't even exist in the tree anymore

they're in the tree... the build is just configured without crypto (so they're
not available)
Severity: normal → major
Version: unspecified → Trunk
Blocks: 217409
For legal reasons, I think we should try to address this for 1.1.
Flags: blocking-aviary1.1? → blocking-aviary1.1+
If we can get this, that would be great. If someone who has the cycles can
accept this and come up with a patch, we'll certainly consider it for inclusion
but not going to block on it.
Flags: blocking-aviary1.1+ → blocking-aviary1.1-
Maybe I can take a stab at this one. Can someone who knows the source tree 
give me a quick rundown of what would have to be done?
What's the status of this bug? Is it still valid with trunk and/or branch?
Assignee: bryner → nobody
QA Contact: asa → build.config
This still valid.  The hard part here is that the toolkit password manager (unlike wallet) does not have a fallback of just obscuring the passwords (although it happily encrypts data with a blank password, which seems worse).  So the possible solutions are:

1. Add a couple small #ifdef blocks and successfully build a non-functional password manager.
2. Don't build password manager if crypto is disabled.
3. Add obscuring to the password manager along with UI changes.

1 is really easy, 2 is a bit harder (various things expect password manager to exist), and 3 is a biger job.  If 1 or 2 would be acceptable, I'll work on fixing this.
*** Bug 319217 has been marked as a duplicate of this bug. ***
You can't build without crypto since the changes in Bug 837862 landed, so this is now invalid.
Closed: 5 years ago
Depends on: 837862
Resolution: --- → INVALID
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.