[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Standard universe python: dynamic library problem



Colin,

> I have been trying to get Python compiled for the standard universe,
> as was claimed possible in:
> 
> https://lists.cs.wisc.edu/archive/condor-users/2007-March/msg00217.shtml
> https://lists.cs.wisc.edu/archive/condor-users/2005-August/
> msg00061.shtml
> 
> Unfortunately, I am encountering linking problems when using
> condor_compile that relate to dynamic linking library (libdl.a).  I
> get a bunch of undefined references to functions in that library (see
> below).  I am using RHEL 4 with condor v6.8.4 (RHEL 3), gcc 3.4.6,
> and python 2.3.6 (also tried python 2.5.1 without success).  I
> realize that Condor does not support checkpointing for Linux programs
> that do dynamic linking, but I believe the program should at least
> link properly (and be usable without the checkpointing feature).
> 
> Any help would be greatly appreciated.

Trust me, you don't want to go there.  There are serious problems with
using dlopen in statically linked programs.

> libpython2.3.a(dynload_shlib.o)(.text+0x15d): In function `_PyImport_GetDynLoadFunc':
> Python/dynload_shlib.c:129: warning: Using 'dlopen' in statically
> linked applications requires at runtime the shared libraries from the
> glibc version used for linking

This warning message is telling you what the problem is.  Even if
dlopen were available, it requires that the machine where your program
runs has the same glibc version installed as the one you built on.
As I understand it, the dlopen in the static program might work to
load a dynamic object, but if that object loads another one it would
use the dynamic dlopen and the version mismatch causes a crash.

What you want to do is configure a python that doesn't use dynamic
loading, but instead has the modules you need already built in.  I
have done this with perl and I see no reason why it wouldn't work with
python.  Here is a link I found about that very topic:

http://www.thescripts.com/forum/thread34240.html

-- 
Daniel K. Forrest	Laboratory for Molecular and
forrest@xxxxxxxxxxxxx	Computational Genomics
(608) 262 - 9479	University of Wisconsin, Madison