Closed Bug 188533 Opened 22 years ago Closed 22 years ago

[AxPlugin] Build problems in plugin

Categories

(Core Graveyard :: Embedding: APIs, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adamlock, Assigned: dougt)

Details

Attachments

(2 files, 2 obsolete files)

Latest pull of Mozilla results in this build error below. I think it is because
I pull in some string_s libs, so a patch follows to remove them. I'm not sure
what caused the problem to happen just now but I would hazard from the error it
is xpcom glue related.

link /NOLOGO /DLL /OUT:npmozax.dll /PDB:npmozax.pdb /SUBSYSTEM:WINDOWS
/DEF:npmozax.def  StdAfx.obj Legac
yPlugin.obj MozActiveX.obj npwin.obj ActiveScriptSite.obj ControlEventSink.obj
ControlSite.obj ControlSit
eIPFrame.obj ItemContainer.obj PropertyBag.obj XPConnect.obj XPCDocument.obj
XPCBrowser.obj PrefObserver.
obj   MozActiveX.res   /DEBUG /DEBUGTYPE:CV      
../../../../../dist/lib/string_s.lib ../../../../../dis
t/lib/string_obsolete_s.lib ../../../../../dist/lib/xpcomglue.lib
../../../../../dist/lib/xpcom.lib ../..
/../../../dist/lib/nspr4.lib ../../../../../dist/lib/plc4.lib
../../../../../dist/lib/plds4.lib ../../../
../../dist/lib/nspr4.lib ../../../../../dist/lib/plc4.lib
../../../../../dist/lib/plds4.lib kernel32.lib
user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib comdlg32.lib ole32.lib
oleaut32.lib uuid.lib shel
l32.lib
xpcomglue.lib(nsEmbedString.obj) : error LNK2005: "class nsStringAllocator<char>
& __cdecl StringAllocato
r_char(void)" (?StringAllocator_char@@YAAAV?$nsStringAllocator@D@@XZ) already
defined in string_s.lib(nsR
eadableUtils.obj)
xpcomglue.lib(nsEmbedString.obj) : error LNK2005: "class
nsStringAllocator<unsigned short> & __cdecl Stri
ngAllocator_wchar_t(void)"
(?StringAllocator_wchar_t@@YAAAV?$nsStringAllocator@G@@XZ) already defined in
string_s.lib(nsReadableUtils.obj)
xpcomglue.lib(nsEmbedString.obj) : warning LNK4006: "class
nsStringAllocator<char> & __cdecl StringAlloca
tor_char(void)" (?StringAllocator_char@@YAAAV?$nsStringAllocator@D@@XZ) already
defined in string_s.lib(n
sReadableUtils.obj); second definition ignored
xpcomglue.lib(nsEmbedString.obj) : warning LNK4006: "class
nsStringAllocator<unsigned short> & __cdecl St
ringAllocator_wchar_t(void)"
(?StringAllocator_wchar_t@@YAAAV?$nsStringAllocator@G@@XZ) already defined i
n string_s.lib(nsReadableUtils.obj); second definition ignored
   Creating library npmozax.lib and object npmozax.exp
npmozax.dll : fatal error LNK1169: one or more multiply defined symbols found
make[6]: *** [npmozax.dll] Error 145
make[6]: Leaving directory
`/cygdrive/c/m/source_comdemo/mozilla/embedding/browser/activex/src/plugin'
make[5]: *** [libs] Error 2
make[5]: Leaving directory
`/cygdrive/c/m/source_comdemo/mozilla/embedding/browser/activex/src'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/c/m/source_comdemo/mozilla/embedding/browser'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/cygdrive/c/m/source_comdemo/mozilla/embedding'
make[2]: *** [tier_9] Error 2
make[2]: Leaving directory `/cygdrive/c/m/source_comdemo/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/c/m/source_comdemo/mozilla'
make: *** [build] Error 2
Attached patch Patch removes static string libs (obsolete) — Splinter Review
Comment on attachment 111194 [details] [diff] [review]
Patch removes static string libs

r=dbradley

I think you're right about the stuff moving into glue. dougt can verify, but if
you're linker is happy I'm happy.
Attachment #111194 - Flags: review+
your library should not have any imports from the XPCOM library.  Please verify
that this is the case.  
Attached patch possible fix. (obsolete) — Splinter Review
This moves the allocator into a header file where clients can #include only if
required.
Attachment #111194 - Attachment is obsolete: true
i am hoping for a build solution.  maybe defining the nsStringAllocator as weak
or something....   more soon.
this doesn't complete fix the problem cited in this bug, but is required
properly fix the bug.
Attachment #111441 - Attachment is obsolete: true
Comment on attachment 111463 [details] [diff] [review]
move nsEmbedString to string/embed

Our intermediate libs are usually have the _s suffix not the exported
standalone libs.  Switch the library names && r=cls
Attachment #111463 - Flags: review+
I checked in the code to generate the embedstring libraries, but have not
disabled the nsEmbedString class in the glue library.  I will do this after a
clobber build.

reassigning to me.
Assignee: adamlock → dougt
patch checked in.

can you update your tree and try rebuilding embedding/browser/activex/src/plugin/?
I now get:

   Creating library npmozax.lib and object npmozax.exp
xpcomglue.lib(nsGREDirServiceProvider.obj) : error LNK2001: unresolved external
symbol "public: virtual __thiscall nsEmbedCString::~nsEmbedCString(void)" (??1n
EmbedCString@@UAE@XZ)
xpcomglue.lib(nsGREDirServiceProvider.obj) : error LNK2001: unresolved external
symbol "public: __thiscall nsEmbedCString::nsEmbedCString(void)" (??0nsEmbedCSt
ing@@QAE@XZ)
Me too
Attached patch PatchSplinter Review
Patch adds embedstring_s to Makefile.in to supply missing constructors.

Rubber stamp r/sr?
Comment on attachment 111547 [details] [diff] [review]
Patch

i would reorder the EXTRA_DSO_LDOPTS to match the LIBS ordering.

check it in.
Attachment #111547 - Flags: review+
Fix checked in (and order changed to match in both cases)
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: