Sgenmi / gperftools

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

v2.1 has cast error at src/profiler.cc:208: #561

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When building gperftools v 2.1 on linux 2.6.9 with gcc 3.4.6
running make fails on:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -I/usr/local/include 
-Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare 
-fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -fno-builtin-calloc 
-fno-builtin-cfree -fno-builtin-memalign -fno-builtin-posix_memalign 
-fno-builtin-valloc -fno-builtin-pvalloc -mmmx -fno-omit-frame-pointer -g -O2 
-MT profiler.lo -MD -MP -MF .deps/profiler.Tpo -c src/profiler.cc  -fPIC -DPIC 
-o .libs/profiler.o
src/profiler.cc: In constructor `CpuProfiler::CpuProfiler()':
src/profiler.cc:208: error: ISO C++ forbids casting between pointer-to-function 
and pointer-to-object

Original issue reported on code.google.com by Ocasta...@gmail.com on 6 Aug 2013 at 12:57

GoogleCodeExporter commented 9 years ago
The above build contains flags from my own code.

When untared, running ./configure; make still yields the failure, but with the 
following output:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall 
-Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -fno-builtin-malloc 
-fno-builtin-free -fno-builtin-realloc -fno-builtin-calloc -fno-builtin-cfree 
-fno-builtin-memalign -fno-builtin-posix_memalign -fno-builtin-valloc 
-fno-builtin-pvalloc -mmmx -fno-omit-frame-pointer -g -O2 -MT profiler.lo -MD 
-MP -MF .deps/profiler.Tpo -c src/profiler.cc  -fPIC -DPIC -o .libs/profiler.o
src/profiler.cc: In constructor `CpuProfiler::CpuProfiler()':
src/profiler.cc:208: error: ISO C++ forbids casting between pointer-to-function 
and pointer-to-object

Original comment by Ocasta...@gmail.com on 6 Aug 2013 at 1:59

GoogleCodeExporter commented 9 years ago
It is RHEL4? Which release ?

Original comment by alkondratenko on 12 Aug 2013 at 9:41

GoogleCodeExporter commented 9 years ago
Indeed. Seeing this on centos 4.8. Thanks for reporting.

Original comment by alkondratenko on 17 Aug 2013 at 12:39

GoogleCodeExporter commented 9 years ago
Thanks again. I've merged a fix

Original comment by alkondratenko on 17 Aug 2013 at 4:21

GoogleCodeExporter commented 9 years ago
Hi alkondratenko,  the lasted version of gpertools was uploaded at Jul 30, 2013.
It seems that the fix was not uploaded.

Original comment by davids...@gmail.com on 18 Apr 2014 at 9:08

GoogleCodeExporter commented 9 years ago
davidsure, have you tried building out of git ?

Also be aware that I plan to do rc this weekend.

Original comment by alkondratenko on 18 Apr 2014 at 6:53

GoogleCodeExporter commented 9 years ago
There's 2.1rc now. I've tested myself that centos 4.8 works with that package.

Original comment by alkondratenko on 19 Apr 2014 at 8:34