Bugs item #1465838, was opened at 2006-04-06 09:53 Message generated for change (Comment added) made by rwgk 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: Ralf W. Grosse-Kunstleve (rwgk) Date: 2006-04-10 16:58 Message: Logged In: YES user_id=71407 Boris Gubenko from HP provides this information: Hi Ralf, the -mt option sets -lpthread link option and defines various macros related to multithreading, including _REENTRANT macro. It must be specified when compiling/linking a multithreaded application. The -mt option is supported in latest aCC compilers, including the aCC V6 compiler (available on IA64 only). I'm not sure if -mt is supported in old aCC V3 compiler available on PA-RISC only, but since Python cannot be compiled with this compiler, this question is, probably, moot. If configuration script wants to be selective about the aCC compiler version, it can check __HP_aCC macro predefined by the compiler and apply '-mt' if __HP_aCC >= 60000. As for the gnu compiler, I think, that the equivalent of '-mt' would be '-pthreads' (for cxx on Tru64, it would be '-pthread'). I don't know how to reply to the post on Python forum you've referred me to. I guess, I'd need to register for an account. I can do it if you want me to. Or you can just post it on my behalf. Thanks, Boris ----- Original Message ----- From: "Ralf W. Grosse-Kunstleve" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, April 09, 2006 2:11 PM Subject: HP-UX Python configure Hi Boris, Could you please help out here? https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1465838&group_id=5470 Especially with this question: "Is this option for all versions?" Thank you in advance! Cheers, Ralf ---------------------------------------------------------------------- Comment By: Ralf W. Grosse-Kunstleve (rwgk) Date: 2006-04-10 12:44 Message: Logged In: YES user_id=71407 > Hm. We need to detect if we're on HP/UX, of course. Is > this option for all versions? I guess so since it seems very fundamental, but I am not sure. I alerted Boris Gubenko to this problem report. I hope he will help out. > And I assume it's only for the HP compiler, not gcc? I don't know. I imagine gcc has similar issues since it does link with the same -lpthread eventually. Note that the machine I used is publically accessible: http://www.testdrive.hp.com/ After you register on the web: telnet td176.testdrive.hp.com gcc 3.4.3 is installed. ---------------------------------------------------------------------- Comment By: Anthony Baxter (anthonybaxter) Date: 2006-04-09 08: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 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com