You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Download & extract sources
2. ./configure --enable-frame-pointers LIBS=-lpthread
3. make
I would expect it to compile when following the instructions in INSTALL. The
latter says to specify --disable-shared because cygwin doesn't support weak
symbols... which I think is not actually true any more (and weak symbols don't
work properly with static linking). The --enable-frame-pointer is needed to
avoid errors about missing libunwind. The LIBS=lpthread allows test cases to
compile (otherwise they also fail because pthread functions are missing). I
also had to change casting in maybe_threads.cc to avoid errors and warnings
about differing size of int and pthread_key_t (which is a pointer on cygwin).
The root of the issue seems to lurk in the black magic invoked by
maybe_threads.cc
Using gperftools-2.1.1, 64-bit cygwin on Windows 7, gcc-4.8.3
Relevant makefile output:
/bin/sh ./libtool --tag=CXX --mode=link g++ -DNO_TCMALLOC_SAMPLES -DNDEBUG
-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 -Wno-unused-result
-fno-omit-frame-pointer -g -O2 -version-info 5:2:1 -no-undefined -o
libtcmalloc_minimal.la -rpath /home/Ryan/apps/gperftools-2.1/lib
libtcmalloc_minimal_la-tcmalloc.lo libtcmalloc_minimal_internal.la
libtool: link: rm -fr .libs/libtcmalloc_minimal.dll.a
libtool: link: g++ -shared -nostdlib
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/crtbegin.o
.libs/libtcmalloc_minimal_la-tcmalloc.o -Wl,--whole-archive
./.libs/libtcmalloc_minimal_internal.a -Wl,--no-whole-archive
-L/usr/lib/gcc/x86_64-pc-cygwin/4.8.3
-L/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../.. -lstdc++
-lgcc_s -lgcc -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32 -lgcc_s -lgcc
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/crtend.o -O2 -o
.libs/cygtcmalloc_minimal-4.dll -Wl,--enable-auto-image-base -Xlinker
--out-implib -Xlinker .libs/libtcmalloc_minimal.dll.a
./.libs/libtcmalloc_minimal_internal.a(libtcmalloc_minimal_internal_la-maybe_thr
eads.o): In function `perftools_pthread_key_create(__pthread_key_t**, void
(*)(void*))':
/scratch/gperftools-2.1/src/maybe_threads.cc:83:(.text+0x7): relocation
truncated to fit: R_X86_64_PC32 against undefined symbol `pthread_key_create'
./.libs/libtcmalloc_minimal_internal.a(libtcmalloc_minimal_internal_la-maybe_thr
eads.o): In function `perftools_pthread_getspecific(__pthread_key_t*)':
/scratch/gperftools-2.1/src/maybe_threads.cc:93:(.text+0x37): relocation
truncated to fit: R_X86_64_PC32 against undefined symbol `pthread_getspecific'
./.libs/libtcmalloc_minimal_internal.a(libtcmalloc_minimal_internal_la-maybe_thr
eads.o): In function `perftools_pthread_setspecific(__pthread_key_t*, void*)':
/scratch/gperftools-2.1/src/maybe_threads.cc:101:(.text+0x67): relocation
truncated to fit: R_X86_64_PC32 against undefined symbol `pthread_setspecific'
./.libs/libtcmalloc_minimal_internal.a(libtcmalloc_minimal_internal_la-maybe_thr
eads.o): In function `perftools_pthread_once(pthread_once_t*, void (*)())':
/scratch/gperftools-2.1/src/maybe_threads.cc:131:(.text+0xa3): relocation
truncated to fit: R_X86_64_PC32 against undefined symbol `pthread_once'
collect2: error: ld returned 1 exit status
Makefile:3247: recipe for target 'libtcmalloc_minimal.la' failed
make: *** [libtcmalloc_minimal.la] Error 1
Original issue reported on code.google.com by [email protected] on 18 Aug 2014 at 3:36
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 18 Aug 2014 at 3:36The text was updated successfully, but these errors were encountered: