From: SourceForge.net <no...@so...> - 2009-06-28 01:31:45
|
Bugs item #1849644, was opened at 2007-12-12 21:35 Message generated for change (Comment added) made by chickenandporn You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1849644&group_id=129981 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: configure pthread test failing Initial Comment: Trying to compile of fc7 or fc7 I get this output: checking for pthread_create in -lpthread... no configure: error: Please install pthreads library first. But it is installed with glibc-headers-2.6-4 and glibc-devel. I am unable to compile this on a modern Fedora distro! respond to: da...@ge... ---------------------------------------------------------------------- >Comment By: chickenandporn (chickenandporn) Date: 2009-06-28 01:31 Message: OK. Testing with a mysql-devel but missing fuse-devel shows that the LDADD and such are being given a "-L${FUSE_LIB_DIR}", but with no fuse, that means that LDADD += "-L ", which seems to break the later test builds. I've protected those behind a "if test x${FUSE_LIB_DIR} != x". Done the same for the MySQL stuff, since it also uses its own fallback to find MySQL if the user hasn't give one. I also notice that letting it run normally gets a "... -l mysqlclient_r ... -l mysqlclient" which seems redundant. AC_SEARCH_LIBS allows it to check without adding -lmysqlclient first, which might mislead the user but accurately avoids duplicate mysqlclient libs. Index: configure.in =================================================================== --- configure.in (revision 47) +++ configure.in (working copy) @@ -48,11 +48,14 @@ break fi done +if test x${FUSE_LIB_DIR} != x +then FUSE_LDFLAGS="-L${FUSE_LIB_DIR}" FUSE_CFLAGS="-I${FUSE_INC_DIR}" LDFLAGS="$LDFLAGS $FUSE_LDFLAGS" CFLAGS="$CFLAGS $FUSE_CFLAGS" CPPFLAGS="$CPPFLAGS $FUSE_CFLAGS" +fi MYSQL_CONFIG=$(which mysql_config) if test "$MYSQL_CONFIG"; then @@ -72,17 +75,20 @@ break fi done + if test x${MYSQL_LIB_DIR} != x + then MYSQL_LDFLAGS="-L${MYSQL_LIB_DIR}" MYSQL_CFLAGS="-I${MYSQL_INC_DIR}" fi +fi LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS" CFLAGS="$CFLAGS $CFLAGS_ADD $MYSQL_CFLAGS" CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS" dnl Checks for libraries. -AC_CHECK_LIB(pthread, pthread_create,, AC_MSG_ERROR([Please install pthreads library first.])) -AC_CHECK_LIB(mysqlclient, mysql_init,, AC_MSG_ERROR([Please install mysqlclient library first.])) -AC_CHECK_LIB(fuse, fuse_main,, AC_MSG_ERROR([Please install fuse library first.])) +AC_SEARCH_LIBS(mysql_init, mysqlclient,, AC_MSG_ERROR([Please install mysqlclient library first.])) +AC_SEARCH_LIBS(pthread_create, pthread,, AC_MSG_ERROR([Please install pthreads library first.])) +AC_SEARCH_LIBS(fuse_main, fuse,, AC_MSG_ERROR([Please install fuse library first.])) dnl Checks for header files. (mac -- and BSD? -- have statfs in mount.h) AC_CHECK_HEADERS(stdio.h sys/param.h sys/mount.h) ---------------------------------------------------------------------- Comment By: chickenandporn (chickenandporn) Date: 2009-06-28 01:07 Message: The error seems to be that "mysql_config" is part of "mysql", not part of "mysql-devel", so the configure finds a "mysql_config" and interrogates it: MYSQL_CONFIG=$(which mysql_config) if test "$MYSQL_CONFIG"; then MYSQL_LDFLAGS=$(${MYSQL_CONFIG} --libs_r) ... ... LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS" Problem is, that generates a LDFLAGS that doesn't actually work because the linker cannot find -lmysqlclient_r (which is part of mysql-devel). It just so happens that the first compilation is pthreads, not mysql. I would recommend swapping the order. At the same time, I would recommend moving the pthreads check to AC_SEARCH_LIBS rather than AC_CHECK_LIB so that OSes with it already without a -lpthreads are properly detected as "happy without -lpthreads" (or the EDG variant: -K thread ) Whaddaya say to that? --- configure.in (revision 47) +++ configure.in (working copy) @@ -80,8 +80,8 @@ CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS" dnl Checks for libraries. -AC_CHECK_LIB(pthread, pthread_create,, AC_MSG_ERROR([Please install pthreads library first.])) AC_CHECK_LIB(mysqlclient, mysql_init,, AC_MSG_ERROR([Please install mysqlclient library first.])) +AC_SEARCH_LIBS(pthread_create, pthread,, AC_MSG_ERROR([Please install pthreads library first.])) AC_CHECK_LIB(fuse, fuse_main,, AC_MSG_ERROR([Please install fuse library first.])) ... checking for mysql_init in -lmysqlclient... no configure: error: Please install mysqlclient library first. make: *** [config.status] Error 1 ---------------------------------------------------------------------- Comment By: Michal Ludvig (ludvigm) Date: 2009-06-28 00:48 Message: Hi Allan, simply uninstall mysql-devel and fuse-devel and you should be able to trigger this error with ./configure. IIRC there's something wrong with CFLAGS or LDFLAGS handling - when mysql-devel is missing it makes CFLAGS invalid which in turn breaks pthread test. It's indeed my fault but I never got around to fix it. Feel free to do so ;-) ---------------------------------------------------------------------- Comment By: chickenandporn (chickenandporn) Date: 2009-06-27 17:57 Message: Hey Dan, if you are willing to get back on the diagnostic side, can you attach a config.log below, by expanding the "Attached file" and uploading a config.log from your dev environment? ---------------------------------------------------------------------- Comment By: chickenandporn (chickenandporn) Date: 2009-06-27 16:07 Message: Hi Dan; I'd like to address your issue in a next release; I'm a bit new here as well. Can I send you another tarball to try? As well, I don't expect this to magically resolve the issue, are you willing to banter a bit to resolve the issue on your platform? ---------------------------------------------------------------------- Comment By: Michal Ludvig (ludvigm) Date: 2009-03-03 01:16 Message: IIRC the message is misleading - in fact it means you don't have mysql-devel (or libmysql-dev or how is it called on debian) package installed. You'll also need a development package for fuse (fuse-devel or libfuse-dev). ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-03-03 00:12 Message: I have the same problem, "configure: error: Please install pthreads library first." if i do a locate pthread i get "/lib/libpthread-2.7.so /lib/libpthread.so.0 /lib/tls/i686/cmov/libpthread-2.7.so /lib/tls/i686/cmov/libpthread.so.0 /usr/NX/lib/perl/include/bits/pthreadtypes.ph /usr/include/pthread.h /usr/include/bits/pthreadtypes.h /usr/lib/libgpgme-pthread.so.11 /usr/lib/libgpgme-pthread.so.11.6.4 /usr/lib/libpthread.a /usr/lib/libpthread.so /usr/lib/libpthread_nonshared.a /usr/lib/perl/5.8.8/bits/pthreadtypes.ph /usr/lib/xen/libpthread.a /usr/lib/xen/libpthread_nonshared.a /usr/share/man/man7/pthreads.7.gz " Am I doing something wrong? I'm using ubuntu 8.10 and i have installed allmost anything with "thread" as package name.. any help? ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-12-12 22:01 Message: Logged In: NO I meant fc6 or fc7, 32bit or 64bit ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=716425&aid=1849644&group_id=129981 |