[Box Backup] Cross-compilation with i586-mingw32msvc under Ubuntu Hard

Chris Wilson boxbackup@boxbackup.org
Fri, 20 Mar 2009 00:55:47 +0000 (GMT)


Hi Achim,

On Tue, 17 Mar 2009, Achim wrote:

> * OpenSSL 0.9.8b works if you change e_os2.h and remove the modifier
> "static" marked below.
>     #ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
>     # define OPENSSL_IMPLEMENT_GLOBAL(type,name)			     \
>     	extern type _hide_##name;				     \
>     	type *_shadow_##name(void) { return &_hide_##name; }	     \
>     	static type _hide_##name
> ........^^^
> 
> This compiles the package successfully, otherwise recent GCC complain with
> an error

Thanks, I've updated the patch to make that change automatically.

> * PCRE configure works fine, but "make winshared" or "make winshared
> wininstall" fails with 
> /bin/bash: ./dftables.exe: cannot execute binary file
> make: *** [pcre_chartables.c] Error 126
> 
> so I compiled dftable myself (gcc dftables.c -o dftables), ran it with
> (./dftables pcre_chartables.c) and after that the make process completes
> and created the libraries

Added a note to the docs that with Wine installed, this should just work.

> this fails:
> (from
> https://www.boxbackup.org/svn/box/trunk/docs/api-docs/backup/win32_build_on_linux_using_mingw.txt)
> ./configure --target=i586-mingw32msvc CXXFLAGS="-mthreads
> -I/usr/local/i586-mingw32msvc/include" LDFLAGS=" -mthreads
> -L/usr/local/i586-mingw32msvc/lib" LIBS="-lcrypto -lws2_32 -lgdi32"
> 
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... i586-pc-mingw32msvc
> checking for g++... g++
> checking for C++ compiler default output file name... configure: error: C++
> compiler cannot create executables
> See `config.log' for more details.

With Wine installed, this should work. Please update and follow the 
updated instructions for locating mingwm10.dll and modifying your 
parcels.txt file to match, before running Configure. Having done that, Box 
Backup builds fine with the cross-compiler for me on Ubuntu Hardy.

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\ _/_/_/_//_/___/ | Stop nuclear war http://www.nuclearrisk.org |