suse11.4 安装memcache 报错:
make error "array subscript is above array bounds"
这是memcache 在suse11.4 上的一个bug.因此需要打一个补丁去解决
applying a found patch (https://svn.erp5.org/repos/public/erp5/trunk/patches/memcached-1.4-fix-array-subscript-is-above-array-bounds.patch) seems to remedy the problem, cat fix-array-subscript-is-above-array-bounds.patch # zypper si memcached # cat /usr/src/packages/SOURCES/memcached-1.4.5.dif --- memcached.c.orig 2011-07-12 00:37:00.000000000 -0700 +++ memcached.c 2011-07-17 20:14:53.000000000 -0700 @@ -2360,15 +2360,18 @@ inline static void process_stats_detail(conn *c, const char *command) { assert(c != NULL); - if (strcmp(command, "on") == 0) { + char on[] = "on"; + char off[] = "off"; + char dump[] = "dump"; + if (strcmp(command, on) == 0) { settings.detail_enabled = 1; out_string(c, "OK"); } - else if (strcmp(command, "off") == 0) { + else if (strcmp(command, off) == 0) { settings.detail_enabled = 0; out_string(c, "OK"); } - else if (strcmp(command, "dump") == 0) { + else if (strcmp(command, dump) == 0) { int len; char *stats = stats_prefix_dump(&len); write_and_free(c, stats, len); cd /usr/local/src/memcached*/ make clean patch -p0 < ../fix-array-subscript-is-above-array-bounds.patch patching file memcached.c Hunk #1 succeeded at 2356 (offset -4 lines). ./configure make ... make[2]: Leaving directory `/usr/local/src/memcached-1.4.7' make[1]: Leaving directory `/usr/local/src/memcached-1.4.7' > make install ls -al `which memcached` -rwxr-xr-x 1 root root 93136 Aug 21 13:34 /usr/local/bin/memcached
扫描二维码关注公众号,回复:
1336513 查看本文章