cynthia / gperftools

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

Glibc 2.14 breaks build #347

Closed GoogleCodeExporter closed 9 years ago

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

What is the expected output? What do you see instead?
Expected: Make log with or without warnings and successful build.

Whats seen: Compile error that prevents the building:
src/tcmalloc.cc:1672:54: error: conflicting declaration ”void* (* 
__memalign_hook)(size_t, size_t, const void*)”
/usr/include/malloc.h:183:27: error: ”__memalign_hook” has a previous 
declaration as ”void* (* volatile __memalign_hook)(size_t, size_t, const 
void*)”

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

Please provide any additional information below.

Original issue reported on code.google.com by jesse.ja...@gmail.com on 18 Jun 2011 at 11:43

GoogleCodeExporter commented 9 years ago
Ugh, I guess that's what I get for using internal symbols.  They changed this 
to make it volatile from your version of glibc to mine.

I guess we'll have to do a configure-time check to see.  Ugh.  Feel free to 
draw up a patch if you'd like.

Is __memalign_hook the only one that fails to compile?  Are the other hooks in 
malloc.h
volatile as well?

Original comment by csilv...@gmail.com on 18 Jun 2011 at 3:32

GoogleCodeExporter commented 9 years ago
For me the compiler complains about that and then exits. So no others as faar 
as I know. 

Original comment by jesse.ja...@gmail.com on 18 Jun 2011 at 3:36

GoogleCodeExporter commented 9 years ago
Looks like all those symbols are volatile now:
   http://linuxtesting.org/upstream-tracker/compat_reports/glibc/2.13_to_2.14/abi_compat_report.html

Original comment by csilv...@gmail.com on 18 Jun 2011 at 3:45

GoogleCodeExporter commented 9 years ago

Original comment by rsleevi@chromium.org on 19 Jun 2011 at 12:44

GoogleCodeExporter commented 9 years ago
csilvers: Downstream Chromium patch is at 
http://codereview.chromium.org/7204042/ . I implemented downstream first, due 
to our wider hooking.

glibc 2.14 marked them as volatile in 
http://repo.or.cz/w/glibc.git/commitdiff/cf6bbbd701380accba8f709cf88b7bb160131e3
2 and 
http://repo.or.cz/w/glibc.git/commitdiff/a33c44639a8784589c8386ac0b56baf6d0beca3
2 to address http://sourceware.org/bugzilla/show_bug.cgi?id=11781 .

However, as of 
http://repo.or.cz/w/glibc.git/commitdiff/7d17596c198f11fa85cbcf9587443f262e63b61
6 , these hooks have been marked as deprecated (presumably, for removal in 
glibc 2.15), so the patch may not be viable long term.

Original comment by rsleevi@chromium.org on 21 Jun 2011 at 6:14

GoogleCodeExporter commented 9 years ago

Original comment by rsleevi@chromium.org on 23 Jun 2011 at 6:10

GoogleCodeExporter commented 9 years ago
I've got a configure-time check I'll get into the next release.

Original comment by csilv...@gmail.com on 8 Jul 2011 at 5:04

GoogleCodeExporter commented 9 years ago
This should be fixed in perftools 1.8, just released.

Original comment by csilv...@gmail.com on 16 Jul 2011 at 1:31