I can repo this issue on OpenBSD 4.4... it seems that /usr/include/sys/endian.h has an existing macro definition for "swap64". I can fix this problem by either renaming the function or by wrapping the decl and def in memcached.c with "#ifndef swap64", since the system version does the same thing.
Separately, I had to pass --disable-coverage to configure since -lgcov is unavailable (at least on a stock system). Finally, the tests fail with a complaint about rlimit; apparently "-c 1021" is ok but >=1022 fails. Changing the default value for settings.maxconns in memcached.c (and correspondingly fixing up the tests that check it in binary.t and stats.t) does away with the problem. The test suite then passes, if rather noisily. Cheers, Adam On Fri, Jul 10, 2009 at 6:53 PM, Artur <[email protected]> wrote: > > Hi, > I am using this great tool on by OpenBSD box, but unfortunately there is > problem during the compilation process of last stable 1.4 release (version > 1.2.8 has no compilation problems): > > # ./configure > checking build system type... i386-unknown-openbsd4.5 > checking host system type... i386-unknown-openbsd4.5 > checking target system type... i386-unknown-openbsd4.5 > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for a thread-safe mkdir -p... ./install-sh -c -d > checking for gawk... no > checking for mawk... no > checking for nawk... nawk > checking whether make sets $(MAKE)... yes > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking for style of include used by make... GNU > checking dependency style of gcc... gcc3 > checking how to run the C preprocessor... gcc -E > checking for grep that handles long lines and -e... /usr/bin/grep > checking for egrep... /usr/bin/grep -E > checking for icc in use... no > checking for Sun cc in use... no > checking for gcc option to accept ISO C99... -std=gnu99 > checking whether gcc -std=gnu99 and cc understand -c and -o together... yes > checking for a BSD-compatible install... /usr/bin/install -c > checking for gcov... /usr/bin/gcov > checking for libevent directory... (system) > checking for library containing socket... none required > checking for library containing gethostbyname... none required > checking for library containing umem_cache_create... no > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking for stdbool.h that conforms to C99... yes > checking for _Bool... yes > checking for an ANSI C-conforming const... yes > checking for socklen_t... yes > checking for endianness... little > checking for library containing pthread_create... -lpthread > checking for mlockall... yes > checking for getpagesizes... no > checking for memcntl... no > checking for sigignore... no > checking for alignment... none > checking for setppriv... no > checking umem.h usability... no > checking umem.h presence... no > checking for umem.h... no > checking for xml2rfc... no > checking for xsltproc... /usr/local/bin/xsltproc > configure: creating ./config.status > config.status: creating Makefile > config.status: creating doc/Makefile > config.status: creating config.h > config.status: config.h is unchanged > config.status: executing depfiles commands > > # make > make all-recursive > Making all in doc > make all-am > gcc -std=gnu99 -DHAVE_CONFIG_H -I. -DNDEBUG -g -O2 -Wall -Werror > -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations > -Wredundant-decls -MT memcached-memcached.o -MD -MP -MF > .deps/memcached-memcached.Tpo -c -o memcached-memcached.o `test -f > 'memcached.c' || echo './'`memcached.c > memcached.c:96: error: syntax error before "__extension__" > memcached.c:96: error: syntax error before '?' token > memcached.c:59: warning: `drive_machine' declared `static' but never > defined > memcached.c:60: warning: `new_socket' declared `static' but never defined > memcached.c:61: warning: `server_socket' declared `static' but never > defined > memcached.c:62: warning: `try_read_command' declared `static' but never > defined > memcached.c:71: warning: `try_read_network' declared `static' but never > defined > memcached.c:72: warning: `try_read_udp' declared `static' but never defined > memcached.c:74: warning: `conn_set_state' declared `static' but never > defined > memcached.c:77: warning: `stats_init' declared `static' but never defined > memcached.c:78: warning: `server_stats' declared `static' but never defined > memcached.c:79: warning: `process_stat_settings' declared `static' but > never defined > memcached.c:83: warning: `settings_init' declared `static' but never > defined > memcached.c:86: warning: `event_handler' declared `static' but never > defined > memcached.c:87: warning: `conn_close' declared `static' but never defined > memcached.c:88: warning: `conn_init' declared `static' but never defined > memcached.c:89: warning: `update_event' declared `static' but never defined > memcached.c:90: warning: `complete_nread' declared `static' but never > defined > memcached.c:91: warning: `process_command' declared `static' but never > defined > memcached.c:92: warning: `write_and_free' declared `static' but never > defined > memcached.c:93: warning: `ensure_iov_space' declared `static' but never > defined > memcached.c:94: warning: `add_iov' declared `static' but never defined > memcached.c:95: warning: `add_msghdr' declared `static' but never defined > *** Error code 1 > > Stop in /usr/src/memcached-1.4.0 (line 417 of Makefile). > *** Error code 1 > > Stop in /usr/src/memcached-1.4.0 (line 770 of Makefile). > *** Error code 1 > > Stop in /usr/src/memcached-1.4.0 (line 276 of Makefile). > > Please help me to solve this problem. > > Best regards, > Artur >
