DavidMorre / gperftools

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

Failure to compile on CentOS #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. configure
2. make
3.

What is the expected output? What do you see instead?
 g++ -DHAVE_CONFIG_H -I. -I. -I./src -I./src -DNO_TCMALLOC_SAMPLES
-DNO_HEAP_CHECK -pthread -DNDEBUG -Wall -Wwrite-strings
-Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -fno-exceptions
-g -O2 -MT libtcmalloc_minimal_internal_la-malloc_hook.lo -MD -MP -MF
.deps/libtcmalloc_minimal_internal_la-malloc_hook.Tpo -c src/malloc_hook.cc
-o libtcmalloc_minimal_internal_la-malloc_hook.o
src/malloc_hook.cc:450: error: declaration of C function \x{2018}void*
mremap(void*, size_t, size_t, int, ...)\x{2019} conflicts with
/usr/include/sys/mman.h:122: error: previous declaration \x{2018}void*
mremap(void*, size_t, size_t, int)\x{2019} here
make: *** [libtcmalloc_minimal_internal_la-malloc_hook.lo] Error 1

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

Linux l-sim-13-095 2.6.29.4 #2 SMP Fri Jul 17 16:54:27 PDT 2009 x86_64
x86_64 x86_64 GNU/Linux

Please provide any additional information below.

I'm not sure how the compiler is supposed to cope with a variadic function
and the non-variadic version...

Original issue reported on code.google.com by clint.ol...@gmail.com on 21 Jan 2010 at 8:50

GoogleCodeExporter commented 9 years ago
I seemed to have gotten past this problem by ensuring I use the bone-stock 
compiler:
/usr/bin/g++.

Original comment by clint.ol...@gmail.com on 22 Jan 2010 at 6:16

GoogleCodeExporter commented 9 years ago
Yay!  If only all bug reports were this easy to resolve...

Original comment by csilv...@gmail.com on 22 Jan 2010 at 6:18

GoogleCodeExporter commented 9 years ago
My suggestion would be to actually use the vendor's shipped compiler by default
unless they have set CC or CXX.  I noticed that the compiler path was 
unqualified in
the build.

Original comment by clint.ol...@gmail.com on 22 Jan 2010 at 6:31