[Box Backup] Building Box Backup as Universal Binaries [OS X]

Ben Summers boxbackup@fluffy.co.uk
Tue, 3 Oct 2006 12:43:29 +0100


You have endian issues. Build two separate arch specific binaries,  
then use lipo to make a universal binary. It will probably be  
necessary to build the binaries on the target architecture because of  
the configure tests.

Ben



On 3 Oct 2006, at 10:35, patrick machielse wrote:

> Hi,
>
> I'm trying to build the Box Backup tools (I'm only interested in  
> the client tools for now) as Universal Binaries for PPC and x86 on  
> Mac OS X. I've tried the most naive approach first:
>
> export CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch  
> i386 -arch ppc"
> export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk - 
> arch i386 -arch ppc"
>
> ./configure
> make
>
> This _seems_ to complete nicely and builds Universal Binaries.  
> (I've noticed that the ./configure script does some endian checks  
> but I'm not sure how/if this impacts building for x86. It could be  
> a problem because I'm configuring on a PPC machine and building for  
> x86).
>
> My first aim is to build a UB on my PPC machine and make sure that  
> at least the PPC part of the binary still works. Alas, this is not  
> the case...
>
> Running the univeral binary bbackupquery on PPC I can connect to  
> the Box Backup server, but when I try to 'list' the contents I get an:
>
> Exception: Connection TLSReadFailed (Probably a network issue  
> between client and server.) (7/34)
>
> and the application terminates.
>
> The log file reeds:
>
> Send Version(0x1)
> Receive Version(0x1)
> Send Login(0x10,0x1)
> Receive LoginConfirmed 
> (0x801ad32d4c1e0400,0x6616000000000000,0x280000000000,0x2c0000000000)
> Send ListDirectory(0x1,0xffffffff,0xc,true)
>
> Compare the log of the regular PPC binary bbackupquery session:
>
> Send Version(0x1)
> Receive Version(0x1)
> Send Login(0x10,0x1)
> Receive LoginConfirmed(0x41e4c2dd31a80,0x1666,0x280000,0x2c0000)
> Send ListDirectory(0x1,0xffffffff,0xc,true)
> Receive Success(0x1)
> Receiving stream, size 200
> Send Finished()
> Receive Finished()
>
> Maybe this points in the direction of a solution.
>
> Has anyone tried a different (== bettter) approach to building  
> universal binaries?
>
> TIA,
>
> Patrick
> _______________________________________________
> boxbackup mailing list
> boxbackup@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup