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: python -v sometimes fails to find init
Type: Stage:
Components: Interpreter Core Versions: Python 2.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: gvanrossum, josephwinston, nnorwitz
Priority: normal Keywords:

Created on 2002-05-02 17:17 by josephwinston, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (3)
msg10641 - (view) Author: Joseph Winston (josephwinston) Date: 2002-05-02 17:17
On HP-UX 11 python -v sometimes fails to find the init 
method for a
dynamic library.  An instance of this can be found 
when trying to load
libsip.  A possible work around is the following patch:

diff -c -c -r1.1 dynload_hpux.c
*** dynload_hpux.c	2 May 2002 16:04:08 -0000
	1.1
--- dynload_hpux.c	2 May 2002 17:12:01 -0000
***************
*** 29,35 ****
  
  	flags = BIND_FIRST | BIND_DEFERRED;
  	if (Py_VerboseFlag) {
! 		flags = DYNAMIC_PATH | BIND_FIRST | 
BIND_IMMEDIATE |
  			BIND_NONFATAL | BIND_VERBOSE;
  		printf("shl_load %s\n",pathname);
  	}
--- 29,35 ----
  
  	flags = BIND_FIRST | BIND_DEFERRED;
  	if (Py_VerboseFlag) {
! 		flags = BIND_FIRST | BIND_IMMEDIATE |
  			BIND_NONFATAL | BIND_VERBOSE;
  		printf("shl_load %s\n",pathname);
  	}

I do not know why DYNAMIC_PATH is causing the loading 
to fail since
the man page for shl_load says:

DYNAMIC_PATH Allow the loader todynamically search for 
the library
specified by the path argument.  The directories to be 
searched are
determined by the +s and +b options of the ld command 
used when the
program was linked.  On PA64, this is enabled by 
default if ld +compat
was not specified.
msg10642 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-05-07 12:25
Logged In: YES 
user_id=6380

The origin for this code is lost in history. I propose to
accept this patch, since it's strange that in verbose mode
the dynamic library search semantics should be any different
than normally.
msg10643 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-11-02 20:59
Logged In: YES 
user_id=33168

Seems to make sense.  Since I am testing on HP-UX now, I
fixed this.  I did not backport to 2.2.3.  Not sure how much
of a problem this is.  If it's a big problem, I suppose it
could be backported.  It seems like it could change behaviour.

Checked in as: Python/dynload_hpux.c 2.8

History
Date User Action Args
2022-04-10 16:05:17adminsetgithub: 36540
2002-05-02 17:17:32josephwinstoncreate