[Box Backup] Compiling Box Backup under Cygwin

Achim boxbackup@boxbackup.org
Fri, 20 Mar 2009 17:44:11 +0100


--=_269a0682bacfdcc322221e51ea699301
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="UTF-8"

Good afternoon:

Please find below my experiences when using the compilation instructions
available at [0, 1] to compile a native Box Backup .exe under Cygwin. I
tried to follow the letter (and where required the spirit) of the
instructions, but I still do not seem to be able to compile Box Backup. 

All dependencies build fine, but the error I receive in Box is in fact the
same one I mentioned earlier in the cross compilation thread:


test -d parcels/boxbackup-0.11rc2-backup-client-mingw32 || mkdir
parcels/boxbackup-0.11rc2-backup-client-mingw32
(cd bin/bbackupd; make RELEASE=1)
make[1]: Entering directory
`/cygdrive/d/install/ajl/src/boxbackup-0.11rc2/bin/bbackupd'
make[2]: Entering directory
`/cygdrive/d/install/ajl/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
`/cygdrive/d/install/ajl/src/boxbackup-0.11rc2/lib/win32'
make[2]: Entering directory
`/cygdrive/d/install/ajl/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
`/cygdrive/d/install/ajl/src/boxbackup-0.11rc2/lib/common'
make[1]: *** [dep_modules] Error 2
make[1]: Leaving directory
`/cygdrive/d/install/ajl/src/boxbackup-0.11rc2/bin/bbackupd'
make: *** [parcels/boxbackup-0.11rc2-backup-client-mingw32.tgz] Error 2


Best regards, Achim

[0]
<https://www.boxbackup.org/svn/box/trunk/docs/api-docs/backup/win32_build_on_cygwin_using_mingw.txt>
[1] <http://www.boxbackup.org/trac/wiki/CompileWithMinGW>

----- snip ----
* * * Cygwin * * *
The project page and download have relocated to
<http://www.cygwin.org/cygwin/> and
<http://www.cygwin.org/cygwin/setup.exe> respectively.

In addition, the following packages seem to be missing from the
requirements list:
Perl/Perl
Devel/automake
Devel/autoconf
Devel/make
(perhaps also Devel/zlib-devel?)


* * * OpenSSL * * *
Your instructions works fine for 0.9.7i and also for the latest OpenSSL
0.9.8j that was released on Jan 7th, 2009. 
<http://openssl.org/source/openssl-0.9.8j.tar.gz>

cd openssl-0.9.8j
./Configure --prefix=/usr/i686-pc-mingw32/ mingw
make
make install



* * * PCRE * * *
Your instructions works fine, with the caveat that PCRE is at version 7.8
at the moment, as opposed to 6.3

Using your instructions, 7.8 builds also just fine. The only difference is
that make does not know the target winshared any longer (in case we need
that), but "make" standalone also just works. In addition, there is this
(if needed):


# A PCRE user submitted the following addition, saying that it "will allow
# anyone using the 'mingw32' compiler to simply type 'make pcre.dll' and
get a
# nice DLL for Windows use". (It is used by the pcre.dll target.)



* * * Box Backup * * *
Subversion client 1.5.6 is available now

got svn snapshot 2458 via

svn co http://www.boxbackup.org/svn/box/chris/general/ boxbackup

then inside boxbackp:
$ ./infrastructure/mingw/configure.sh
./bootstrap: line 2: $'\r': command not found
': No such file or directorytory `infrastructure/m4
./bootstrap: line 4: $'autoheader\r': command not found
./bootstrap: line 5: $'autoconf\r': command not found
Error: bootstrap failed, aborting.

so basically, we have a problem of linebreaks here

$ dos2unix.exe infrastructure/mingw/configure.sh bootstrap config.sub
config.guess


after which (leaving out several ACL errors, attached as reference) zlib.h
is not found
$ ./infrastructure/mingw/configure.sh
[..]
checking for zlib.h... no
configure: error: cannot find zlib.h
Error: configure failed, aborting.


however configure works
./configure

checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for zlibVersion in -lz... yes

but fails with OpenSSL

checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
checking for SSL_read in -lssl... no
configure: error: OpenSSL is not installed but is required



Then I tried the same with 0.11rc2 from
<https://www.boxbackup.org/svn/box/packages/boxbackup-0.11rc2.tgz>
$ ./infrastructure/mingw/configure.sh

runs fine this time and configures everything. The following "make" however
results in the same error that already stopped me during the
cross-compilation effort:



test -d parcels/boxbackup-0.11rc2-backup-client-mingw32 || mkdir
parcels/boxbackup-0.11rc2-backup-client-mingw32
(cd bin/bbackupd; make RELEASE=1)
make[1]: Entering directory
`/cygdrive/d/install/ajl/src/boxbackup-0.11rc2/bin/bbackupd'
make[2]: Entering directory
`/cygdrive/d/install/ajl/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
`/cygdrive/d/install/ajl/src/boxbackup-0.11rc2/lib/win32'
make[2]: Entering directory
`/cygdrive/d/install/ajl/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
`/cygdrive/d/install/ajl/src/boxbackup-0.11rc2/lib/common'
make[1]: *** [dep_modules] Error 2
make[1]: Leaving directory
`/cygdrive/d/install/ajl/src/boxbackup-0.11rc2/bin/bbackupd'
make: *** [parcels/boxbackup-0.11rc2-backup-client-mingw32.tgz] Error 2
--=_269a0682bacfdcc322221e51ea699301
Content-Transfer-Encoding: base64
Content-Type: application/x-zip; charset="UTF-8";
 name="acl_errors.zip"; 
Content-Disposition: attachment;
 filename="acl_errors.zip"; 

UEsDBBQAAAAIAGOGdDouwaxktgIAAPUeAAAOAAAAYWNsX2Vycm9ycy50eHTtlsFv2jAUxu+V+j/4
sMMmlUQEGgq3LKRdNRoqaNf19GQcE6wmdmQnUP77mXSs6SgBCbj5gJRExt/7vvfi/L4gy2Z8KrHK
ZUHyQlI7ZTxe2ETwKYv1vaVm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