Hey Padraig, I followed your blog post a while back,
http://posulliv.github.com/2010/02/22/cpp-cassandra.html and was able to get my c++ thrift interface working. I would like to switch over to libcassandra, but I am getting build errors on Debian. What platform are you on? I am experiencing libtool wackiness which (judging by googling on the errors) are fairly common. I read several strings of comments but am not familiar with m4 or autoconf to know what is going on. Can you help? Thanks very much, Jack $ pwd /home/jack/libcassandra $ config/autorun.sh config/autorun.sh: running `/usr/bin/libtoolize --automake --copy --force' config/autorun.sh: running `/usr/bin/aclocal-1.10 -I m4' config/autorun.sh: running `/usr/bin/autoheader' config/autorun.sh: running `/usr/bin/automake-1.10 --add-missing --copy --force' config/autorun.sh: running `/usr/bin/autoconf' --- Configured with the following tools: * libtoolize (GNU libtool) 1.5.26 * aclocal (GNU automake) 1.10.1 * autoheader (GNU Autoconf) 2.61 * automake (GNU automake) 1.10.1 * autoconf (GNU Autoconf) 2.61 --- $ ./configure checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU 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 dependency style of gcc... gcc3 checking for isainfo... no checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for AIX... 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 minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking whether gcc and cc understand -c and -o together... yes checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 98304 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for ar... ar checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for dlfcn.h... yes checking whether we are using the GNU C++ compiler... (cached) yes checking whether g++ accepts -g... (cached) yes checking dependency style of g++... (cached) gcc3 checking how to run the C++ preprocessor... g++ -E checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking if g++ supports C++0x features without additional flags... no checking if g++ supports C++0x features with -std=c++0x... yes checking if g++ supports C++0x features with -std=gnu++0x... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... yes checking target system type... i686-pc-linux-gnu checking whether __SUNPRO_C is declared... no checking whether __ICC is declared... no checking for ISO C++ 98 include files... yes checking "C Compiler version--yes"... "gcc (Debian 4.3.2-1.1) 4.3.2" checking "C++ Compiler version"... "g++ (Debian 4.3.2-1.1) 4.3.2" checking whether byte ordering is bigendian... no checking for an ANSI C-conforming const... yes checking for inline... inline checking for working volatile... yes checking for C/C++ restrict keyword... __restrict checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for size_t... yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking for library containing clock_gettime... -lrt checking for off_t... yes checking size of off_t... 8 checking for size_t... (cached) yes checking size of size_t... 4 checking for long long... yes checking size of long long... 8 checking if time_t is unsigned... no checking for cos in -lm... yes checking for setsockopt... yes checking for bind... yes checking whether madvise is declared... no checking whether the compiler provides atomic builtins... yes checking assert.h usability... yes checking assert.h presence... yes checking for assert.h... yes checking whether to enable assertions... yes checking whether it is safe to use -fdiagnostics-show-option... yes checking whether it is safe to use -Wconversion... yes checking whether it is safe to use -Wconversion with htons... no checking whether it is safe to use -Wextra... yes checking whether it is safe to use -Wmissing-declarations from C++... yes checking whether it is safe to use -Wlogical-op... yes checking whether it is safe to use -Wredundant-decls from C++... no checking whether it is safe to use -Wattributes from C++... no checking whether it is safe to use -Wno-attributes... no checking for doxygen... no checking for perl... perl checking for dpkg-gensymbols... dpkg-gensymbols checking for working -pipe... yes checking for library containing getopt_long... none required checking for library containing gethostbyname... none required checking for getline... yes checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for pthread_yield_np... no checking if pthread_yield takes zero arguments... yes checking if pthread_yield takes one argument... no checking for pthread_attr_getstacksize... yes checking for pthread_attr_setprio... no checking for pthread_attr_setschedparam... yes checking for pthread_attr_setstacksize... yes checking for pthread_condattr_create... no checking for pthread_getsequence_np... no checking for pthread_key_delete... yes checking for pthread_rwlock_rdlock... yes checking for pthread_setprio... no checking for pthread_setprio_np... no checking for pthread_setschedparam... yes checking for pthread_sigmask... yes checking for pthread_attr_create... no checking for rwlock_init... no checking args to pthread_getspecific... POSIX checking args to pthread_mutex_init... POSIX checking args to readdir_r... POSIX checking style of sigwait... POSIX checking for pthread_attr_setscope... yes checking if pthread_yield takes zero arguments... yes checking if pthread_yield takes 1 argument... no checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking for libthrift... yes checking how to link with libthrift... /usr/local/lib/libthrift.so -lrt -lpthread -Wl,-rpath -Wl,/usr/local/lib checking utime.h usability... yes checking utime.h presence... yes checking for utime.h... yes checking the location of hash_map... <unordered_map> checking whether hash_map has rehash method... yes checking whether hash_map has resize method... no checking whether to redefine hash<string>... no checking the location of cstdint... <tr1/cstdint> checking the location of cinttypes... <tr1/cinttypes> checking whether struct tm is in sys/time.h or time.h... (cached) time.h checking for working alloca.h... yes checking for alloca... yes checking whether utime accepts a null argument... yes checking for vprintf... yes checking for _doprnt... no checking working fdatasync... yes checking for gethrtime... no checking for setupterm... no checking for backtrace... yes checking for backtrace_symbols... yes checking for backtrace_symbols_fd... yes checking whether stat file-mode macros are broken... no checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking for ANSI C header files... (cached) yes checking for sys/wait.h that is POSIX.1 compatible... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for sys/types.h... (cached) yes checking sys/fpu.h usability... no checking sys/fpu.h presence... no checking for sys/fpu.h... no checking fpu_control.h usability... yes checking fpu_control.h presence... yes checking for fpu_control.h... yes checking ieeefp.h usability... no checking ieeefp.h presence... no checking for ieeefp.h... no checking select.h usability... no checking select.h presence... no checking for select.h... no checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking for utime.h... (cached) yes checking sys/utime.h usability... no checking sys/utime.h presence... no checking for sys/utime.h... no checking synch.h usability... no checking synch.h presence... no checking for synch.h... no checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sched.h usability... yes checking sched.h presence... yes checking for sched.h... yes checking sys/prctl.h usability... yes checking sys/prctl.h presence... yes checking for sys/prctl.h... yes checking execinfo.h usability... yes checking execinfo.h presence... yes checking for execinfo.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking termcap.h usability... yes checking termcap.h presence... yes checking for termcap.h... yes checking termio.h usability... yes checking termio.h presence... yes checking for termio.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking asm/termbits.h usability... yes checking asm/termbits.h presence... yes checking for asm/termbits.h... yes checking paths.h usability... yes checking paths.h presence... yes checking for paths.h... yes checking for sched_yield... yes checking for curses.h... yes checking for term.h... yes checking for uint... yes checking for ulong... yes checking cxxabi.h usability... yes checking cxxabi.h presence... yes checking for cxxabi.h... yes checking checking for abi::__cxa_demangle... yes checking for htonll... checking ucontext.h usability... yes checking ucontext.h presence... yes checking for ucontext.h... yes checking for printstack... no checking for dlfcn.h... (cached) yes checking for execinfo.h... (cached) yes checking for backtrace... (cached) yes checking for backtrace_symbols_fd... (cached) yes checking for working bitfield... yes checking atomic.h usability... no checking atomic.h presence... no checking for atomic.h... no configure: creating ./config.status config.status: creating Makefile config.status: creating libgenthrift/configure.h config.status: creating libcassandra/configure.h config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands --- Configuration summary for libcassandra version 0.1 * Installation prefix: /usr/local * System type: pc-linux-gnu * Host CPU: i686 * C Compiler: gcc (Debian 4.3.2-1.1) 4.3.2 * C++ Compiler: g++ (Debian 4.3.2-1.1) 4.3.2 * Assertions enabled: yes * Debug enabled: no * Warnings as failure: yes * C++ cstdint location: <tr1/cstdint> * C++ hash_map location: <unordered_map> * C++ hash namespace: std * C++ shared_ptr namespace: --- $ make make all-recursive make[1]: Entering directory `/home/jack/libcassandra' make[2]: Entering directory `/home/jack/libcassandra' /bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -ggdb3 -pipe -std=gnu++0x -O3 -Werror -pedantic -Wall -Wundef -Wshadow -fdiagnostics-show-option -Wformat -fno-strict-aliasing -Wno-strict-aliasing -Wextra -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long -Wmissing-declarations -Wno-redundant-decls -I/usr/local/include/thrift -MT libgenthrift/libgenthrift_libgenthrift_la-cassandra_constants.lo -MD -MP -MF libgenthrift/.deps/libgenthrift_libgenthrift_la-cassandra_constants.Tpo -c -o libgenthrift/libgenthrift_libgenthrift_la-cassandra_constants.lo `test -f 'libgenthrift/cassandra_constants.cpp' || echo './'`libgenthrift/cassandra_constants.cpp ./libtool: line 841: X--tag=CXX: command not found ./libtool: line 874: libtool: ignoring unknown tag : command not found ./libtool: line 841: X--mode=compile: command not found ./libtool: line 1008: *** Warning: inferring the mode of operation is deprecated.: command not found ./libtool: line 1009: *** Future versions of Libtool will require --mode=MODE be specified.: command not found ./libtool: line 1152: Xg++: command not found ./libtool: line 1152: X-DHAVE_CONFIG_H: command not found ./libtool: line 1152: X-I.: command not found ./libtool: line 1152: X-I.: command not found ./libtool: line 1152: X-ggdb3: command not found ./libtool: line 1152: X-pipe: command not found ./libtool: line 1152: X-std=gnu++0x: command not found ./libtool: line 1152: X-O3: command not found ./libtool: line 1152: X-Werror: command not found ./libtool: line 1152: X-pedantic: command not found ./libtool: line 1152: X-Wall: command not found ./libtool: line 1152: X-Wundef: command not found ./libtool: line 1152: X-Wshadow: command not found ./libtool: line 1152: X-fdiagnostics-show-option: command not found ./libtool: line 1152: X-Wformat: command not found ./libtool: line 1152: X-fno-strict-aliasing: command not found ./libtool: line 1152: X-Wno-strict-aliasing: command not found ./libtool: line 1152: X-Wextra: command not found ./libtool: line 1152: X-Woverloaded-virtual: command not found ./libtool: line 1152: X-Wnon-virtual-dtor: command not found ./libtool: line 1152: X-Wctor-dtor-privacy: command not found ./libtool: line 1152: X-Wno-long-long: command not found ./libtool: line 1152: X-Wmissing-declarations: command not found ./libtool: line 1152: X-Wno-redundant-decls: command not found ./libtool: line 1152: X-I/usr/local/include/thrift: No such file or directory ./libtool: line 1152: X-MT: command not found ./libtool: line 1152: Xlibgenthrift/libgenthrift_libgenthrift_la-cassandra_constants.lo: No such file or directory ./libtool: line 1152: X-MD: command not found ./libtool: line 1152: X-MP: command not found ./libtool: line 1152: X-MF: command not found ./libtool: line 1152: Xlibgenthrift/.deps/libgenthrift_libgenthrift_la-cassandra_constants.Tpo: No such file or directory ./libtool: line 1152: X-c: command not found ./libtool: line 1205: Xlibgenthrift/libgenthrift_libgenthrift_la-cassandra_constants.lo: No such file or directory ./libtool: line 1210: libtool: compile: cannot determine name of library object from `': command not found make[2]: *** [libgenthrift/libgenthrift_libgenthrift_la-cassandra_constants.lo] Error 1 make[2]: Leaving directory `/home/jack/libcassandra' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jack/libcassandra' make: *** [all] Error 2 $ On Thu, Mar 11, 2010 at 10:10 PM, Alex Durgin <alex.dur...@gmail.com> wrote: > > > On Mar 11, 2010, at 10:51 PM, "Padraig O'Sullivan" > <osullivan.padr...@gmail.com> wrote: > >> On Thu, Mar 11, 2010 at 11:31 PM, Avinash Lakshman >> <avinash.laksh...@gmail.com> wrote: >>> >>> How is Drizzle being integrated with Cassandra? Are there any resources >>> on >>> the Internet that I could read up? >> >> The idea is to create a storage engine (along with some >> INFORMATION_SCHEMA tables probably) in drizzle on top of cassandra but >> we are just starting to think about it so there is no resources >> available right now. >> >> Keep an eye on the blueprints and code branches of drizzle for work on >> it. Any tasks we are working on, we will likely create a blueprint for >> it. Blueprints and code branches are available on launchpad - >> http://launchpad.net/drizzle >> >>> >>> Thanks >>> Avinash >>> >>> On Thu, Mar 11, 2010 at 8:12 PM, Padraig O'Sullivan >>> <osullivan.padr...@gmail.com> wrote: >>>> >>>> We have developed a C++ client library based on the hector Java client >>>> for Cassandra that we intend on using for Drizzle integration. This >>>> library is still very much alpha and more features will be added while >>>> we work on drizzle integration. Connection pooling or failover is >>>> currently not implemented but will likely be added in the very near >>>> future. >>>> >>>> The source is available on github at: >>>> http://github.com/posulliv/libcassandra >>>> >>>> -Padraig >>> >>> > > Interesting. What would be an example use case? Would this be more > appropriate for a static set of columns? I can imagine having access to a > mysql dialect would make for easy access to some simple orm mapping using > existing libraries among other things. >