[Python-bugs-list] [ python-Bugs-551504 ] python -v sometimes fails to find init

noreply@sourceforge.net noreply@sourceforge.net
Sat, 02 Nov 2002 12:59:34 -0800


Bugs item #551504, was opened at 2002-05-02 13:17
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=551504&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Joseph Winston (josephwinston)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: python -v sometimes fails to find init

Initial Comment:
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.


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

>Comment By: Neal Norwitz (nnorwitz)
Date: 2002-11-02 15:59

Message:
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



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

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-05-07 08:25

Message:
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.

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

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