Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HP-UX: Can't shl_load() a library containing Thread Local #42690

Closed
bladedoyle mannequin opened this issue Dec 14, 2005 · 5 comments
Closed

HP-UX: Can't shl_load() a library containing Thread Local #42690

bladedoyle mannequin opened this issue Dec 14, 2005 · 5 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@bladedoyle
Copy link
Mannequin

bladedoyle mannequin commented Dec 14, 2005

BPO 1379984
Nosy @loewis, @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2013-03-28.09:57:41.220>
created_at = <Date 2005-12-14.00:20:37.000>
labels = ['interpreter-core', 'type-bug']
title = "HP-UX: Can't shl_load() a library containing Thread Local"
updated_at = <Date 2013-03-28.09:57:41.219>
user = 'https://bugs.python.org/bladedoyle'

bugs.python.org fields:

activity = <Date 2013-03-28.09:57:41.219>
actor = 'georg.brandl'
assignee = 'none'
closed = True
closed_date = <Date 2013-03-28.09:57:41.220>
closer = 'georg.brandl'
components = ['Interpreter Core']
creation = <Date 2005-12-14.00:20:37.000>
creator = 'blade_doyle'
dependencies = []
files = []
hgrepos = []
issue_num = 1379984
keywords = []
message_count = 5.0
messages = ['60849', '60850', '60851', '114611', '185411']
nosy_count = 3.0
nosy_names = ['loewis', 'georg.brandl', 'blade_doyle']
pr_nums = []
priority = 'low'
resolution = 'out of date'
stage = 'test needed'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue1379984'
versions = ['Python 2.6']

@bladedoyle
Copy link
Mannequin Author

bladedoyle mannequin commented Dec 14, 2005

HP-UX runtime loader does not support dynamic load of
shared libraries that contain (TLS) thread local
storage. As a result, when attempting to import
modules that contain TLS the following error is reported:

"/usr/lib/dld.sl: Can't shl_load() a library containing
Thread Local Storage"

This problem was discussed previously on the python.org
mail list:

http://mail.python.org/pipermail/python-list/2003-May/164024.html

There is another option: Use LD_PRELOAD environment
variable to cuase the runtime loader to 'pre-load' the
pthreads library (and dependancies of the pthread
library). See the dld.sl(5) man page for more info on
LD_PRELOAD.

But, I think a 5th option is ideal. If libpthread.sl
(and the dependancies of libpthread) are linked into
the python executable at build time then all of these
problems are avoided. I suggest that the HP-UX
(includes hp-ux on ia64) build process be modified so
that libpthead (and depends) are linked in. Or, at
least, make a note of this problem/solution in the
HP-UX section of the README file distributed with
python source.

Here is the process I use to work around the TLS problem:

HP-UX:
bash$ BASECFLAGS="-DTHREAD_STACK_SIZE=0x50000"; export
BASECFLAGS
bash$ ./configure --without-gcc --enable-shared
--with-libs='-lpthread -lstd_v2 -lCsup_v2 -lcl'
bash$ **Edit the Makefile and remove -O from the OPT line.
bash$ make
bash$ make test
bash$ make install

HP-UX on ia64:
bash$ CC=cc; export CC
bash$ CXX=aCC; export CXX
bash$ BASECFLAGS="+DD64 -DTHREAD_STACK_SIZE=0x50000";
export BASECFLAGS
bash$ LDFLAGS="+DD64"; export LDFLAGS
bash$ ./configure --without-gcc --enable-shared
--with-libs="-lpthread -lCsup -lstd_v2 -lunwind"
bash$ unset CC
bash$ unset CXX
bash$ unset BASECFLAGS
bash$ unset LDFLAGS
bash$ **Edit the Makefile and remove -O from the OPT line.
bash$ make
bash$ make test
bash$ make install

@bladedoyle bladedoyle mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Dec 14, 2005
@loewis
Copy link
Mannequin

loewis mannequin commented Jan 11, 2006

Logged In: YES
user_id=21627

Can you provide a patch?

@bladedoyle
Copy link
Mannequin Author

bladedoyle mannequin commented Jan 11, 2006

Logged In: YES
user_id=1404264

I think so. Please stay tuned. I'll post the patch when I
have it ready.

@devdanzin devdanzin mannequin added type-bug An unexpected behavior, bug, or error labels Mar 20, 2009
@birkenfeld
Copy link
Member

Is a patch still forthcoming?

@birkenfeld
Copy link
Member

Closing this old pending issue due to lack of response.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant