git-hulk / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

1.8 Builds fails on Linux / GCC 4.6: missing #include <stddef.h> #356

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
make
build with libunwind 0.99

What is the expected output? What do you see instead?
src/base/elf_mem_image.cc: In member function ‘void 
base::ElfMemImage::Init(const void*)’:
src/base/elf_mem_image.cc:251:3: error: ‘ptrdiff_t’ was not declared in 
this scope
src/base/elf_mem_image.cc:251:3: note: suggested alternatives:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/x86_64
-unknown-linux-gnu/bits/c++config.h:156:28: note:   ‘std::ptrdiff_t’
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/x86_64
-unknown-linux-gnu/bits/c++config.h:156:28: note:   ‘std::ptrdiff_t’
src/base/elf_mem_image.cc:251:13: error: expected ‘;’ before 
‘relocation’
src/base/elf_mem_image.cc:255:37: error: ‘relocation’ was not declared in 
this scope
make: *** [elf_mem_image.lo] Error 1

What version of the product are you using? On what operating system?
# uname -a
Linux Chobits 2.6.39-ARCH #1 SMP PREEMPT Sat Jul 9 14:57:41 CEST 2011 x86_64 
AMD Athlon(tm) II Dual-Core M340 AuthenticAMD GNU/Linux

gcc 4.6.1 from archlinux

Please provide any additional information below.
This issue is similar to 
http://code.google.com/p/google-perftools/issues/detail?id=301. I added a 
#include <stddef.h> to src/base/elf_mem_image.h and it works.

Original issue reported on code.google.com by shellp...@gmail.com on 27 Jul 2011 at 3:43

GoogleCodeExporter commented 9 years ago

Original comment by `` on 18 Jan 2012 at 10:08

GoogleCodeExporter commented 9 years ago
Looks like I should maybe release 1.8.1 just to fix this issue.

Original comment by csilv...@gmail.com on 27 Jul 2011 at 3:50