[muscle] Re: MuscleSupport.h on intel Mac

  • From: Jeremy Friesner <jaf@xxxxxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Fri, 5 Jan 2007 20:47:20 -0800

Hi Justin,

Ah, I see the problem.  Try the (experimental) MUSCLE archive at the link 
below and see if it works better for you.... I've replaced the calls to 
muscleSwapBytes() with inline C code instead.  If it works out, I'll keep the 
change in the next muscle release (v3.25).

http://www.lcscanada.com/muscle/muscle3.25b.zip

-Jeremy

On Friday 05 January 2007 17:55, Justin Hammond wrote:
> 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.
>
> Thanks
>
> Justin
>
> 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
> > following:
> >
> > [...]
> > 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?
> >
> > -Jeremy
> >
> > On Tuesday 02 January 2007 14:24, Justin Hammond wrote:
> >> Hi,
> >> Ok.
> >> What about 64bit intel boxes? I got reports that it wont compile
> >> there:
> >>
> >> http://www.neostats.net/boards/viewtopic.php?t=2352
> >>
> >> Again, I'm using a older version here, so let me know if its fixed or
> >> not?
> >>
> >> Thanks
> >>
> >> Justin
> >>
> >> On 03 Jan 2007, at 5:58 AM, Jeremy Friesner wrote:
> >>> Hi Justin,
> >>>
> >>> AFAIK Muscle has compiled correctly on Intel-based Macs since the
> >>> v3.10
> >>> release, but I merged in your patch anyway since it makes the code
> >>> more
> >>> logical (now that __APPLE__ no longer implies PowerPC)
> >>>
> >>> Thanks,
> >>> Jeremy
> >>>
> >>> On Tuesday 02 January 2007 13:44, Justin Hammond wrote:
> >>>> Hi,
> >>>> 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__))
> >>>>   #  define MUSCLE_USE_POWERPC_INLINE_ASSEMBLY 1
> >>>>   # elif defined(__i386__)
> >>>>   #  define MUSCLE_USE_X86_INLINE_ASSEMBLY 1
> >>>>
> >>>> 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 :(
> >>>>
> >>>> Justin

Other related posts: