| Compilation error: gcc 4.5 does not like "converting to non-pointer types from NULL" | ||||||||||||
| Reported by spo...@gmail.com, Jul 19 2010 | Back to list | |||||||||||
Chrome Version (from the about:version page): 6.0.467.0 Is this the most recent version: Bug still present in svn trunk OS + version: Fedora Rawhide (14) CPU architecture (32-bit / 64-bit): x86_64 cc1plus: warnings being treated as errors app/gfx/gl/gl_context_linux.cc: In member function ‘virtual void gfx::OSMesaViewGLContext::Destroy()’: app/gfx/gl/gl_context_linux.cc:321:15: error: converting to non-pointer type ‘Pixmap’ from NULL app/gfx/gl/gl_context_linux.cc: In member function ‘bool gfx::OSMesaViewGLContext::UpdateSize()’: app/gfx/gl/gl_context_linux.cc:409:15: error: converting to non-pointer type ‘Pixmap’ from NULL make: *** [out/Release/obj.target/app_base/app/gfx/gl/gl_context_linux.o] Error 1 cc1plus: warnings being treated as errors webkit/glue/plugins/pepper_buffer.cc: In function ‘PP_Resource pepper::<unnamed>::Create(PP_Module, int32_t)’: webkit/glue/plugins/pepper_buffer.cc:25:12: error: converting to non-pointer type ‘long int’ from NULL webkit/glue/plugins/pepper_buffer.cc:29:12: error: converting to non-pointer type ‘long int’ from NULL make: *** [out/Release/obj.target/glue/webkit/glue/plugins/pepper_buffer.o] Error 1 make: *** Waiting for unfinished jobs.... cc1plus: warnings being treated as errors webkit/glue/plugins/pepper_font.cc: In function ‘PP_Resource pepper::<unnamed>::MatchFontWithFallback(PP_Module, const PP_FontDescription*)’: webkit/glue/plugins/pepper_font.cc:27:12: error: converting to non-pointer type ‘long int’ from NULL webkit/glue/plugins/pepper_font.cc:34:12: error: converting to non-pointer type ‘long int’ from NULL make: *** [out/Release/obj.target/glue/webkit/glue/plugins/pepper_font.o] Error 1 cc1plus: warnings being treated as errors webkit/glue/plugins/pepper_device_context_2d.cc: In function ‘PP_Resource pepper::<unnamed>::Create(PP_Module, const PP_Size*, bool)’: webkit/glue/plugins/pepper_device_context_2d.cc:71:12: error: converting to non-pointer type ‘long int’ from NULL webkit/glue/plugins/pepper_device_context_2d.cc:75:12: error: converting to non-pointer type ‘long int’ from NULL make: *** [out/Release/obj.target/glue/webkit/glue/plugins/pepper_device_context_2d.o] Error 1 cc1plus: warnings being treated as errors webkit/glue/plugins/pepper_image_data.cc: In function ‘PP_Resource pepper::<unnamed>::Create(PP_Module, PP_ImageDataFormat, const PP_Size*, bool)’: webkit/glue/plugins/pepper_image_data.cc:34:12: error: converting to non-pointer type ‘long int’ from NULL webkit/glue/plugins/pepper_image_data.cc:38:12: error: converting to non-pointer type ‘long int’ from NULL make: *** [out/Release/obj.target/glue/webkit/glue/plugins/pepper_image_data.o] Error 1 cc1plus: warnings being treated as errors webkit/glue/plugins/pepper_scrollbar.cc: In function ‘PP_Resource pepper::<unnamed>::Create(PP_Instance, bool)’: webkit/glue/plugins/pepper_scrollbar.cc:31:12: error: converting to non-pointer type ‘long int’ from NULL make: *** [out/Release/obj.target/glue/webkit/glue/plugins/pepper_scrollbar.o] Error 1 cc1plus: warnings being treated as errors remoting/client/plugin/chromoting_plugin.cc: In constructor ‘remoting::ChromotingPlugin::ChromotingPlugin(PP_Instance, const PPB_Instance*)’: remoting/client/plugin/chromoting_plugin.cc:35:45: error: converting to non-pointer type ‘long int’ from NULL chrome/gpu/gpu_channel.cc: In member function ‘void GpuChannel::OnCreateViewCommandBuffer(gfx::NativeViewId, int32*)’: chrome/gpu/gpu_channel.cc:140:36: error: converting to non-pointer type ‘gfx::PluginWindowHandle’ from NULL chrome/gpu/gpu_channel.cc: In member function ‘void GpuChannel::OnCreateOffscreenCommandBuffer(int32, const gfx::Size&, uint32, int32*)’: chrome/gpu/gpu_channel.cc:193:16: error: passing NULL to non-pointer argument 2 of ‘GpuCommandBufferStub::GpuCommandBufferStub(GpuChannel*, gfx::PluginWindowHandle, GpuCommandBufferStub*, const gfx::Size&, uint32, int32)’ make: *** [out/Release/obj.target/chrome_gpu/chrome/gpu/gpu_channel.o] Error 1 ***** Gcc is more strict in 4.5 about converting non-pointers to NULL. The attached patch resolves these issues. Patch was generated from 6.0.467.0 source, but should still be applicable to svn.
Comment 1
by
est...@chromium.org,
Jul 20 2010
,
Jul 22 2010
I'm seeing this issue on openSUSE 11.3 x86_64 with gcc (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292]
,
Jul 22 2010
Also ... cc1plus: warnings being treated as errors third_party/ppapi/cpp/module.cc: In constructor ‘pp::Module::Module()’: third_party/ppapi/cpp/module.cc:314:78: error: converting to non-pointer type ‘long int’ from NULL make: *** [out/Debug/obj.target/ppapi_cpp_objects/third_party/ppapi/cpp/module.o] Error 1
,
Jul 22 2010
cc1plus: warnings being treated as errors third_party/ppapi/cpp/resource.cc: In constructor ‘pp::Resource::Resource()’: third_party/ppapi/cpp/resource.cc:14:41: error: converting to non-pointer type ‘long int’ from NULL third_party/ppapi/cpp/resource.cc: In member function ‘PP_Resource pp::Resource::detach()’: third_party/ppapi/cpp/resource.cc:39:18: error: converting to non-pointer type ‘long int’ from NULL
,
Jul 26 2010
I've been carrying basically the same patch in my tree for a while - sorry for not doing something about this sooner. Anyway, patch is here now: http://codereview.chromium.org/3014034/show and I'll try to get it sorted out (tree closed now and try bots failing mysteriously). The fixes for codedr's issues in comment 2, 3 && 4 are not covered by this - that will need fixes in the ppapi svn repo and a DEPS roll in chromium. GYP_DEFINES='werror=' might work until this stuff lands in the tree. spotrh: have you signed the 'Contributor License Agreement' stuff btw.? In this instance since I had the same stuff in my tree it doesn't really matter.
,
Jul 26 2010
Issue 47401 has been merged into this issue.
,
Jul 26 2010
Craig, I cannot sign the Contributor License Agreement, as that would involve me giving copyrighted work (where Red Hat is the copyright holder) to Google, and honestly, neither I nor Red Hat trust that such a grant would remain indefinitely Free (as in Freedom). I was unaware that this was a requirement.
,
Jul 26 2010
There are some details about contributing here btw. that links to the CLA: http://dev.chromium.org/developers/contributing-code
,
Jul 27 2010
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=53788
------------------------------------------------------------------------
r53788 | craig.schlenter@chromium.org | 2010-07-27 08:45:05 -0700 (Tue, 27 Jul 2010) | 8 lines
Changed paths:
M http://src.chromium.org/viewvc/chrome/trunk/src/app/gfx/gl/gl_context_linux.cc?r1=53788&r2=53787
M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/gpu/gpu_channel.cc?r1=53788&r2=53787
M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/plugins/pepper_buffer.cc?r1=53788&r2=53787
M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/plugins/pepper_device_context_2d.cc?r1=53788&r2=53787
M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/plugins/pepper_font.cc?r1=53788&r2=53787
M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/plugins/pepper_image_data.cc?r1=53788&r2=53787
M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/plugins/pepper_scrollbar.cc?r1=53788&r2=53787
Linux: Fix some NULL versus 0 issues to appease gcc-4.5.
Patch is 99% the same as spotrh's version (thanks spot!) except
for the use of gfx::kNullPluginWindow in this version.
BUG= 49533
Review URL: http://codereview.chromium.org/3014034
------------------------------------------------------------------------
,
Jul 27 2010
I filed http://code.google.com/p/ppapi/issues/detail?id=1 for the ppapi svn repo stuff.
,
Aug 4 2010
,
Aug 10 2010
Thiago point out at http://code.google.com/p/ppapi/issues/detail?id=1 that ppapi bugs are actually tracked in the chromium bugtracker so I'm relabeling the bug here in the hopes of attracting the attention of someone with commit access in the ppapi repo to fix comment #3 and #4 here as per the patch in the ppapi link. PS. There are some other NULL versus 0 issues that have crept into the code lately ... I'll cook up a patch for those.
,
Sep 7 2010
I had to patch it on version 6.0.472.56. Are there been any changes since the last comment ?
,
Sep 7 2010
ftharsln: no changes, sorry :( My dev box is sick so I can't patch or test anything until I get that fixed (hard drive dying slowly ... should get a replacement next week). I'll also ping some ppapi people for the fixes in that repo if they are still needed. (there's a strong possibility that it will break again soon after being fixed since there aren't any bots running gcc 4.5)
,
Sep 14 2010
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=59396
------------------------------------------------------------------------
r59396 | craig.schlenter@chromium.org | Tue Sep 14 10:54:04 PDT 2010
Changed paths:
M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/gaia/token_service.cc?r1=59396&r2=59395&pathrev=59396
M http://src.chromium.org/viewvc/chrome/trunk/src/net/spdy/spdy_session.cc?r1=59396&r2=59395&pathrev=59396
M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/plugins/pepper_private.cc?r1=59396&r2=59395&pathrev=59396
M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/plugins/pepper_transport.cc?r1=59396&r2=59395&pathrev=59396
M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/webvideoframe_impl.cc?r1=59396&r2=59395&pathrev=59396
Linux: More gcc 4.5 NULL versus 0 fixes.
BUG= 49533
TEST=compiles with gcc 4.5 and on trybots.
Review URL: http://codereview.chromium.org/3433005
------------------------------------------------------------------------
,
Sep 14 2010
Brett: could you land the patch referred to in comment #12 in the ppapi repo please or suggest someone that can? I'd be happy to roll DEPS if you want. Thank you.
,
Oct 16 2010
fyi, Ubuntu Natty also comes with gcc 4.5 and a few linker behavior changes: https://lists.ubuntu.com/archives/ubuntu-devel-announce/2010-October/000772.html just started to build chromium for Natty: http://launchpadlibrarian.net/57706067/buildlog_ubuntu-natty-amd64.chromium-browser_8.0.556.0~svn20101016r62835-0ubuntu1~ucd1_FAILEDTOBUILD.txt.gz cc1plus: warnings being treated as errors third_party/ppapi/cpp/module.cc: In constructor 'pp::Module::Module()': third_party/ppapi/cpp/module.cc:194:78: error: converting to non-pointer type 'long int' from NULL make[1]: *** [out/Release/obj.target/ppapi_cpp_objects/third_party/ppapi/cpp/module.o] Error 1
,
Oct 22 2010
Committed as r307
,
Oct 22 2010
,
Nov 18 2010
Hello all, Is there a similar patch available for V8? I a trying to build V8 and am getting similar (converting to NULL) errors on a x64 machine. Any ideas?
,
Nov 18 2010
theohar, can you file a bug in code.google.com/p/v8?
,
May 11 2011
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=85018
------------------------------------------------------------------------
r85018 | bungeman@gmail.com | Wed May 11 12:50:04 PDT 2011
Changed paths:
M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/pyautolib/pyauto.py?r1=85018&r2=85017&pathrev=85018
M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/pyautolib/pyautolib.cc?r1=85018&r2=85017&pathrev=85018
Fix build break in pyautolib with gcc >= 4.5.
BUG= 79710
See related issue http://code.google.com/p/chromium/issues/detail?id=49533 .
Review URL: http://codereview.chromium.org/6877001
------------------------------------------------------------------------
,
May 23 2011
,
Oct 13 2012
This issue has been closed for some time. No one will pay attention to new comments. If you are seeing this bug or have new data, please click New Issue to start a new bug.
,
Mar 10 2013
,
Apr 6 2013
,
Apr 6 2013
,
Apr 6 2013
|
||||||||||||
| ► Sign in to add a comment | ||||||||||||