can't build on windows

54 views
Skip to first unread message

Evan Martin

unread,
Aug 4, 2010, 5:13:40 PM8/4/10
to chromium-dev
My build on Windows hasn't worked for a while, even after deleting the
chrome/Debug directory and starting over.
Do you have any advice on how to figure out what's going wrong?

It prints many errors like the following:

4>serv.obj : error LNK2005: "public: static int const
icu_4_2::StringPiece::npos" (?npos@StringPiece@icu_4_2@@2HB) already
defined in stringpiece.obj
4>locbased.obj : error LNK2005: "public: static int const
icu_4_2::StringPiece::npos" (?npos@StringPiece@icu_4_2@@2HB) already
defined in stringpiece.obj
4>servnotf.obj : error LNK2005: "public: static int const
icu_4_2::StringPiece::npos" (?npos@StringPiece@icu_4_2@@2HB) already
defined in stringpiece.obj
4>unistr_cnv.obj : error LNK2005: "public: static int const
icu_4_2::StringPiece::npos" (?npos@StringPiece@icu_4_2@@2HB) already
defined in stringpiece.obj

Random fact in case they're related:
- Windows 7, VS 2008, build last worked maybe a week or two ago.
- My include.gypi is
{
'variables': {
'msvs_multi_core_compile': 1,
'component': 'shared_library'
}
}

Scott Violet

unread,
Aug 4, 2010, 5:22:48 PM8/4/10
to ev...@chromium.org, chromium-dev
I've seen errors like this when I do a git pull and forget to do a
gclient sync. Is it possible your need a gclient sync or git pull?

-Scott

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

Scott Violet

unread,
Aug 4, 2010, 5:25:51 PM8/4/10
to ev...@chromium.org, chromium-dev
Someone on IRC is saying the git mirror is behind by 20 hours, which
might result in things getting out of sync too.

-Scott

Evan Martin

unread,
Aug 4, 2010, 6:09:20 PM8/4/10
to chromium-dev
I spent some more time looking at this. It looks like it's an actual
problem in the ICU code (!?).

ICU's stringpiece contains the following:

/* Microsft Visual Studios <= 8.0 complains about redefinition of this
* static const class variable. However, the C++ standard states that this
* definition is correct. Perhaps there is a bug in the Microsoft compiler.
* This is not an issue on any other compilers (that we know of) including
* Visual Studios 9.0.
* Cygwin with MSVC 9.0 also complains here about redefinition.
*/
#if (!defined(_MSC_VER) || (_MSC_VER >= 1500)) && !defined(CYGWINMSVC)
const int32_t StringPiece::npos;
#endif


Visual Studio 2008 has _MSC_VER == 1500, which makes this line be
included, but removing the line fixes the problem. As does adjusting
the test from >= to simply >.

So now my question is: how does this work for other people? Is anyone
else using the components build on VS2008?

On Wed, Aug 4, 2010 at 2:13 PM, Evan Martin <ev...@chromium.org> wrote:

Evan Martin

unread,
Aug 4, 2010, 6:13:43 PM8/4/10
to chromium-dev
http://codereview.chromium.org/3036043 , will take further discussion there.
Reply all
Reply to author
Forward
0 new messages