Closed GoogleCodeExporter closed 9 years ago
Oops, I always forget to test the various --enable flags before a new release.
Thanks for catching this; I'll look into it for the next release. In the
meantime, 'make -k' should hopefully work. :-]
Original comment by csilv...@gmail.com
on 15 Feb 2011 at 1:57
OK, fixing --enable-minimal for the next build by no longer running
debugallocation_test.
--disable-static builds for me, so I can't address that part of the report.
What is the exact 'configure' args that you're using? What's the exact output
of ./configure && make?
Original comment by csilv...@gmail.com
on 23 Feb 2011 at 5:18
Apparently it complains on C++ style comments here:
In file included from src/tests/malloc_extension_c_test.c:44:
./src/google/malloc_hook_c.h:43: error: expected identifier or ‘(’ before
‘/’ token
My configure flags are just usual --disable-static. gcc -v outputs:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-11'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-targets=all --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-11)
Original comment by alkondratenko
on 23 Feb 2011 at 3:21
Ah, that's just issue 309. This should be fixed at svn-root.
Original comment by csilv...@gmail.com
on 23 Feb 2011 at 11:22
This is due to a bug in the Makefile, which tells it to link against the wrong
debug library.
[root@zre-rhel4 google-perftools-1.7]# diff -u Makefile.orig Makefile
--- Makefile.orig 2011-02-24 15:06:14.000000000 -0800
+++ Makefile 2011-02-24 15:09:40.000000000 -0800
@@ -2135,7 +2135,7 @@
debugallocation_test_SOURCES = src/tests/debugallocation_test.cc
debugallocation_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
debugallocation_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
-debugallocation_test_LDADD = libtcmalloc_debug.la $(PTHREAD_LIBS)
+debugallocation_test_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS)
### ------- tcmalloc (thread-caching malloc + heap profiler + heap checker)
fixes the build. So I assume this fix needs to be made to Makefile.in and
Makefile.am
Original comment by quanah.g...@gmail.com
on 24 Feb 2011 at 11:12
I hit another issue on OSX only, so my final patch for Makefile.in is:
--- google-perftools-1.7/Makefile.in.orig 2011-02-24 15:13:20.412098139
-0800
+++ google-perftools-1.7/Makefile.in 2011-02-24 15:31:00.032153239 -0800
@@ -790,7 +790,6 @@
@WITH_DEBUGALLOC_TRUE@am_debugallocation_test_OBJECTS = debugallocation_test-debugallocation_test.$(OBJEXT)
debugallocation_test_OBJECTS = $(am_debugallocation_test_OBJECTS)
@WITH_DEBUGALLOC_TRUE@debugallocation_test_DEPENDENCIES = \
-@WITH_DEBUGALLOC_TRUE@ libtcmalloc_debug.la \
@WITH_DEBUGALLOC_TRUE@ $(am__DEPENDENCIES_1)
am__debugallocation_test_sh_SOURCES_DIST = \
src/tests/debugallocation_test.sh
@@ -2135,7 +2134,7 @@
@WITH_DEBUGALLOC_TRUE@debugallocation_test_SOURCES = src/tests/debugallocation_test.cc
@WITH_DEBUGALLOC_TRUE@debugallocation_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS)
@WITH_DEBUGALLOC_TRUE@debugallocation_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
-@WITH_DEBUGALLOC_TRUE@debugallocation_test_LDADD = libtcmalloc_debug.la
$(PTHREAD_LIBS)
+@WITH_DEBUGALLOC_TRUE@debugallocation_test_LDADD =
libtcmalloc_minimal_debug.la $(PTHREAD_LIBS)
### ------- tcmalloc (thread-caching malloc + heap profiler + heap checker)
Original comment by quanah.g...@gmail.com
on 24 Feb 2011 at 11:35
debugallocation_test needs to link against the full tcmalloc, because it needs
to get stack traces. Are you finding that --disable-static still fails to work
using the version of perftools as svn-root? Or maybe I'm misunderstanding
exactly which bug you're referring to here.
Original comment by csilv...@gmail.com
on 25 Feb 2011 at 12:21
@7 When I try to compile with --enable-minimal, I also run into this bug. I
find that applying the patch in Comment #5 fixes it and the build makes.
The issue is that when you
./configure --enable-minimal
make
you do NOT make libtcmalloc_debug.la. Instead you make libtcmalloc_minimal_debug.la. So the issue in the makefile is that debugallocation_test_LDADD points to the wrong thing - a file that is NOT created - if you configure with --enable-minimal.
The easy fix is presented in comment #5, just alter the makefile. A better fix
would be to not hardcode in this fix, as it'll have to be manually changed when
I try to configure the entire perftools package - ie, have the Makefile link to
the correct file when --enable-minimal is applied.
Does that make sense? I think comment #5 & #6 is referring to the initial bug,
regarding that --enable-minimal does not make because the Makefile links to the
wrong package. I'm on a linux box, I did not run into the issue that #6
suggests is an OSX-only bug.
Original comment by robots...@gmail.com
on 21 Jun 2011 at 2:31
#6: what version of perftools are you using? The top-of-tree tcmalloc should
fix this by not trying to build debugallocation_test with --enable-minimal.
That is the right fix for this (#5 fixes the build, but not the tests).
Original comment by csilv...@gmail.com
on 21 Jun 2011 at 4:50
This should be fixed in perftools 1.8, just released.
Original comment by csilv...@gmail.com
on 16 Jul 2011 at 1:24
Original issue reported on code.google.com by
alkondratenko
on 14 Feb 2011 at 4:24