Comment 15 for bug 1080376

Revision history for this message
Massive Media (493pocbrcycmdw7yksonho9o2qzz-o18bz-d18ecat4t1b76tkfi3vttrkfngli) wrote :

When compiling with bison and flex installed, I get following error when making the libmemcached:

hannes@buildbox03:~/1.0$ make
  GEN libmemcached/csl/scanner.cc
bison -o libmemcached/csl/parser.cc libmemcached/csl/parser.yy
make -j4 all-am
make[1]: Entering directory `/home/hannes/1.0'
  CXX libhashkit/libmemcached_libmemcached_la-aes.lo
/bin/sh ./libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -fvisibility=hidden -DBUILDING_LIBMEMCACHED -g -O2 -Werror -c -o libhashkit/libmemcached_libmemcached_la-aes.lo `test -f 'libhashkit/aes.cc' || echo './'`libhashkit/aes.cc

...

g++ -DHAVE_CONFIG_H -I. -fvisibility=hidden -g -O2 -Werror -c -o tests/tests_memerror-memerror.o `test -f 'tests/memerror.cc' || echo './'`tests/memerror.cc
  CXX tests/tests_memslap-memslap.o
g++ -DHAVE_CONFIG_H -I. -fvisibility=hidden -g -O2 -Werror -c -o tests/tests_memslap-memslap.o `test -f 'tests/memslap.cc' || echo './'`tests/memslap.cc
make[1]: *** No rule to make target `man/memaslap.1', needed by `all-am'. Stop.
make[1]: *** Waiting for unfinished jobs....
  CXX tests/tests_memdump-memdump.o
g++ -DHAVE_CONFIG_H -I. -fvisibility=hidden -g -O2 -Werror -c -o tests/tests_memdump-memdump.o `test -f 'tests/memdump.cc' || echo './'`tests/memdump.cc
make[1]: Leaving directory `/home/hannes/1.0'
make: *** [all] Error 2

When I remove this line from the Makefile (because I don't need manpages) I get following error:

edprotocol_la-byteorder.lo `test -f 'libmemcached/byteorder.cc' || echo './'`libmemcached/byteorder.cc
  CC libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo
/bin/bash ./libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -fvisibility=hidden -DBUILDING_LIBMEMCACHED -pthread -g -O2 -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo `test -f 'libmemcachedprotocol/ascii_handler.c' || echo './'`libmemcachedprotocol/ascii_handler.c
libmemcachedprotocol/ascii_handler.c: In function 'ascii_get_response_handler':
libmemcachedprotocol/ascii_handler.c:286: error: 'for' loop initial declarations are only allowed in C99 mode
libmemcachedprotocol/ascii_handler.c:286: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/tmp/buildd/libmemcached-1.0.14.2'
make: *** [all] Error 2