Closed Bug 127994 Opened 18 years ago Closed 15 years ago

duplicate symbol warnings during linking of the root cert module

Categories

(NSS :: Build, defect, P3, trivial)

x86
Windows 2000
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julien.pierre, Assigned: rrelyea)

References

(Blocks 1 open bug)

Details

While linking nssckbi.dll on NT/Win2K, the following linker warnings occur :

m.lib
   Creating library WINNT5.0_DBG.OBJ/nssckbi.lib and object WINNT5.0_DBG.OBJ/nss
ckbi.exp
LINK : warning LNK4049: locally defined symbol "_PR_DestroyLock" imported
LINK : warning LNK4049: locally defined symbol "_PR_NewLock" imported
LINK : warning LNK4049: locally defined symbol "_PR_Unlock" imported
LINK : warning LNK4049: locally defined symbol "_PR_Lock" imported
LINK : warning LNK4049: locally defined symbol "_PR_GetCurrentThread" imported
LINK : warning LNK4049: locally defined symbol "_PR_Assert" imported
LINK : warning LNK4049: locally defined symbol "_PR_Calloc" imported
LINK : warning LNK4049: locally defined symbol "_PR_Free" imported
LINK : warning LNK4049: locally defined symbol "_PR_Malloc" imported
LINK : warning LNK4049: locally defined symbol "_PR_CeilingLog2" imported
LINK : warning LNK4049: locally defined symbol "_PR_CallOnce" imported
nsinstall -m 775 WINNT5.0_DBG.OBJ/nssckbi.dll ../../../../../dist/WINNT5.0_DBG.O
BJ/lib
These are not duplicate symbol warnings.  The warnings are
"locally defined symbols imported".  This is because these
symbols are declared with the declspec(_dllimport) qualifier,
which means they are defined in some other DLL, but in fact
they are defined in the DLL we are building (i.e., locally).

One workaround is to define _NSPR_BUILD_ when compiling the
files.  I am not sure if this will work, and this violates
modularity because _NSPR_BUILD_ is a NSPR-internal macro.

A better workaround, which is more work, is to link the
NSPR stubs into a DLL, say nsprstb4.dll, and have nssckbi.dll
imports nsprstb4.lib (the import library).  In bug 66490,
Nelson proposed that we consolidate all the NSPR stubs in
NSS into one library.  (Right now each PKCS #11 module in
NSS has its own NSPR stubs.)  In light of these linker
warnings on Windows, it seems that this new NSPR stubs
library should be a DLL.
Assignee: wtc → relyea
Target Milestone: --- → 3.5
Moved to NSS 3.6, priority P3.

Lowered the severity to trivial because the "locally
defined symbol" that the linker is warning about doesn't
seem to be a real problem.
Severity: normal → trivial
Priority: -- → P3
Target Milestone: 3.5 → 3.6
Target Milestone: 3.6 → Future
Blocks: buildwarning
This is no longer in 3.11 since the root cert module is using the NSPR shared libraries. Marking fixed.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: Future → 3.11
You need to log in before you can comment on or make changes to this bug.