[Box Backup] boxi for windows

Achim boxbackup@boxbackup.org
Sat, 01 Aug 2009 03:21:39 +0200


Hello Edo:

On 30/07/2009 11:05, scartomail wrote:
> http://prdownloads.sourceforge.net/boxi/boxi-0.1.0.tar.gz

As promised, I  enclose below very detailed instructions on how to 
compile Boxi from source. A binary for R645 compiled in this fashio is 
available from one of our project websites [1].

Compiling current trunk fails because current trunk of Box Backup fails 
(see details below).

It would be great if we could give Boxi a big push this summer!

Achim

[1] http://www.cuba-project.org/downloads/boxi_r645.rar

* * * Cygwin * * *
Install Cygwin with these packages
* Devel/autoconf
* Devel/automake
* Devel/cvs
* Devel/gcc-mingw
* Devel/gcc-mingw-core
* Devel/gcc-mingw-g++
* Devel/gettext-devel
* Devel/libtool
* Devel/make
* Devel/mingw-runtime
* Devel/patchutils
* Devel/pkg-config
* Devel/subversion
* Lib/libxml2
* Lib/libxslt
* Mingw/mingw-zlib
* Perl/Perl
* Web/wget


* * * 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
cp .libs/libpcre.a .libs/libpcreposix.a /lib/mingw

cp pcreposix.h /usr/include/mingw


Cygwin package introduces GPL requirement because of cygwin1.dll
dependency, see discussion with Chris on mailing list


* * * Zlib * * *
see boxbackup document

BUGBUG use mingw-zlib eliminates need to self-compile?

Cygwin package introduces GPL requirement because of cygwin1.dll
dependency, see discussion with Chris on mailing list


* * * OpenSSL * * *
see boxbackup document

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

Cygwin package introduces GPL requirement because of cygwin1.dll
dependency, see discussion with Chris on mailing list


* * * CPPUnit * * *

cd /usr/src
wget 
http://downloads.sourceforge.net/project/cppunit/cppunit/1.12.1/cppunit-1.12.1.tar.gz?use_mirror=puzzle
tar xvzf cppunit-1.12.1.tar.gz
cd cppunit-1.12.1
./configure CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin"

make && make install

checking for cppunit-config... /usr/local/bin/cppunit-config

Cygwin package introduces GPL requirement because of cygwin1.dll
dependency, see discussion with Chris on mailing list


* * * wxWidgets 2.8.10 * * *
cd /usr/src
wget 
http://downloads.sourceforge.net/project/wxwindows/wxAll/2.8.10/wxWidgets-2.8.10.tar.gz?use_mirror=puzzle
tar xvzf wxWidgets-2.8.10.tar.gz
cd wxWidgets-2.8.10.tar.gz

change setup.h.in to have

#define wxUSE_STACKWALKER   1
#define wxUSE_FSVOLUME      1

export CFLAGS="-mno-cygwin -O4" CXXFLAGS="-mno-cygwin -O4" 
CPPFLAGS="-mno-cygwin" LDFLAGS="-mno-cygwin -mwindows"

./configure --enable-unicode --with-msw --disable-precomp-headers 
--without-expat --disable-shared --enable-debug --enable-debug_gdb

make && make install


BUGBUG from the readme for 2.6.3:

	./configure --enable-unicode --enable-debug --enable-shared \
		--disable-static --enable-debug_gdb --with-msw \
		--without-expat --target=i686-pc-mingw32 \
		CC="gcc -mno-cygwin -mthreads" \
		CXX="g++ -mno-cygwin -mthreads"
	make
	make install


* * * Boxi & Box Backup * * *

svn co https://svn.sourceforge.net/svnroot/boxi/trunk/boxi boxi.648

Checked out external at revision 2547.

Checked out revision 648.

cd boxi
./configure-mingw.sh
./make-image-headers.pl
make

Fails on R648 because automake/autoconf does not generate Makefile.in

R645 does work and creates Makefile.in

svn co -r 645 https://svn.sourceforge.net/svnroot/boxi/trunk/boxi  boxi.645


The only difference in the two files:

$ diff Makefile.am ../boxi.645/Makefile.am
6c6
< SUBDIRS = boxbackup wxchart include src  wxchart
---
 > SUBDIRS = boxbackup include src

Removing the last "wxchart" makes no difference, removing both results 
in a working


Apart from that, even R645 fails due to a problem in Box Backup R2547:

   [CXX]     BackupStoreRefCountDatabase.cpp
BackupStoreRefCountDatabase.cpp: In static member function `static void 
BackupStoreRefCountDatabase::Create(const 
BackupStoreAccountDatabase::Entry&, bool)':
BackupStoreRefCountDatabase.cpp:91: error: `FileExists' undeclared 
(first use this function)
BackupStoreRefCountDatabase.cpp:91: error: (Each undeclared identifier 
is reported only once for each function it appears in.)
make[4]: *** 
[../../release/lib/backupstore/BackupStoreRefCountDatabase.o] Error 1
make[4]: Leaving directory `/usr/src/boxi.645/boxbackup/lib/backupstore'
make[3]: *** [dep_modules] Error 2
make[3]: Leaving directory `/usr/src/boxi.645/boxbackup/bin/bbstored'
make[2]: *** [release/bin/bbstored/bbstored.exe] Error 2
make[2]: Leaving directory `/usr/src/boxi.645/boxbackup'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/boxi.645'
make: *** [all] Error 2






When using the Cygwin CPPUnit (which we should not!)
need to link ln -s /usr/include/cppunit/ /usr/include/mingw/cppunit
otherwise cppunit from cygwin is not found
alternative: add /usr/include to the default includes (see one of Chris' 
postings)!

what about static building to avoid dependencies on:
cygcppunit-1-12-0.dll (even when compiled with /usr/local cppunit!)