darziyan / mod-spdy

Automatically exported from code.google.com/p/mod-spdy
0 stars 0 forks source link

Build failure using GCC 4.5.2 on Gentoo #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Followed the instructions on HowToBuild page

What is the expected output? What do you see instead?
Expected successful build, got this instead:

  CXX(target) out/Release/obj.target/spdy_test/net/spdy/spdy_protocol_test.o
cc1plus: warnings being treated as errors
net/spdy/spdy_protocol_test.cc: In member function ‘virtual 
void<unnamed>::SpdyProtocolTest_FrameStructs_Test::TestBody()’:
net/spdy/spdy_protocol_test.cc:64:3: error: converting ‘false’ to pointer 
type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
net/spdy/spdy_protocol_test.cc:70:3: error: converting ‘false’ to pointer 
type for argument 1 of ‘char 
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
net/spdy/spdy_protocol_test.cc: At global scope:
net/spdy/spdy_protocol_test.cc:40:1: error: 
‘<unnamed>::SpdyProtocolTest_ProtocolConstants_Test::test_info_’ defined 
but not used
net/spdy/spdy_protocol_test.cc:58:1: error: 
‘<unnamed>::SpdyProtocolTest_FrameStructs_Test::test_info_’ defined but not 
used
net/spdy/spdy_protocol_test.cc:73:1: error: 
‘<unnamed>::SpdyProtocolTest_DataFrameStructs_Test::test_info_’ defined but 
not used
net/spdy/spdy_protocol_test.cc:79:1: error: 
‘<unnamed>::SpdyProtocolTest_ControlFrameStructs_Test::test_info_’ defined 
but not used
net/spdy/spdy_protocol_test.cc:125:1: error: 
‘<unnamed>::SpdyProtocolTest_TestDataFrame_Test::test_info_’ defined but 
not used
net/spdy/spdy_protocol_test.cc:168:1: error: 
‘<unnamed>::SpdyProtocolTest_TestSpdySettingsFrame_Test::test_info_’ 
defined but not used
net/spdy/spdy_protocol_test.cc:217:1: error: 
‘<unnamed>::SpdyProtocolDeathTest_TestDataFrame_Test::test_info_’ defined 
but not used
net/spdy/spdy_protocol_test.cc:234:1: error: 
‘<unnamed>::SpdyProtocolDeathTest_TestSpdyControlFrameStreamId_Test::test_info
_’ defined but not used
net/spdy/spdy_protocol_test.cc:249:1: error: 
‘<unnamed>::SpdyProtocolDeathTest_TestSpdyControlFrameVersion_Test::test_info_
’ defined but not used
net/spdy/spdy_protocol_test.cc:270:1: error: 
‘<unnamed>::SpdyProtocolDeathTest_TestSpdyControlFrameType_Test::test_info_’
 defined but not used
make: *** [out/Release/obj.target/spdy_test/net/spdy/spdy_protocol_test.o] 
Error 1

What version of the product are you using? On what operating system?

svn info
Path: .
URL: http://mod-spdy.googlecode.com/svn/trunk/src
Repository Root: http://mod-spdy.googlecode.com/svn
Repository UUID: 96a8b0a0-ff0d-11de-b9d1-2d015cf73129
Revision: 143
Node Kind: directory
Schedule: normal
Last Changed Author: bmcquade@google.com
Last Changed Rev: 143
Last Changed Date: 2010-10-28 07:03:59 +1000 (Thu, 28 Oct 2010)

OS: Gentoo
GCC: 4.5.2

Please provide any additional information below.

Original issue reported on code.google.com by laz...@gmail.com on 12 Apr 2011 at 4:00

GoogleCodeExporter commented 8 years ago
OS: Ubuntu 11.04
GCC: gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2

Also can't seem to get this to build on RHEL/CentOS type setup - fails earlier.

Original comment by uksysad...@gmail.com on 27 Jun 2011 at 1:29

GoogleCodeExporter commented 8 years ago
Hi, thanks for the reports.  We've recently made major changes to the mod_spdy 
codebase, including upgrading our version of net/spdy/, which I hope has fixed 
these issues.  If you sync to trunk at this point, do you still see any build 
errors?

Original comment by mdste...@google.com on 21 Dec 2011 at 3:32

GoogleCodeExporter commented 8 years ago
Hi!

I'm using same setup (Gentoo/64bit/GCC 4.5.2). Updated to current revision: 
r221.

Now I have error even earlier:

$ make BUILDTYPE=Release
  CXX(target) out/Release/obj.target/base/third_party/chromium/src/base/string16.o
  CXX(target) out/Release/obj.target/base/third_party/chromium/src/base/time_posix.o
third_party/chromium/src/base/time_posix.cc: In member function ‘timespec 
base::TimeDelta::ToTimeSpec() const’:
third_party/chromium/src/base/time_posix.cc:27: error: narrowing conversion of 
‘(microseconds * 1000)’ from ‘int64’ to ‘long int’ inside { }
make: *** 
[out/Release/obj.target/base/third_party/chromium/src/base/time_posix.o] Error 1

Original comment by tcat.hu on 3 Jan 2012 at 3:04

GoogleCodeExporter commented 8 years ago
I got the same error as already mentioned (error: narrowing conversion of 
‘(microseconds * 1000)’ from ‘int64’ to ‘long int’ inside { }).

To get rid of it I had to revert to a really old revision r143 from 2010.

This appears to compile correctly.
I'm using ubuntu 10.04 for this.

I think this should really be fixed!

Btw, the ubuntu setup described here: 
http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites is 
for an old version 8.04
I think this should be updated since it is also mentioned that the developers 
use a modified version of ubuntu 10.04 (not all packages mentioned there exist 
for 10.04).

Original comment by DragonMo...@gmail.com on 18 Jan 2012 at 5:19

GoogleCodeExporter commented 8 years ago
I managed to fix this issue.
It may be that the developers work only on 64 bit systems so they missed this 
issue.
Anyway, to be able to compile this on a 32 bit Ubuntu 10.04 I had to cast to a 
long:

original:

struct timespec result =
      {seconds,
       microseconds * Time::kNanosecondsPerMicrosecond};

modified:

struct timespec result =
      {seconds,
       (long) (microseconds * Time::kNanosecondsPerMicrosecond)};

I've attached a patch-file.

Original comment by DragonMo...@gmail.com on 19 Jan 2012 at 10:51

Attachments:

GoogleCodeExporter commented 8 years ago
Yes, this seems to be an issue for 32-bit systems.  Until it is fixed, adding a 
cast to long, as shown above, is the easiest workaround.

Unfortunately, it's not just a matter of a simple patch to the mod_spdy source 
tree because that file isn't actually _in_ our source tree -- rather, it gets 
checked out from the Chromium source tree by gclient.  So we either need to get 
a patch into Chromium, or else adjust our build parameters in some way.  I will 
look into getting this fixed one way or the other.

Original comment by mdste...@google.com on 27 Jan 2012 at 11:34

GoogleCodeExporter commented 8 years ago
Issue 28 has been merged into this issue.

Original comment by mdste...@google.com on 23 Feb 2012 at 9:15

GoogleCodeExporter commented 8 years ago
I finally had a chance to figure out the tweak needed to our build config to 
fix this issue; sorry it took so long.  This should now be fixed as of r252.  
Please let me know if there are any other problems with building.

Original comment by mdste...@google.com on 24 Feb 2012 at 2:47