[Box Backup] Cygwin build

Paul Arch boxbackup at fluffy.co.uk
Thu Apr 15 07:04:59 BST 2004


today I have been attempting to build box backup under cygwin, with **some**
success - getting the thing to build has been a little tricky, but I am
getting close. So below are a few notes, and some questions :)
Before I start, I must admit I have never programmed in c++ before, so I am
in a little over my head when trying to debug some things ;)

I have pretty much set the CYGWIN build environment/platform the same as if
built under LINUX

1.  Obviously there are no make options for CYGWIN environment, so I changed
makebuildenv scripts the same as if the ENV was linux
2.  Need to define the following :
    #define PLATFORM_LINUX
  I dont know where to set this up globally, could someone please advise the
right way ?
3.  There were some 'missing' or extra files that needed to be included
along the way:
    #include <stdint.h>
    #include <stdlib.h>
    #include <netinet/in.h>
    #include <sys/socket.h>
    #include <sys/stat.h>

    But this might of been something to do with me not using the
'makebuildenv' properly ?  I dont know, I am no expert - I just figured out
they needed to be included
   somewhere for something to work ;)
  // This doesnt work :
  switch(::poll(&p, 1, (Timeout ==
  Complained about INFTIM unknown.

  So I did this (dont know what I am doing here ;) )
  switch(::poll(&p, 1, (Timeout == IOStream::TimeOutInfinite)))
  which allowed compile to continue

./lib/common/BoxTime.cpp :
BoxTime.cpp: In function `box_time_t GetCurrentBoxTime()':
BoxTime.cpp:66: error: call of overloaded `SecondsToBoxTime(u_int32_t)' is
BoxTime.h:66: error: candidates are: box_time_t SecondsToBoxTime(long
BoxTime.h:70: error:                 box_time_t SecondsToBoxTime(long long
   unsigned int)
make[1]: *** [../../debug/lib/common/BoxTime.o] Error 1
make[1]: Leaving directory `/boxbackup-0.05/lib/common'
make: *** [dep_modules] Error 2

changed SecondsToBoxTime to return(1) - dont know whats going on here ?
  which allowed compile to continue

After all of the above (hopefully thats all I did ;) , I got from :
$ make

[blah blah blah ]

$ cd ../../debug/bin/bbackupctl

$ ls
bbackupctl.exe  bbackupctl.o

$ bbackupctl.exe
Usage: bbackupctl [-q] [-c config_file] <command>
Commands are:
  sync -- start a syncronisation run now
  reload -- reload daemon configuration
  terminate -- terminate daemon now
  wait-for-sync -- wait until the next sync starts, then exit


Sooo.... I will try building everything else, and then I will have a play !
If people could offer advice where I can put these changes, and how to
generate diffs, I would be more than happy to provide :)


Paul Arch
Software Engineer

S.D.M. Group Pty. Ltd.

More information about the Boxbackup mailing list