Static Places-enabled build fails to compile (unresolved externals)

RESOLVED WORKSFORME

Status

()

Firefox
Bookmarks & History
--
blocker
RESOLVED WORKSFORME
13 years ago
9 years ago

People

(Reporter: RyanVM, Assigned: Ben Goodger (use ben at mozilla dot org for email))

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
I'm trying to compile a places-enabled build on my system with MSVC8.  With --enable-places set in .mozconfig, I get the following compiler error:
   Creating library firefox.lib and object firefox.exp
brwsrcmp.lib(nsMorkHistoryImporter.obj) : error LNK2001: unresolved external symbol "public: __thiscall nsMorkReader::~nsMorkReader(void)" (??1nsMorkReader@@QAE@XZ)
brwsrcmp.lib(nsMorkHistoryImporter.obj) : error LNK2001: unresolved external symbol "public: void __thiscall nsMorkReader::NormalizeValue(class nsCString &)const " (?NormalizeValue@nsMorkReader@@QBEXAAVnsCString@@@Z)
brwsrcmp.lib(nsMorkHistoryImporter.obj) : error LNK2001: unresolved external symbol "public: void __thiscall nsMorkReader::EnumerateRows(enum PLDHashOperator (__cdecl*)(class nsACString_internal const &,class nsDataHashtable<class nsCStringHashKey,class nsCString> const *,void *),void *)const " (?EnumerateRows@nsMorkReader@@QBEXP6A?AW4PLDHashOperator@@ABVnsACString_internal@@PBV?$nsDataHashtable@VnsCStringHashKey@@VnsCString@@@@PAX@Z2@Z)
brwsrcmp.lib(nsMorkHistoryImporter.obj) : error LNK2001: unresolved external symbol "public: void __thiscall nsMorkReader::EnumerateColumns(enum PLDHashOperator (__cdecl*)(class nsACString_internal const &,class nsCString,void *),void *)const " (?EnumerateColumns@nsMorkReader@@QBEXP6A?AW4PLDHashOperator@@ABVnsACString_internal@@VnsCString@@PAX@Z2@Z)
brwsrcmp.lib(nsMorkHistoryImporter.obj) : error LNK2001: unresolved external symbol "public: unsigned int __thiscall nsMorkReader::Read(class nsIFile *)" (?Read@nsMorkReader@@QAEIPAVnsIFile@@@Z)
brwsrcmp.lib(nsMorkHistoryImporter.obj) : error LNK2001: unresolved external symbol "public: unsigned int __thiscall nsMorkReader::Init(void)" (?Init@nsMorkReader@@QAEIXZ)
firefox.exe : fatal error LNK1120: 6 unresolved externals
make[5]: *** [firefox.exe] Error 96
make[5]: Leaving directory `/cygdrive/d/mozilla/mozilla/foxbuild/browser/app'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/d/mozilla/mozilla/foxbuild/browser'
make[3]: *** [libs_tier_99] Error 2
make[3]: Leaving directory `/cygdrive/d/mozilla/mozilla/foxbuild'
make[2]: *** [tier_99] Error 2
make[2]: Leaving directory `/cygdrive/d/mozilla/mozilla/foxbuild'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/d/mozilla/mozilla/foxbuild'
make: *** [build] Error 2

Without --enable-places in .mozconfig, the compile succeeds just fine (I'm posting from a successful compile right now).

Here's my .mozconfig:
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/foxbuild
ac_add_options --enable-application=browser

export MOZILLA_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1

ac_add_options --enable-optimize="-Ox -GALS- -fp:fast -arch:SSE2"

ac_add_options --disable-debug
ac_add_options --disable-installer
ac_add_options --disable-shared
ac_add_options --enable-static

ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-tests
ac_add_options --enable-cairo
ac_add_options --enable-canvas
ac_add_options --enable-crypto
ac_add_options --enable-extensions=default,-inspector
ac_add_options --enable-mathml
ac_add_options --enable-official-branding
ac_add_options --enable-places
ac_add_options --enable-svg
ac_add_options --enable-svg-renderer=cairo
Same here, though switching from a static to a shared build allows it to complete.
(Reporter)

Comment 2

13 years ago
Updating bug summary to reflect mossop's comment.
Summary: Places-enabled bulid fails to compile (unresolved externals) → Static Places-enabled build fails to compile (unresolved externals)
(Reporter)

Comment 3

13 years ago
Well, it compiles successfully now. I guess one of the recent Places checkins fixed it.
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME
This was fixed as part of bug 324170 (adding EXPORT_LIBRARY=1 to db/morkreader/Makefile.in).
Yep, in MOZILLA_1_8_BRANCH, the same error
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.