Closed Bug 489975 Opened 15 years ago Closed 15 years ago

Trunk comm-central static builds broken: unresolved external symbol _malloc_usable_size

Categories

(MailNews Core :: Build Config, defect)

All
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file, 1 obsolete file)

Bug 487396 reworked how the jemalloc libraries are included. This has broken static comm-central trunk builds on windows:

   Creating library thunderbird.lib and object thunderbird.exp
gkplugin.lib(nsNPAPIPlugin.obj) : error LNK2019: unresolved external symbol _malloc_usable_size referenced in function __releasevariantvalue
thunderbird.exe : fatal error LNK1120: 1 unresolved externals

http://tinderbox.mozilla.org/showlog.cgi?log=Thunderbird/1240572243.1240576959.6642.gz

The normal fix would be to port bug 487396 to comm-central, however because we're using different flags on trunk and 1.9.1, it won't work correctly with a straight port.

Ted's suggested potential solution is:

- Port bug 487396 to comm-central and get it working on trunk.
- Fiddle around with the flags on the line:

MOZ_MEMORY_LDFLAGS="-MANIFEST:NO -LIBPATH:\"$WIN32_CUSTOM_CRT_DIR\" -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -DEFAULTLIB:mozcrt19"

in configure.in, drop the NODEFAULTLIB and DEFAULTLIB arguments for MOZILLA_1_9_1_BRANCH.

If this doesn't work we're going to end up with a few more ifdefs in there which could get pretty mucky.
Just in case a simple port of bug 487396 to comm-central can help you as a starting point, here is the one I made for Instantbird.
I've been trying to fix this by altering the this line with an ifdef:

MOZ_MEMORY_LDFLAGS="-MANIFEST:NO -LIBPATH:\"$WIN32_CUSTOM_CRT_DIR\"
-NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -DEFAULTLIB:mozcrt19"

However it doesn't like being:

MOZ_MEMORY_LDFLAGS="-MANIFEST:NO -LIBPATH:\"$WIN32_CUSTOM_CRT_DIR\""

and -DEFAULTLIB:mozcrt19 causes nspr to fail.

Any ideas? or do we need to ifdef everything.
Attached patch The fixSplinter Review
This patch does the porting with ifdefs - its not easy just to mangle MOZ_MEMORY_LDFLAGS on 1.9.1 branch because the .lib file for jemalloc is named "msvcrt" which means we have to have the library path set correctly to pick up the right library. So I've just gone for ifdefing between branch & trunk.

I'm currently running this through the try server on 1.9.1. It should pass, and is further on than my previous tries. I can't test trunk locally as I don't have the jemalloc facilities - however this is a straight port, so it should work anyway.

Not sure if it will also fix bug 490408, its a possibility.
Assignee: nobody → bugzilla
Attachment #374466 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #375177 - Flags: review?(gozer)
(In reply to comment #3)
> I'm currently running this through the try server on 1.9.1. It should pass, and
> is further on than my previous tries. I can't test trunk locally as I don't
> have the jemalloc facilities - however this is a straight port, so it should
> work anyway.

It passed on the try server :-)
Attachment #375177 - Flags: review?(gozer) → review+
Comment on attachment 375177 [details] [diff] [review]
The fix

Looks good to me. Can't wait until we branch, however. These kind of things will be hard to maintain/undo in the long run.
Checked in: http://hg.mozilla.org/comm-central/rev/91b50be6114a

(In reply to comment #5)
> (From update of attachment 375177 [details] [diff] [review])
> Looks good to me. Can't wait until we branch, however. These kind of things
> will be hard to maintain/undo in the long run.

I'm monitoring these, branching will hurt us as well if we do it too early (especially at the moment when there's no dev on trunk). At the moment its not too complicated, though I do think about it every time we need another set of itdefs.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: