QUOTE(ashikase @ Feb 20 2005, 02:42 PM)
Sorry for taking so long to reply; I had to wait a couple of days for a compile of the latest KDE for OS X to finish after having realized that the version I already had installed was a bit old.
So far, I've gotten both zync and the korg plugin to work under OS X... up to a certain point.
Getting zync to compile on OS X is pretty easy. In the makefiles for the 3 libraries, change the *_OUT_FILENAME extension from ".so" to ".dylib" (ex. "libzmsg.dylib"), and change the SONAME_FLAG to "-dynamic_lib -install_name " (note the final space, it is necessary). That's it.
The 'install' target doesn't work from the archive's root directory; I had to run 'make install' from within the "src" directory. Also, /usr/local/lib didn't exist on my machine, so I had to create the directory and add it to my LIBRARY_PATH (added an export to my .bash_profile).
As for the korg todo plugin, I set the *_OUT_FILENAME extension to ".dylib" (the extension in this case probably doesn't matter, as the filename can be set in the zync configuration file; in fact, bundles in OS X probably use a different extension altogether), set SONAME_FLAG to "-bundle", and removed the "$(*_OUT_FILENAME).0" from the target (-install_name can only be used with -dynamiclib; OS X differentiates between dynamically loaded libraries and bundles/plugins). I also found that I had to add a direct link to my qt library ("/sw/lib/libqt-mt.3.dylib") to the list of libraries, as the compiler complained of an illegal indirect reference to it.
Interesting, I am not sure that you want the bundles/plugins build, it should really be a dynamic library. Zync at least treats it as if it is a dynamic linked library.
QUOTE(ashikase @ Feb 20 2005, 02:42 PM)
Again, the install target had to be run from within the "src" directory.
When I first tried using the program, I found that the sync would start on the Zaurus and then immediately claim that it was interrupted. It turned out to be a problem with byte ordering of the body size and checksum. While your "GetHostByteOrder" function correctly detects that OS X is big-endian, the ntohs function does *not* swap the bytes. According to the ntohs man pages, at least under OS X, the ntohs function (and similar functions) are defined as null macros for big-endian systems, as both the host and network ordering scheme is big-endian. I got around this by manually swapping the bytes (making use of your union type from the GetHostByteOrder function).
Yeah, I have not fully implemented the conversion in some places, so it may assume that things are in little endian. Very, interesting, I didn't know that they were implemented as NULL macros. As soon as I get a Mac OS X system I will solve all these byte order problems.
QUOTE(ashikase @ Feb 20 2005, 02:42 PM)
So far I can run 'zync -t', and it will connect with the zaurus and start processing. However, at one point it complains that the number of bytes is less than 20, and that the message received (7 bytes) was an Abort message. Below is an excerpt of the output:
CODE
num New Sync IDs: 512.
num Mod Sync IDs: 11371.
num Del Sync IDs: 60160.
OBTAINED SYNC ID LIST.
GETTING DATA FOR 1684353838
RECVING ADR MESSAGE.
libzmsg: RecvMessage(): -----Message Beginning-----
libzmsg: RecvMessage(): Read in 7 bytes of data.
libzmsg: RecvMessage(): ERROR: The number of bytes read in is less than 20.
libzmsg: RecvMessage(): ERROR (Cont): Received data was an Abrt Message.
GOT DATA FOR 1684353838
GETTING DATA FOR 1885616747
At this point, it just hangs. I would research further, but it's late. Any ideas on what might be wrong or where to look?
Interesting. First off the num New Sync IDs: 512 is claiming that it found that you had 512 items in your To-Do list on your Zaurus. I am assuming that this is wrong. Second, if you have never synced your Zaurus before it should be doing a Full Sync, meaning that Mod Sync IDs and Del Sync IDs should both be 0.
Hmmm, it is really hard to tell exactly what happened without a packet capture of the traffic that went over the USB network device. You can obtain such a packet capture by using tcpdump or ethereal while attempting to perform a sync. I will be able to give you a much better idea of what is going on as soon as I see the packet capture.
I really, wish I had a Mac OS X box, then I could test this myself and see what was going on. Anyways, post the packet capture as soon as possible and we will figure out what is going on.
QUOTE(ashikase @ Feb 20 2005, 02:42 PM)
Sorry for such a long explanation; I hope you were able to follow it.
As a side note... the above was tested with a fresh C760 Sharp ROM; for some reason, it seems that sync is not working on Cacko Lite 1.22a (I don't know about other Cacko ROMS). It doesn't even work with Sharp's default Zaurus sync software for Windows. Do you (or anyone out there) know anything about this?
Well, you do have to make sure you have the latest version of the Windows software released by Sharp. There are two different DTM supporting versions. I got it off the
http://www.myzaurus.com site in their downloads section, you should also be able to get it off of the
http://www.zaurususergroup.org site.