allen8807 / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Mac OS/X install fails #218

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Download version 1.4.6 or above.
2. Follow instructions at
https://wincent.com/wiki/Installing_memcached_1.4.1_on_Mac_OS_X_10.6_Snow_Leopar
d
(this is: configure & make)
3. The configure script fails.

What is the expected output? 
  - Configure ends correctly.

What do you see instead?
  checking for library containing pthread_create... no
  configure: error: Can't enable threads without the POSIX thread library.

What version of the product are you using? 
  Configure works correctly on 1.4.5, but fails on 1.4.6 and above

On what operating system?
  Darwin hostname 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
  (Mac OS/X Snow Leopard)

Please provide any additional information below.

  I imagine the configure script was changed in 1.4.6 and does not work anymore on Mac OS/X.
  On Mac OS/X there's no need to specify the pthread library: it's included in the linker's default library set.

Original issue reported on code.google.com by anto...@antonioshome.net on 21 Aug 2011 at 5:48

GoogleCodeExporter commented 9 years ago
Can you include the output from configure?

Original comment by dorma...@gmail.com on 21 Aug 2011 at 6:12

GoogleCodeExporter commented 9 years ago
nevermind, that was easy to reproduce. Guess I need to build test os x myself...

-               [saved_LDFLAGS="$saved_LDFLAGS -Wl,-R$ledir/lib"],
-               [AS_IF(test "$GCC" = "yes",
-                     [saved_LDFLAGS="$saved_LDFLAGS -Wl,-rpath=$ledir/lib"])])
+               [saved_LDFLAGS="$saved_LDFLAGS -Wl,-R$ledir/lib"])

that fixes it for me.

The bug started on 2f0a742e78b4ae50703bde72f5dff3952ffc13fb - specifying rpath 
there is confusing gcc on os x, and doesn't seem to be necessary on other 
platforms I have.

Trond; can you take a look at this please? I don't have access to the platforms 
that the original fix was for.

Original comment by dorma...@rydia.net on 21 Aug 2011 at 9:10

GoogleCodeExporter commented 9 years ago
Dormando: Your patch will probably remove that problem but did you try that on 
a system where you didn't have libevent available in the search path? (because 
you don't try to link in a runtime path to your binary, so I would expect the 
succeeding tests to fail..)

Original comment by trond.no...@gmail.com on 27 Aug 2011 at 10:53

GoogleCodeExporter commented 9 years ago
ehh.. not succeeding, but subsequent (haven't had my coffee ;-))

Original comment by trond.no...@gmail.com on 27 Aug 2011 at 10:54

GoogleCodeExporter commented 9 years ago
I just pushed: 

diff --git a/configure.ac b/configure.ac
index 1e3893e..fdb385b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,7 +247,7 @@ AC_CACHE_CHECK([for libevent directory], 
ac_cv_libevent_dir, [
          AS_IF(test "$SUNCC" = "yes" -o "x$_myos" = "xsolaris2",
                [saved_LDFLAGS="$saved_LDFLAGS -Wl,-R$ledir/lib"],
                [AS_IF(test "$GCC" = "yes",
-                     [saved_LDFLAGS="$saved_LDFLAGS -Wl,-rpath=$ledir/lib"])])
+                     [saved_LDFLAGS="$saved_LDFLAGS -Wl,-rpath,$ledir/lib"])])
        else
          ac_cv_libevent_dir="(system)"
        fi

I verified the fix on macosx lion and debian linux.  Please reopen the bug if 
it isn't fixed.

Original comment by trond.no...@gmail.com on 27 Aug 2011 at 12:05

GoogleCodeExporter commented 9 years ago
Issue 222 has been merged into this issue.

Original comment by eric.d.l...@gmail.com on 7 Sep 2011 at 3:07

GoogleCodeExporter commented 9 years ago
Hi,

This is just to confirm that the changes works perfectly on 

Darwin hostname 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 
2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
  (Mac OS/X Snow Leopard)

Original comment by anto...@antonioshome.net on 7 Sep 2011 at 6:46

GoogleCodeExporter commented 9 years ago
broken again 1.4.13

Original comment by crucialf...@gmail.com on 19 Jun 2012 at 11:30