[ python-Bugs-1205568 ] Compile fails on Darwin8 with --with-cxx=g++

SourceForge.net noreply at sourceforge.net
Fri Jun 3 13:56:36 CEST 2005


Bugs item #1205568, was opened at 2005-05-20 07:05
Message generated for change (Comment added) made by rzigweid
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1205568&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Robert M. Zigweid (rzigweid)
Assigned to: Nobody/Anonymous (nobody)
Summary: Compile fails on Darwin8 with --with-cxx=g++

Initial Comment:
As has been previously reported and fixed in some portions of the build 
process, building on Darwin 8 with gcc-4.0 requires some extra libraries to 
be passed. 

When --with-cxx=g++ is specified to configure, and possibly for other flags 
that make the build process be conscious of C++.  


Tail of error:
gcc  -u _PyMac_Error -o python.exe                 Modules/ccpython.o                 libpython2.4.a -ldl      
/usr/bin/ld: Undefined symbols:
___gxx_personality_v0
collect2: ld returned 1 exit status
make: *** [python.exe] Error 1


Fix:
Add -lSystem and -lSystemStubs for Darwin 8 to the linker where 
appropriate.  I haven't identified all these spots though.

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

>Comment By: Robert M. Zigweid (rzigweid)
Date: 2005-06-03 07:56

Message:
Logged In: YES 
user_id=554287

Firstly, exposing this bug, I discovred, also requires passing --with-
pydebug=true.  It's fine if you don't compile with pydebug.  I'm sorry I did not 
mention/realize that initially.

Secondly in response to loewis comment.  It looks like linking with g++ instead 
of gcc as you eluded to takes care of the problem.

Ilyria% gcc  -u _PyMac_Error -o python.exe >                 Modules/ccpython.o >                 libpython2.4.a -ldl    
/usr/bin/ld: Undefined symbols:
___gxx_personality_v0
collect2: ld returned 1 exit status
Ilyria ~/src/Python-2.4.1                                      05-06-03  7:53AM
[gcc  -u _PyMac_Error -o python.exe \n                Modules/ccpython.o \n                
libpython2.4.a -ldl    ]
Ilyria% g++  -u _PyMac_Error -o python.exe                 Modules/ccpython.o                 libpython2.4.a -ldl
Ilyria ~/src/Python-2.4.1                        

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

Comment By: Martin v. Löwis (loewis)
Date: 2005-05-20 17:13

Message:
Logged In: YES 
user_id=21627

Can you check whether just linking with g++ (instead of
linking with gcc, and still not adding -lSystem) also solves
the problem?

configure is supposed to detect that g++ is needed for
linking; if linking with g++ solves the problem, then
configure.in must be enhanced to properly auto-detect this case.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1205568&group_id=5470


More information about the Python-bugs-list mailing list