[Python-bugs-list] [Bug #129827] Mac OSX build of 2.1a needs "-traditional-cpp"

noreply@sourceforge.net noreply@sourceforge.net
Thu, 01 Feb 2001 11:44:21 -0800


Bug #129827, was updated on 2001-Jan-23 09:34
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Closed
Resolution: Wont Fix
Bug Group: Platform-specific
Priority: 5
Submitted by: sdm7g
Assigned to : fdrake
Summary: Mac OSX build of 2.1a needs "-traditional-cpp"

Details: build of 2.1a1 fails on Mac OSX:

compiling classobject.c generates a syntax error
cc needs "-traditional-cpp" flag 

(This probably should have been in before, but changes
 to classobject uncovered the bug. )

-- Steve

Follow-Ups:

Date: 2001-Feb-01 11:44
By: fdrake

Comment:
Since this appears to only be a issue with the Public Beta, I'm marking
this one "Won't Fix", but adding a note to the platform-specific notes
section of the README file, revision 1.111:

MaxOS X:  You need to add the "-traditional-cpp" option to the
        compiler command line for the MacOS X Public Beta.  This is
        appearantly a bug in the default pre-processor, and is
        expected not to be a problem with future versions.  Run
        configure with "OPT=-traditional-cpp ./configure" to add this
        option.

This can be revisited if the problem will not be fixed in the next (beta or
final) release of MacOS X, or if this problem surfaces under Darwin.
-------------------------------------------------------

Date: 2001-Jan-31 15:45
By: sdm7g

Comment:
Modifying Py_DECREF macro in Include/object.h
does not remove the error. -- Steve.
-------------------------------------------------------

Date: 2001-Jan-31 15:43
By: sdm7g

Comment:
Modifying Py_DECREF macro in Include/object.h
does not remove the error. -- Steve.
-------------------------------------------------------

Date: 2001-Jan-26 21:59
By: fdrake

Comment:
Try changing the first line of the expansion of the Py_DECREF macro to
this:

if (--_Py_RefTotal, (--((op)->ob_refcnt) != 0)) \

(note the additional sets of paretheses around the second half of the test
expression)

I'm not sure this will help, but if it does, that would be nice.
-------------------------------------------------------

Date: 2001-Jan-26 11:43
By: sdm7g

Comment:
Fred, FYI, the specific error message is:

cc -c -g -O2 -Wall -Wstrict-prototypes -fPIC -I. -I./Include
-DHAVE_CONFIG_H  -o Objects/classobject.o Objects/classobject.c
Objects/classobject.c:1415: illegal expression, found `->'
Objects/classobject.c:1415: illegal expression, found `)'
Objects/classobject.c:1415: illegal expression, found `)'
make: *** [Objects/classobject.o] Error 1
  

FYI**2, gcc on macosx supports precompiling headers files and the docs
state:

-traditional-cpp 

Controls which preprocessor is used. The default is cpp_precomp ; if you
specify this flag, the standard GNU cpp will be used instead.

I think it's a bug in the precompiler cpp that
produces the errors.

Since Dan and his pals at apple are the only ones
to have Post public beta builds, and if they change the default, it won't
matter if it's  in
there explicitly (I don't know what the default
for public dist. Darwin is) it won't hurt to 
add it. (But if it's a pain, then after Mar 24,
non-apple folks will be able to get the version
on which it doesn't matter! ) 

-------------------------------------------------------

Date: 2001-Jan-26 09:58
By: fdrake

Comment:
It might be nice to know more about the specific error generated; what in
classobject.c is causing a problem?
-------------------------------------------------------

Date: 2001-Jan-23 22:05
By: dkwolfe

Comment:
Note:  This is only true for Public Beta.  Post public beta builds do not
need this flag. (the bug in the pre-processor has been fixed.)
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=129827&group_id=5470