There are two problems:
1.) Unsatisfied code symbol '__cxa_finalize' in load module
gcc-4.1.0 compiles __cxa_finalize into shared libs as weak symbol
(4611686018427425864| 4|FUNC |WEAK |0| .text|__cxa_finalize), gcc-4.1.1
doesn't (0| 0|FUNC |GLOB |0| UNDEF|__cxa_finalize). That's a problem
for Python because it loads modules at runtime.
To solve this problem John David Anglin suggested the following patch which
forces the linkage of __cxa_finalize into main:
Index: config/pa/pa64-hpux.h
===================================================================
--- config/pa/pa64-hpux.h (revision 115902)
+++ config/pa/pa64-hpux.h (working copy)
@@ -33,7 +33,8 @@
%{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
%nWarning: consider linking with `-static' as system libraries with\n\
%n profiling support are only provided in archive format}}}\
- %{mhp-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O} %{!shared:-u main}\
+ %{mhp-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O}\
+ %{!shared:-u main %{!nostdlib:%{!nodefaultlibs:-u __cxa_finalize}}}\
%{static:-a archive} %{shared:%{mhp-ld:-b}%{!mhp-ld:-shared}}"
#else
#define LINK_SPEC \
@@ -43,7 +44,8 @@
%{!shared:%{pg:-L/lib/pa20_64/libp -L/usr/lib/pa20_64/libp %{!static:\
%nWarning: consider linking with `-static' as system libraries with\n\
%n profiling support are only provided in archive format}}}\
- %{!mgnu-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O} %{!shared:-u
main}\
+ %{!mgnu-ld:+Accept TypeMismatch -z} -E %{mlinker-opt:-O}\
+ %{!shared:-u main %{!nostdlib:%{!nodefaultlibs:-u __cxa_finalize}}}\
%{static:-a archive} %{shared:%{mgnu-ld:-shared}%{!mgnu-ld:-b}}"
#endif
2.) python aborts on exit
__deregister_frame_info_bases aborts at the gcc_assert here:
__gthread_mutex_unlock (&object_mutex);
gcc_assert (ob);
I try to debug this a little bit further.
--
Summary: Unable to build Python
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: r dot emrich at de dot tecosim dot com
GCC build triplet: hppa64-hp-hpux11.00
GCC host triplet: hppa64-hp-hpux11.00
GCC target triplet: hppa64-hp-hpux11.00
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28821