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

Chris Wilson boxbackup@boxbackup.org
Wed, 18 Mar 2009 22:35:48 +0000 (GMT)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-1008542746-1237415749=:5225
Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8BIT

Hi Achim,

I did successfully build a MinGW cross-compiler from source on CentOS 5, 
so I will check the instructions.

On Wed, 18 Mar 2009, Achim wrote:

>>> * OpenSSL 0.9.8b works if you change e_os2.h and remove the modifier
>>> "static" marked below.
...
>>> This compiles the package successfully, otherwise recent GCC complain
>>> with an error
>>
>> What error?
>
> make CC=i586-mingw32msvc-gcc RANLIB=i586-mingw32msvc-ranlib
> NM=i586-mingw32msvc-nm
> [..]
> set_key.c:72: error: static declaration of _hide_DES_check_key follows
> non-static declaration
> set_key.c:72: error: previous declaration of _hide_DES_check_key was here

Looks like a bug in old openssl/recent gcc compatibility.

Why did you choose to build openssl shared? In my view this adds an extra 
dependency DLL for no good reason in this case.

I decided to try to follow your 0.9.8j instructions, as 0.9.8b is out of 
date, but I could not get the patch that you recommended to apply cleanly 
to it (2 hunks failed).

>>> [Box Backup]
>>> ./configure --target=i586-mingw32msvc
>>>
>>> but compilation fails (also exporting all the variables above such as
>>> CXXFLAGS etc):
>>>
>>> make WINDRES="i586-mingw32msvc-windres"
>>>
>>> [CXX]     BackupClientDirectoryRecord.cpp
>>> BackupClientDirectoryRecord.cpp: In member function âvoid
>>>
> BackupClientDirectoryRecord::SyncDirectory(BackupClientDirectoryRecord::SyncParams&,
>>> int64_t, const std::string&, bool)â:
>>> BackupClientDirectoryRecord.cpp:231: error: âDIRâ was not declared in
>>> this scope
>>
>> Unfortunately there is no packaged mingw32 cross-compiler for the
> platform
>> I'm working on at the moment, CentOS 5. I'm working on building one now.
>> If it works, I'll give cross-compliation another try with it.
>
> I started to look into cross-compiling in the first place because it was
> impossible for me to set up a sane build environment under Windows XP.

Why? I did it with cygwin. That's how I've always build Box Backup for 
Windows distributions, except for my own experimentation with 
cross-compiling.

> Would somebody on the list perhaps be willing to upload their complete 
> build directory (with all dependencies and tool such as GCC, MinGW, 
> OpenSSL, wxWidgets, ...) that they use for Boxi and/or Box backup 
> compilation from SVN?

I will if I get it working, but please note that as far as I know, nobody, 
including me, has ever successfully build Boxi in a cross-compiler.

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
--8323328-1008542746-1237415749=:5225--