[muscle] Re: MuscleSupport.h on intel Mac

  • From: Justin Hammond <justin@xxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Sat, 6 Jan 2007 09:55:45 +0800

Hi Jeremy,

I updated my MuscleSupport.h file and still no luck with 64bit platforms, but made some further progress in debugging it:

The client is a C client, hence I'm using MiniMessage, and not the C class for this.

As its a C client, we are not compiling with the C++, hence the MuscleSwapBytes function isn't compiled (its surrounded by #ifdef __cplusplus), but as these targets are intel platforms, I'm assuming that we can use the MuscleX86Swap* functions instead.

So, I tried to update the #defines to catch if __X86_64__ was defined and set MUSCLE_USE_X86_INLINE_ASSEMBLY but this hasn't worked.

Anyway, I've tracked back the use of MuscleSwapBytes and its used in MakePrettyTypeCodeString which is only used for debugging, so I can get around this for my particular problem, but it would be good to solve this for 64Bit intels.

I'm not sure where to go from here though, so any adivse is appreciated. (you can see my changes to MuscleSupport.h at http:// svn.neostats.net/cgi-bin/viewvc.cgi/NeoStats/trunk/include/ MuscleSupport.h?view=log

In this case, the released code uses Muscle 3.01 for the clients, but the server is Muscle 3.21 I've since updated my development copy of the client to the latest Muscle, but the only changes were in MuscleSupport.h.



On 03 Jan 2007, at 6:44 AM, Jeremy Friesner wrote:

Hi Justin,

Like you, I don't have any 64-bit systems handy to test on, but from looking at the HISTORY.TXT file in the latest MUSCLE release (v3.24), I see the

v3.22 Released 7/5/2006
* Added Lior Okman and Rony Gutherz' patches to re-enable compilation
    on 64-bit systems, Solaris, MSVC, and Windows 2000.

v3.11 Released 3/1/2006
  * Merged in Lior Okman's AMD-64 compatibility patch.

So hopefully everything is 64-bit compatible... perhaps Lior or Rony could
describe their experiences with muscle in a 64-bit environment.

In any case, I recommend upgrading to the latest version if you can... just be sure to read the HISTORY.txt to see what the changes have been since your existing version, since some of them may require corresponding changes to
your program's source code.

What version of MUSCLE are you currently using, btw?


On Tuesday 02 January 2007 14:24, Justin Hammond wrote:
What about 64bit intel boxes? I got reports that it wont compile there:


Again, I'm using a older version here, so let me know if its fixed or



On 03 Jan 2007, at 5:58 AM, Jeremy Friesner wrote:
Hi Justin,

AFAIK Muscle has compiled correctly on Intel-based Macs since the
release, but I merged in your patch anyway since it makes the code
logical (now that __APPLE__ no longer implies PowerPC)


On Tuesday 02 January 2007 13:44, Justin Hammond wrote:
Not sure if this is in the latest code or not, but Muscle wont
compile in intel based mac's due to a macro. Below patch fixes this:

MuscleSupport.h 2006/01/26 15:30:22     3021
MuscleSupport.h 2007/01/01 14:30:31     3063
@@ -50,7 +50,8 @@

  /* If we are in an environment where known assembly is available,
make a note of that fact */
  #if defined(__GNUC__)
-# if (defined(__PPC__) || defined(__APPLE__))
+# if (defined(__PPC__))
  # elif defined(__i386__)

I also believe that this will have problems on 64bit X86 platforms as
well, but I don't have a box to test on, so no patch :(


Other related posts: