matt massie wrote:
i've made some changes to the CVS which i think will fix the gstat
problems. can you try it against CVS when you get a chance?
there is a test for the pthread(s) library in configure.in which should
automagically append -lpthread to the LDFLAGS. is it not doing that on
Tru64?
The problem with the automagic (heh) is that according to config.log, its
test for -lpthreads is working and its -lpthread test isn't.
My workaround has been to *add* (not replace) -lpthread to the LDFLAGs.
If I replace -lpthreads with -lpthread, I can link just fine. However, if
I make clean and change it back:
gcc -I/usr/include/machine -I/usr/include/sys -I../lib -I../lib/dnet -O2
-D_SOCKADDR_LEN -o gmond gmond.o monitor.o server.o listen.o machine.o
cmdline.o interface.o ../lib/.libs/libganglia.a ../lib/libdnet.a -lresolv
-lpthreads
/usr/bin/ld:
Unresolved:
pthread_attr_init
pthread_attr_setdetachstate
__pthread_create
__pthread_mutex_lock
__pthread_mutex_unlock
__pthread_self
__pthread_mutex_init
__pthread_cond_init
__pthread_mutex_destroy
__pthread_cond_destroy
__pthread_cond_broadcast
__pthread_cond_wait
__pthread_cond_signal
collect2: ld returned 1 exit status
make[1]: *** [gmond] Error 1
make[1]: Leaving directory `/cluster/members/member0/tmp/gmond-rc2/gmond'
make: *** [all-recursive] Error 1
I'm not exactly sure why one test works and the other one doesn't, however:
configure:7539: checking for pthread_create in -lpthread
configure:7572: gcc -o conftest -O2 conftest.c -lpthread >&5
/usr/bin/ld:
Unresolved:
pthread_create
collect2: ld returned 1 exit status
configure:7575: $? = 1
configure: failed program was:
#line 7546 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_create ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
pthread_create ();
;
return 0;
}
configure:7592: result: no
configure:7604: checking for pthread_create in -lpthreads
configure:7637: gcc -o conftest -O2 conftest.c -lpthreads >&5
configure:7640: $? = 0
configure:7643: test -s conftest
configure:7646: $? = 0
configure:7657: result: yes
Anywho. My train of thought got derailed in the midst of composing this
e-mail (which, believe it or not, took some time and I did put some thought
into it beyond the simple dumb copy-n-paste you see here), so even though I
can't assemble a rational conclusion to this bit of troubleshooting, it's
got enough useful information that I want to send it on in case someone
else can get something of value from it. So I'm just going to hit send now.