GTest Build broken on Windows

60 views
Skip to first unread message

Rainer Klaffenboeck

unread,
Mar 11, 2009, 4:04:31 AM3/11/09
to googletes...@googlegroups.com
Hi,
 
gtest-port.cc fails to include sys/stat.h for _S_IREAD and _S_IWRITE.
 
A patch is up for review at http://codereview.appspot.com/26042/show.
 
Thanks,
Rainer

Vlad Losev

unread,
Mar 11, 2009, 1:08:11 PM3/11/09
to Rainer Klaffenboeck, googletes...@googlegroups.com
Thanks for spotting this Rainer!

Rietveld review coming.

- Vlad.

vlad...@gmail.com

unread,
Mar 11, 2009, 1:10:43 PM3/11/09
to schr...@gmail.com, googletes...@googlegroups.com

http://codereview.appspot.com/26042/diff/1/2
File src/gtest-port.cc (right):

http://codereview.appspot.com/26042/diff/1/2#newcode39
Line 39: #include <sys/stat.h> // For _S_IREAD and _S_IWRITE
VC 7.1 also complains about missing definitions for creat, dup, dup2,
and close. Can you please add #include <io.h> for those?

http://codereview.appspot.com/26042

Zhanyong Wan (λx.x x)

unread,
Mar 11, 2009, 1:45:26 PM3/11/09
to schr...@gmail.com, googletes...@googlegroups.com, Vlad Losev
Thanks, Rainer!

Vlad, do you know why we didn't catch this in our testing?

--
Zhanyong

Vlad Losev

unread,
Mar 11, 2009, 2:05:49 PM3/11/09
to Zhanyong Wan (λx.x x), schr...@gmail.com, googletes...@googlegroups.com
Zhanyong -

I have checked this morning after seeing Rainer's mail. Both VC 7.1 and 8.0 issue when invoked to build Visual C++ solutions. But both compile the code fine when run under our internal build system.

Apparently, it the problem slipped through the cracks in our commit process. I haven't built with Visual Studio after committing Windows death tests. Our process currently doesn't require it on a regular commit (only before a relese) but with such a big commit I should have done it anyway. Sorry about the trouble to anyone concerned.

I haven't investigated what environmental differences between our internal build system and MS IDE caused such drastic difference in the results. This might take too much time, and we if we decide to do it, let's do it after the release.

Regards,
Vlad.

Zhanyong Wan (λx.x x)

unread,
Mar 11, 2009, 2:18:09 PM3/11/09
to Vlad Losev, schr...@gmail.com, googletes...@googlegroups.com
Hi Vlad,

On Wed, Mar 11, 2009 at 11:05 AM, Vlad Losev <vl...@google.com> wrote:
> Zhanyong -
>
> I have checked this morning after seeing Rainer's mail. Both VC 7.1 and 8.0
> issue when invoked to build Visual C++ solutions. But both compile the code
> fine when run under our internal build system.

Thanks for the investigation!

> Apparently, it the problem slipped through the cracks in our commit process.
> I haven't built with Visual Studio after committing Windows death tests. Our
> process currently doesn't require it on a regular commit (only before a
> relese) but with such a big commit I should have done it anyway. Sorry about
> the trouble to anyone concerned.

No worries. There was no evidence (before this) that the internal
build system we use behaves differently compared with the VC projects,
so no one saw it coming.

> I haven't investigated what environmental differences between our internal
> build system and MS IDE caused such drastic difference in the results. This
> might take too much time, and we if we decide to do it, let's do it after
> the release.

Agreed. I have logged
http://code.google.com/p/googletest/issues/detail?id=129 to track it.

>
> Regards,
> Vlad.
>
> On Wed, Mar 11, 2009 at 10:45 AM, Zhanyong Wan (λx.x x) <w...@google.com>
> wrote:
>>
>> Thanks, Rainer!
>>
>> Vlad, do you know why we didn't catch this in our testing?
>>
>> On Wed, Mar 11, 2009 at 10:10 AM,  <vlad...@gmail.com> wrote:
>> >
>> >
>> > http://codereview.appspot.com/26042/diff/1/2
>> > File src/gtest-port.cc (right):
>> >
>> > http://codereview.appspot.com/26042/diff/1/2#newcode39
>> > Line 39: #include <sys/stat.h>  // For _S_IREAD and _S_IWRITE
>> > VC 7.1 also complains about missing definitions for creat, dup, dup2,
>> > and close. Can you please add #include <io.h> for those?
>> >
>> > http://codereview.appspot.com/26042
>> >
>>
>>
>>
>> --
>> Zhanyong
>
>

--
Zhanyong

Zhanyong Wan (λx.x x)

unread,
Mar 11, 2009, 4:26:13 PM3/11/09
to Rainer Klaffenboeck, googletes...@googlegroups.com
Checked in at revision 202. Thanks, Rainer!

On Wed, Mar 11, 2009 at 1:04 AM, Rainer Klaffenboeck
<rainer.kl...@dynatrace.com> wrote:

--
Zhanyong

Reply all
Reply to author
Forward
0 new messages