My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 120724: Build error with gcc 4.7.0
12 people starred this issue and may be notified of changes. Back to list
Status:  Unconfirmed
Owner:  ----
Cc:  phajdan.jr@chromium.org


Sign in to add a comment
 
Reported by r...@c2.hu, Mar 28, 2012
Chrome Version       : 17.0.963.83, 18.0.1024.142

When I try to compile the source with gcc 4.7.0, I get this error:

  CXX(target) out/Release/obj.target/base/base/message_pump_libevent.o
base/message_pump_libevent.cc: In destructor 'virtual base::MessagePumpLibevent::~MessagePumpLibevent()':
base/message_pump_libevent.cc:134:40: error: 'close' was not declared in this scope
base/message_pump_libevent.cc:134:59: error: invalid type in declaration before ';' token
base/message_pump_libevent.cc:138:41: error: 'close' was not declared in this scope
base/message_pump_libevent.cc:138:60: error: invalid type in declaration before ';' token
base/message_pump_libevent.cc: In member function 'virtual void base::MessagePumpLibevent::ScheduleWork()':
base/message_pump_libevent.cc:298:56: error: 'write' was not declared in this scope
base/message_pump_libevent.cc:298:75: error: invalid type in declaration before ';' token
base/message_pump_libevent.cc: In member function 'bool base::MessagePumpLibevent::Init()':
base/message_pump_libevent.cc:321:15: error: 'pipe' was not declared in this scope
base/message_pump_libevent.cc: In static member function 'static void base::MessagePumpLibevent::OnWakeup(int, short int, void*)':
base/message_pump_libevent.cc:375:45: error: 'read' was not declared in this scope
base/message_pump_libevent.cc:375:64: error: invalid type in declaration before ';' token
make: *** [out/Release/obj.target/base/base/message_pump_libevent.o] Error 1


Apr 14, 2012
#1 christe...@gmail.com
it seems that base/message_pump_libevent.cc needs #include <unistd.h>
Apr 19, 2012
#2 Alpha...@gmail.com
The same problem, see https://bugs.gentoo.org/show_bug.cgi?id=412615 for more details.
gcc-4.7.patch
1.9 KB   View   Download
Apr 19, 2012
#3 phajdan.jr@chromium.org
Please follow http://dev.chromium.org/developers/contributing-code to submit a patch, thanks.
Cc: phajdan.jr@chromium.org
Labels: -Area-Undefined Area-Internals Internals-Core
Apr 19, 2012
#4 r...@c2.hu
Thanks for patch, but not enough, I found more missing headers:

chrome/browser/chrome_browser_main_extra_parts_gtk.cc:
+#include <unistd.h>
+#include <sys/types.h>

chrome/browser/search_engines/template_url_prepopulate_data.h:
+#include <cstddef>

ipc/ipc_channel.h:
+#include <sys/types.h>

third_party/ots/src/os2.cc:
+#include <cstddef>

third_party/tcmalloc/chromium/src/base/stl_allocator.h:
+#include <cstddef>

third_party/tcmalloc/chromium/src/base/vdso_support.h:
+#include <cstddef>

third_party/tcmalloc/chromium/src/common.cc:
+#include <cstddef>

third_party/tcmalloc/chromium/src/symbolize.h:
+#include <cstddef>

ui/gfx/codec/jpeg_codec.h:
+#include <cstddef>

The chrome/browser/diagnostics/diagnostics_main.cc contins two #if defined(OS_POSIX), but the #if defined(OS_POSIX) || #if defined(OS_LINUX) not worked for me...

Finally, a bad include:
ui/base/l10n/l10n_util.cc
#include <glib.h>, instead of #include <glib/gutils.h> (only glib.h can be included directly).

May 30, 2012
#5 gnu.andr...@gmail.com
This issue is still present in 20.0.1132.17.  Please apply the patch and fix it.
Jun 2, 2012
#6 dmotale...@gmail.com
also, chromium-20.0.1132.24 still have this problem... so are we waiting for everyone to switch to gcc 4.7 for this to be fixed?

Jun 17, 2012
#7 phajdan.jr@chromium.org
 Issue 124963  has been merged into this issue.
Jun 17, 2012
#8 phajdan.jr@chromium.org
 Issue 129173  has been merged into this issue.
Jun 17, 2012
#9 phajdan.jr@chromium.org
 Issue 131363  has been merged into this issue.
Jun 17, 2012
#10 phajdan.jr@chromium.org
 Issue 131582  has been merged into this issue.
Jun 18, 2012
#12 bugdro...@chromium.org
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=142750

------------------------------------------------------------------------
r142750 | phajdan.jr@chromium.org | Mon Jun 18 10:34:23 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/memory_details_linux.cc?r1=142750&r2=142749&pathrev=142750

Fix build error with gcc-4.7

BUG=120724
TEST=none

Review URL: https://chromiumcodereview.appspot.com/10553031
------------------------------------------------------------------------
Mar 10, 2013
#13 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Area-Internals -Internals-Core Cr-Internals Cr-Internals-Core
Sign in to add a comment

Powered by Google Project Hosting