#260 MacOSX build error with Expat 1.95.6 (included with PyXML)

Platform Specific
closed-fixed
None
7
2003-09-28
2003-07-03
DK
No

I had trouble with the expat 1.95.6 that is included
with PyXML
0.8.2 on MacOSX 10.2.6. The build of PyXML gave error
messages
(but didn't halt) when compiling xmltok.c. It appears to be
problems with the macros FASTCALL, PTRCALL and PTRFASTCALL
in internal.h. Defining these to nothing made the
compile succeed.
Here is the diff output:

*** PyXML-0.8.2/extensions/expat/lib/internal.h~
Sat Jan 25 12:18:09 2003
--- PyXML-0.8.2/extensions/expat/lib/internal.h Thu Jul
3 11:12:36 2003
***************
*** 27,33 ****
--- 27,36 ----
and let's try this:
*/
+ /* It doesn't work on MacOSX (__MACH__ and __APPLE__
== MacOSX). */
+ #if !(defined(__MACH__) && defined(__APPLE__))
#define FASTCALL __attribute__((regparm(3)))
#define PTRCALL
#define PTRFASTCALL __attribute__((regparm(3)))
+ #endif /* Not MacOSX */

#elif defined(WIN32)

Discussion

  • DK

    DK - 2003-07-03

    Logged In: YES
    user_id=20933

    I should have mentioned that I am using Fink and Fink's Python
    distribution. Using /usr/bin/python instead only gives warnings,
    but then, there are problems with LDFLAGS containing "-arch
    i386" in
    /usr/lib/python2.2/config/Makefile. If that string is
    removed from
    LDFLAGS, everything seems to go well.

     
  • Fred L. Drake, Jr.

    • labels: 105164 -->
    • priority: 5 --> 7
    • assigned_to: gstein --> fdrake
     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    Bumping priority; this must be fixed for 1.95.7. I've held
    back mostly since I now have reasonable access to a Mac OS X
    box, but haven't had time to really do much with it (like
    testing Expat!).

     
  • Jerry Talkington

    Logged In: YES
    user_id=715462

    FWIW, this was fixed with the checkin for bug 692878.
    However, the fix for that bug is incorrect, as it checks for
    __GNUC__ and __linux__. regparm is an i386 only feature, so
    that will still generate a warning on Linux PPC. The
    correct fix is to check for __GNUC__ and __i386__. I
    confirmed this on Linux and FreeBSD 4 (which is left out of
    the current fix.)

     
  • Greg Stein

    Greg Stein - 2003-09-28
    • status: open --> closed-fixed
     
  • Greg Stein

    Greg Stein - 2003-09-28

    Logged In: YES
    user_id=6501

    I've applied jtalkington's suggested change. Thanks!

     

Log in to post a comment.