buffer8848 / gperftools

Automatically exported from code.google.com/p/gperftools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make check won't build on snow leopard

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. Run configure, make, make check
2. build fails as below.
3.

What is the expected output? What do you see instead?

 g++ -DHAVE_CONFIG_H -I. -I. -I./src -I./src -Wall -Wwrite-strings
-Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -MT
profiler.lo -MD -MP -MF .deps/profiler.Tpo -c src/profiler.cc  -fno-common
-DPIC -o .libs/profiler.o
In file included from src/profiler.cc:37:
src/getpc.h:178: error: expected ‘,’ or ‘...’ before ‘&’ token
src/getpc.h:178: error: ISO C++ forbids declaration of ‘ucontext_t’ with no
type
src/getpc.h: In function ‘void* GetPC(int)’:
src/getpc.h:179: error: ‘signal_ucontext’ was not declared in this scope
src/profiler.cc: At global scope:
src/profiler.cc:49: error: conflicting declaration ‘typedef int ucontext_t’
/usr/include/sys/_structs.h:227: error: ‘ucontext_t’ has a previous
declaration as ‘typedef struct __darwin_ucontext ucontext_t’
In file included from src/base/commandlineflags.h:55,
                 from src/profiler.cc:55:
./src/base/basictypes.h: In constructor
‘AssignAttributeStartEnd::AssignAttributeStartEnd(const char*, char**,
char**)’:
./src/base/basictypes.h:251: warning: ‘_dyld_present’ is deprecated
(declared at /usr/include/mach-o/dyld.h:237)
./src/base/basictypes.h:251: warning: ‘_dyld_present’ is deprecated
(declared at /usr/include/mach-o/dyld.h:237)
src/profiler.cc: In static member function ‘static void
CpuProfiler::prof_handler(int, siginfo_t*, void*, void*)’:
src/profiler.cc:266: error: cannot convert ‘__darwin_ucontext’ to ‘int’ 
for
argument ‘1’ to ‘void* GetPC(int)’
make: *** [profiler.lo] Error 1
/Users/benson/x/rex2009-trunk/google-perftools-1.4 find . -name "*.a" -print
./.libs/liblogging.a



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


Please provide any additional information below.

Original issue reported on code.google.com by bimargul...@gmail.com on 30 Sep 2009 at 12:50

Original comment by `` on 18 Jan 2012 at 9:40

This is part of bug 169: you need to change #include <ucontext.h> to
<sys/ucontext.h>.  This will be in the next release.


Original comment by csilv...@gmail.com on 2 Oct 2009 at 7:15

  • Changed state: Duplicate