This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [PATCH] python socket module fails to build on Solaris when -zignore is in LDFLAGS
Type: compile error Stage: patch review
Components: Build Versions: Python 2.7
process
Status: languishing Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Alexander.Pyhalov, andy_js, jcea, r.david.murray
Priority: normal Keywords: patch

Created on 2015-04-09 13:43 by andy_js, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
solaris-socket-zignore.diff andy_js, 2015-04-09 13:43 Patch which pulls in libsocket and libnsl when building on Solaris
socket.patch Alexander.Pyhalov, 2015-05-28 17:18
Messages (8)
msg240325 - (view) Author: Andrew Stormont (andy_js) Date: 2015-04-09 13:43
The socket module fails to build when -zignore is in LDFLAGS.  This option changes the linker behaviour so it will only resolve against the libraries linked in explicitly instead of doing resolution recursively against their dependencies too.
msg242950 - (view) Author: Andrew Stormont (andy_js) Date: 2015-05-12 09:40
Bump.

Would be nice to get this included in python 2.7.11.

I also have a similar fix for the multiprocessing module but I won't bother submitting it if it will get ignored.
msg242969 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-05-12 13:51
Do you know anyone else using solaris who could do a review (ie: confirm that your patch makes sense and works for them)?  It looks like jcea, who is our only current committer who uses Solaris as far as I know (well, OpenIndiana), hasn't had time to look at this.

On the other hand, it isn't 100% clear to me that this is appropriate.  I'm not (yet) experienced enough with the internals of our build system to be the one to make the call, but it seems to me that you can support -z ignore by modifying your Modules/Setup file, so it may not be appropriate to inject solaris specific support in setup.py for an option that isn't normally used.
msg244318 - (view) Author: Andrew Stormont (andy_js) Date: 2015-05-28 16:34
The -z ignore option is actually exposing issues that could cause a problem at runtime.  If the socket module were imported and libsocket/libnsl hadn't already been loaded (i.e pulled in by the loader as a dependency of another module) the loader would fail due to unresolved symbols.

This problem would not effect Linux because all of the socket stuff is in libc, which is not the case on Solaris.  Today it doesn't cause a problem because most other things are already pulling in libsocket and libnsl before the socket module is loaded, but there's no guarantee that will always be the case.

For the sake of correctness it should be fixed, and I would suggest later making -z ignore the default on Solaris.

I will see if I can find somebody else to review the patch.
msg244324 - (view) Author: Alexander Pyhalov (Alexander.Pyhalov) Date: 2015-05-28 17:11
We have similar patch here in OpenIndiana. The patch is correct.
msg244325 - (view) Author: Alexander Pyhalov (Alexander.Pyhalov) Date: 2015-05-28 17:18
BTW, we use the following version for Python 3.4
msg245380 - (view) Author: Andrew Stormont (andy_js) Date: 2015-06-15 15:19
Bump.
msg254801 - (view) Author: Andrew Stormont (andy_js) Date: 2015-11-17 15:19
Bump.
History
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68083
2015-11-17 15:20:14andy_jssettitle: python socket module fails to build on Solaris when -zignore is in LDFLAGS -> [PATCH] python socket module fails to build on Solaris when -zignore is in LDFLAGS
2015-11-17 15:19:48andy_jssetstatus: open -> languishing

messages: + msg254801
2015-06-15 15:19:15andy_jssetmessages: + msg245380
2015-05-28 17:18:48Alexander.Pyhalovsetfiles: + socket.patch

messages: + msg244325
2015-05-28 17:11:09Alexander.Pyhalovsetnosy: + Alexander.Pyhalov
messages: + msg244324
2015-05-28 16:34:31andy_jssetmessages: + msg244318
2015-05-12 13:53:33r.david.murraysettitle: PATCH: python socket module fails to build on Solaris when -zignore is in LDFLAGS -> python socket module fails to build on Solaris when -zignore is in LDFLAGS
2015-05-12 13:51:07r.david.murraysetnosy: + r.david.murray
messages: + msg242969
2015-05-12 13:32:23r.david.murraysetstatus: languishing -> open
stage: patch review
2015-05-12 09:40:38andy_jssetstatus: open -> languishing

messages: + msg242950
2015-04-11 23:07:48ned.deilysetnosy: + jcea
2015-04-09 13:43:05andy_jscreate