[Box Backup] Working instructions to compile Box Backup 0.11rc2 under Cygwin
Achim
boxbackup@boxbackup.org
Tue, 24 Mar 2009 16:12:37 +0100
Hello list:
Please find below my complete step-by-step instructions to compile 0.11rc2
from source under Cygwin. Please note that the latest trunk (2463) does not
configure, because it complains
configure: creating ./config.status
.infig.status: error: cannot find input file: infrastructure/BoxPlatform.pm
Error: configure failed, aborting.
However, the 0.11rc2 tgz compiles just fine, and the binaries work!
====== HOWTO compile Box Backup 0.11rc2 under Cygwin ======
Start by installing Cygwin on your Windows machine from
<http://www.cygwin.org/cygwin/>.
Make sure to select the following packages during installation:
* Devel/automake
* Devel/autoconf
* Devel/gcc-mingw
* Devel/gcc-mingw-core
* Devel/gcc-mingw-g++
* Devel/make
* Devel/mingw-runtime
* Perl/Perl
* Mingw/mingw-zlib
If you already have Cygwin installed, please re-run the installer and
ensure that those packages are installed.
* * * OpenSSL * * *
cd /usr/src
wget http://www.openssl.org/source/openssl-0.9.7i.tar.gz
tar xzvf openssl-0.9.7i.tar.gz
cd openssl-0.9.7i
./Configure --prefix=/usr/i686-pc-mingw32/ mingw
make
make install
* * * PCRE * * *
cd /usr/src
wget http://prdownloads.sourceforge.net/pcre/pcre-6.3.tar.bz2?download
tar xjvf pcre-6.3.tar.bz2
cd pcre-6.3
export CFLAGS="-mno-cygwin"
./configure
make winshared
cp .libs/libpcre.a .libs/libpcreposix.a /lib/mingw
[original destination /usr/lib/mingw does not exist!]
cp pcreposix.h /usr/include/mingw
* * * Box Backup trunk R2463 * * *
Now unpack the Box Backup sources, enter the source directory,
and configure like this:
cd /usr/src
svn co https://www.boxbackup.org/svn/box/trunk/ trunk
cd trunk
dos2unix.exe infrastructure/mingw/configure.sh bootstrap config.sub
config.guess
the next steps results in an error
./infrastructure/mingw/configure.sh
[..]
configure: creating ./config.status
.infig.status: error: cannot find input file: infrastructure/BoxPlatform.pm
Error: configure failed, aborting.
even if we copy BoxPlatform.pm.in to BoxPlatform.pm (as per win32.bat), the
problem persists:
$ cp ./infrastructure/BoxPlatform.pm.in ./infrastructure/BoxPlatform.pm
$ ./infrastructure/mingw/configure.sh
[..]
configure: creating ./config.status
.infig.status: error: cannot find input file: infrastructure/BoxPlatform.pm
Error: configure failed, aborting.
* * * 0.11rc2 * * *
cd /usr/src
wget http://boxbackup.org/svn/box/packages/boxbackup-0.11rc2.tgz
tar xvzf boxbackup-0.11rc2.tgz
cd boxbackup-0.11rc2
./infrastructure/mingw/configure.sh
[..]
config.status: creating infrastructure/BoxPlatform.pm
config.status: creating bin/bbackupd/bbackupd-config
config.status: creating bin/bbackupquery/makedocumentation.pl
[..]
Regular expressions: yes
Large files: no
Berkeley DB: no
Readline: no
Extended attributes: no
make
test -d parcels/boxbackup-0.11rc2-backup-client-mingw32 || mkdir
parcels/boxback
up-0.11rc2-backup-client-mingw32
(cd bin/bbackupd; make RELEASE=1)
make[1]: Entering directory `/usr/src/boxbackup-0.11rc2/bin/bbackupd'
make[2]: Entering directory `/usr/src/boxbackup-0.11rc2/lib/win32'
[CXX] emu.cpp
[WINDRES] messages.rc
[AR] ../../release/lib/win32/win32.a
ar: creating ../../release/lib/win32/win32.a
[RANLIB] ../../release/lib/win32/win32.a
make[2]: Leaving directory `/usr/src/boxbackup-0.11rc2/lib/win32'
make[2]: Entering directory `/usr/src/boxbackup-0.11rc2/lib/common'
[CXX] BoxException.cpp
In file included from Box.h:57,
from BoxException.cpp:49:
BoxPlatform.h:217:4: #error No way to get file descriptor from DIR
structure
make[2]: *** [../../release/lib/common/BoxException.o] Error 1
make[2]: Leaving directory `/usr/src/boxbackup-0.11rc2/lib/common'
make[1]: *** [dep_modules] Error 2
make[1]: Leaving directory `/usr/src/boxbackup-0.11rc2/bin/bbackupd'
make: *** [parcels/boxbackup-0.11rc2-backup-client-mingw32.tgz] Error 2
[using BoxPlatform.h from trunk solves this and the compile continues
without problems, source
<http://www.boxbackup.org/trac/browser/box/trunk/lib/common/BoxPlatform.h>]
cp release/bin/bbstoreaccounts/bbstoreaccounts.exe
parcels/boxbackup-0.11rc2-bac
kup-server-mingw32
cp bin/bbstored/bbstored-certs
parcels/boxbackup-0.11rc2-backup-server-mingw32
cp bin/bbstored/bbstored-config
parcels/boxbackup-0.11rc2-backup-server-mingw32
cp lib/raidfile/raidfile-config
parcels/boxbackup-0.11rc2-backup-server-mingw32
(cd parcels; tar cf - boxbackup-0.11rc2-backup-server-mingw32 | gzip -9 - >
boxb
ackup-0.11rc2-backup-server-mingw32.tgz )
boxbackup-0.11rc2-backup-client-mingw32.tgz works perfectly
> bbackupquery.exe -v
NOTICE: Box Backup Query Tool v0.11rc2, (c) Ben Summers and contributors
2003-2008
Using configuration file D:\install\boxbackup\cli.rc2\bbackupd.conf
WARNING: No random device -- additional seeding of random number generator
not performed.
Connecting to store...
Handshake with store...
Login to store...
Login complete.