base/allocator problem (missing __realloc_dbg from libcpmtd.lib(locale.obj))

109 views
Skip to first unread message

Erik Wright

unread,
Jul 10, 2012, 2:21:30 PM7/10/12
to Chromium-dev
Hi Team, I'm getting the following mysterious build error while linking chrome_main_dll:

3>libcpmtd.lib(locale.obj) : error LNK2019: unresolved external symbol __realloc_dbg referenced in function "private: static void __cdecl std::locale::_Locimp::_Locimp_Addfac(class std::locale::_Locimp *,class std::locale::facet *,unsigned int)" (?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z)

This is a static configuration in VS 2008.

I see that Additional Dependencies contains $(OutDir)\obj\global_intermediate\allocator\libcmt.lib while Ignore Specific Library is "libcmtd.lib;libcmt.lib".

After investigation, I see that this probably has something to do with base/allocator. On the surface, it would appear that this script is only changing the libcmt.lib, so I assume that even debug builds are meant to link against the release libcmt.lib (and presumably libcpmt.lib) when using the allocator shim? But the code in common.gypi doesn't seem to consider that.

Disabling the allocator shim ( 'win_use_allocator_shim': 0 in include.gypi) seems to work.

History:

* This checkout used to be component, but two+ weeks ago I switched it to static. I am pretty sure everything was building fine at that point.
* I went on holiday.
* Today I sync'd, cleaned my build, and tried to build the mini_installer solution off of trunk. I received the above error.
* I then tried to totally wipe my source tree (git clean -x -f -d) and try again, but I got the same error.

Thanks for any ideas on how to solve the root problem here (though my own work is no longer blocked, having found the workaround after about 4 hours of investigation).

Erik

Reid Kleckner

unread,
Jul 10, 2012, 2:32:25 PM7/10/12
to erikw...@chromium.org, Alok Priyadarshi, Chromium-dev
This might be this revision:

We noticed it broke the drmemory and tsan builders, which build for Windows with component=static_library.  There's a CL in flight to do something about it somewhere.




Erik

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Reply all
Reply to author
Forward
0 new messages