[Box Backup] Cygwin build

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


Hi,

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
    #define PLATFORM_BERKLEY_DB_NOT_SUPPORTED
    #define PLATFORM_KQUEUE_NOT_SUPPORTED
  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 ;)
4.
  // This doesnt work :
  switch(::poll(&p, 1, (Timeout ==
IOStream::TimeOutInfinite)?INFTIM: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

5.
./lib/common/BoxTime.cpp :
BoxTime.cpp: In function `box_time_t GetCurrentBoxTime()':
BoxTime.cpp:66: error: call of overloaded `SecondsToBoxTime(u_int32_t)' is
   ambiguous
BoxTime.h:66: error: candidates are: box_time_t SecondsToBoxTime(long
unsigned
   int)
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 :
/boxbackup-0.05/debug/bin/bbackupctl
$ make

[blah blah blah ]

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

/boxbackup-0.05/debug/bin/bbackupctl
$ ls
bbackupctl.exe  bbackupctl.o

/boxbackup-0.05/debug/bin/bbackupctl
$ 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

/boxbackup-0.05/debug/bin/bbackupctl
$

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 :)

cheers

Paul Arch
Software Engineer

S.D.M. Group Pty. Ltd.
http://www.sdmgroup.com.au






More information about the Boxbackup mailing list