0

I am completely newbie with cygwin and I am trying to compile tokyo cabinet I get the following error and cannot figure out why I have this conflict Could someone help me out ?

Thanks

$ make
gcc -c -I. -I/usr/local/include -I/home/Larry/include -I/usr/local/include -DND
EBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__ -D_TC_PREFIX="\"/usr/local\""
 -D_TC_INCLUDEDIR="\"/usr/local/include\"" -D_TC_LIBDIR="\"/usr/local/lib\"" -D_
TC_BINDIR="\"/usr/local/bin\"" -D_TC_LIBEXECDIR="\"/usr/local/libexec\"" -D_TC_A
PPINC="\"-I/usr/local/include\"" -D_TC_APPLIBS="\"-L/usr/local/lib -ltokyocabine
t -lbz2 -lz -lrt -lpthread -lm -lc \"" -g -O2 -std=c99 -Wall -fPIC -fsigned-char
 -O2 tcutest.c
tcutest.c:1: warning: -fPIC ignored for target (all code is position independent
)
tcutest.c:31: error: conflicting types for 'iprintf'
/usr/include/stdio.h:259: error: previous declaration of 'iprintf' was here
make: *** [tcutest.o] Error 1
Sdaz MacSkibbons
  • 27,668
  • 7
  • 32
  • 34
Larry
  • 1

1 Answers1

3

Kind of annoying. Globally rename iprintf to my_iprintf or something similar. I don't have cygwin, but just tried on Linux, and this worked well:

$ sed -i.bak 's/iprintf/my_iprintf/g' *.c *.h bros/*.c
$ ./configure
... blah blah configuring blah blah ...
#================================================================
# Ready to make.
#================================================================
$ make
... blah blah building blah blah ...
#================================================================
# Ready to install.
#================================================================
$ ./tctmgr --version
Tokyo Cabinet version 1.4.46 (909:1.0) for Linux
Copyright (C) 2006-2010 FAL Labs

IIRC cygwin has the GNU coreutils, which include sed, but it's been a while since I've used it. Hint: Keep the tarball around so you can re-untar it if you make a mistake, but the sed command also keeps backups.

Sdaz MacSkibbons
  • 27,668
  • 7
  • 32
  • 34