[ python-Bugs-1465838 ] HP-UX11i: illegal combination of compilation and link flags

SourceForge.net noreply at sourceforge.net
Sun Apr 9 17:30:48 CEST 2006


Bugs item #1465838, was opened at 2006-04-07 02:53
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1465838&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: Installation
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Ralf W. Grosse-Kunstleve (rwgk)
Assigned to: Nobody/Anonymous (nobody)
Summary: HP-UX11i: illegal combination of compilation and link flags

Initial Comment:
According to Boris Gubenko from the HP-UX compiler
development team, it is illegal to link with -lpthread
if the sources are not compiled with -mt. However, this
is exactly what happens during Python installation, e.g.:

        cc -Ae -c  -DNDEBUG -O  -I. -I./Include  
-DPy_BUILD_CORE -o Python/compile.o Python/compile.c
...
         aCC  -Wl,-E -Wl,+s -o python \
                        Modules/python.o \
                        libpython2.5.a -lnsl -lrt -ldld
-ldl  -lpthread   -lm  

This illegal combination of compilation and link flags
eventually results in obscure runtime failures
(segfault, abort) while running Boost.Python C++
extensions. These failures go away if Python is
installed with, e.g.:

env CXX="aCC -mt" BASECFLAGS="-mt" ./configure
--without-gcc

I suggest changing the configure/make files to always
include "-mt" if threading is enabled.

BTW: The same issue already exists for Python 2.4.

Cheers,
        Ralf


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

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2006-04-10 01:30

Message:
Logged In: YES 
user_id=29957

Hm. We need to detect if we're on HP/UX, of course. Is this
option for all versions? And I assume it's only for the HP
compiler, not gcc?


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

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


More information about the Python-bugs-list mailing list