Hi, Thank you for your presentation at OSSIR today. As said, I've a technical question about the debug mode and Python. We are using python with "LD_PRELOAD=/usr/lib/python2.6.so.1" in /etc/init.d/freeradius file But when we start FreeRadius in debug mode, it seems that the parameter is bypassed so we have to force the command line : "LD_PRELOAD=/usr/lib/python2.6.so.1 freeradius -X" Is it normal ? Do we missed somethind or is there another way to run debug mode with the prelod config ? Best regards.
Vladimir KOLLA wrote:
Thank you for your presentation at OSSIR today.
You're welcome. It was nice to get to Paris for a while.
As said, I've a technical question about the debug mode and Python. We are using python with "LD_PRELOAD=/usr/lib/python2.6.so.1" in /etc/init.d/freeradius file But when we start FreeRadius in debug mode, it seems that the parameter is bypassed so we have to force the command line : "LD_PRELOAD=/usr/lib/python2.6.so.1 freeradius -X"
Is it normal ? Do we missed somethind or is there another way to run debug mode with the prelod config ?
It's normal. The environment variable is set in the init.d/freeradius file. And when you're starting FreeRADIUS *without* that file, it isn't used. I'm not sure why you need to preload the python library. It should be loaded automatically when you load the rlm_python library. Alan DeKok.
On 05/15/2012 10:12 PM, Alan DeKok wrote:
I'm not sure why you need to preload the python library. It should be loaded automatically when you load the rlm_python library.
It's more tricky, I'm afraid , due to some python idiocy :o( Basically, python modules (compiled as a .so) are not themselves linked against libpython. This causes problems when linking to libpython from another .so (e.g. rlm_python) and then importing those modules - they don't resolve various symbols. http://bugs.python.org/issue4434 Warning: reading that bug will make you either sad or angry. "Use the static library, closing NOTABUG". Sigh. I believe it's fixed in Python 2.7. In my code, I worked around it by dlopen()ing libpython, as per the 1st suggestion in the above bug.
Phil Mayers wrote:
http://bugs.python.org/issue4434
Warning: reading that bug will make you either sad or angry.
Probably both.
"Use the static library, closing NOTABUG". Sigh.
I believe it's fixed in Python 2.7.
In my code, I worked around it by dlopen()ing libpython, as per the 1st suggestion in the above bug.
I'll try adding that. Alan DeKok.
Thank you for the answer, it's was helpful :-) Vlad. -----Original Message----- From: freeradius-users-bounces+kolla=netxp.fr@lists.freeradius.org [mailto:freeradius-users-bounces+kolla=netxp.fr@lists.freeradius.org] On Behalf Of Alan DeKok Sent: mercredi 16 mai 2012 08:49 To: FreeRadius users mailing list Subject: Re: Help about debug mode and python Phil Mayers wrote:
http://bugs.python.org/issue4434
Warning: reading that bug will make you either sad or angry.
Probably both.
"Use the static library, closing NOTABUG". Sigh.
I believe it's fixed in Python 2.7.
In my code, I worked around it by dlopen()ing libpython, as per the 1st suggestion in the above bug.
I'll try adding that. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
Alan DeKok -
Phil Mayers -
Vladimir KOLLA