memcached, Solaris 10, ...

Brad Fitzpatrick brad at danga.com
Sun Apr 30 19:51:58 UTC 2006


I was just playing with Nexenta (Debian/Ubuntu + Solaris 10), trying to
get memcached to build.  My goal is to learn DTrace well enough to profile
a bunch of software and fix it, if there's anything to be fixed.

In any case, there were problems building it.  Aftering including -lmalloc
and -lnsl, etc, there were still problems with the "daemon()" function.

I found this:
   http://www.knams.wikimedia.org/~kate/memcached_solaris.diff

But the site is down now, so Google's cache is below.  Unfortunately, that
patch includes a reference to a daemon.c, but doesn't include it.  I
mailed Kate (I think she's on this list, also), but was wondering if any
of you guys are running memcached on Solaris 10.

Also, libevent's devpoll doesn't seem to work... I had to disable that and
fall back to select/poll.

- Brad



<hr>
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: .Makefile.am.swo
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: .Makefile.am.swp
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: .deps
diff -u -xconfigure -xconfig.status -xMakefile -xMakefile.in -xaclocal.m4 <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/Makefile.am <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/Makefile.am
--- <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/Makefile.am    2005-01-14 21:59:59.000000000 +0000
+++ <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/Makefile.am        2005-07-03 00:32:57.670904000 +0100
@@ -1,6 +1,7 @@
 bin_PROGRAMS = <b style="color:black;background-color:#a0ffff">memcached

</b> memcached_SOURCES = <b style="color:black;background-color:#a0ffff">memcached</b>.c slabs.c items.c <b style="color:black;background-color:#a0ffff">memcached</b>.h assoc.c
+memcached_LDADD = @LIBOBJS@

 SUBDIRS = doc
 DIST_DIRS = scripts
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: assoc.o
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: autom4te.cache
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: config.h
diff -u -xconfigure -xconfig.status -xMakefile -xMakefile.in -xaclocal.m4 <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/config.h.in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/config.h.in
--- <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/config.h.in    2004-04-30 18:49:45.000000000 +0100
+++ <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/config.h.in        2005-07-03 00:34:51.090699000 +0100
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */

+/* Define this if you have daemon() */
+#undef HAVE_DAEMON
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H

Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: config.h.in~
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: config.log
diff -u -xconfigure -xconfig.status -xMakefile -xMakefile.in -xaclocal.m4 <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/configure.ac <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/configure.ac
--- <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/configure.ac   2005-04-05 01:15:12.000000000 +0100
+++ <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/configure.ac       2005-07-03 00:22:39.242309000 +0100
@@ -19,6 +19,12 @@
 AC_CHECK_LIB(event, event_set, ,
        [AC_MSG_ERROR(libevent is required.  You can get it from $LIBEVENT_URL)])

+AC_SEARCH_LIBS(socket, socket)
+AC_SEARCH_LIBS(gethostbyname, nsl)
+AC_SEARCH_LIBS(mallinfo, malloc)
+
+AC_CHECK_FUNC(daemon,AC_DEFINE([HAVE_DAEMON],,[Define this if you have daemon()]),[AC_LIBOBJ(daemon)])
+
 AC_CHECK_HEADER(malloc.h, AC_DEFINE(HAVE_MALLOC_H,,[do we have malloc.h?]))
 AC_CHECK_MEMBER([struct mallinfo.arena], [
                AC_DEFINE(HAVE_STRUCT_MALLINFO,,[do we have stuct mallinfo?])
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: configure.lineno
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: daemon.c
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: daemon.o
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: depcomp
Common subdirectories: <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/doc and <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/doc
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: items.o
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: <b style="color:black;background-color:#a0ffff">memcached
</b>diff -u -xconfigure -xconfig.status -xMakefile -xMakefile.in -xaclocal.m4 <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/<b style="color:black;background-color:#a0ffff">memcached</b>.c <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/<b style="color:black;background-color:#a0ffff">memcached</b>.c
--- <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/<b style="color:black;background-color:#a0ffff">memcached</b>.c        2005-04-05 01:10:26.000000000 +0100
+++ <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/<b style="color:black;background-color:#a0ffff">memcached</b>.c    2005-07-03 00:35:26.558867000 +0100
@@ -1381,7 +1381,7 @@
             settings.verbose++;
             break;
         case 'l':
-            if (!inet_aton(optarg, &addr)) {
+            if (!inet_pton(AF_INET, optarg, &addr)) {
                 fprintf(stderr, "Illegal address: %s\n", optarg);
                 return 1;
             } else {
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: <b style="color:black;background-color:#a0ffff">memcached</b>.o
Common subdirectories: <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12/scripts and <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>/scripts
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: slabs.o
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: stamp-h
Only in <b style="color:black;background-color:#a0ffff">memcached</b>-1.1.12-<b style="color:black;background-color:#ffff66">solaris</b>: stamp-h1



More information about the memcached mailing list