> Hello, > I have successfully built freeradius 0.7 with rlm_sql_oracle however I get > an error during runtime about a relocation error. It is my understanding > that relocation errors occur when you install something more than once and > the program is reading the wrong library although I have only installed > oracle once. Has anyone else had a similar problem? > > ./radiusd -x > Starting - reading configuration files ... > Module: Loaded System > Module: Instantiated unix (unix) > Module: Loaded PAP > Module: Instantiated pap (pap) > Module: Loaded SQL > rlm_sql: Driver rlm_sql_oracle loaded and linked > rlm_sql: Attempting to connect to oracle@doom1:/somadb > rlm_sql: starting 0 > rlm_sql: Attempting to connect #0 > ./radiusd: relocation error: /usr/local/lib/rlm_sql_oracle.so.0: undefined > symbol: OCIEnvCreate
What version of Oracle are you using? I had this problem when I had a version older than 8i (8.0.5). I made a patch to make it work with 8i and 8.0.5 but that was for freeradius 0.4 and we have since moved to Postgres. The patch would probably still work though as it was only removing one function call, and replacing it with 2. The problem is the rlm_oracle module uses functions which didn't exist until 8i. My patch made it work with 8.0.5 and it also still worked with 8i. PATCH: --- freeradius-0.4-orig/src/modules/rlm_sql/drivers/rlm_sql_oracle/sql_oracle.c Tue Nov 13 15:08:39 2001 +++ freeradius-0.4/src/modules/rlm_sql/drivers/rlm_sql_oracle/sql_oracle.c Fri Feb 1 +09:03:52 2002 @@ -33,13 +33,14 @@ oracle_sock = sqlsocket->conn; - if (OCIEnvCreate(&oracle_sock->env, OCI_DEFAULT, (dvoid *)0, - (dvoid * (*)(dvoid *, size_t)) 0, - (dvoid * (*)(dvoid *, dvoid *, size_t))0, - (void (*)(dvoid *, dvoid *)) 0, - 0, (dvoid **)0 )) { - radlog(L_ERR,"Init: Couldn't init Oracle OCI environment (OCIEnvCreate())"); - return -1; + OCIInitialize(OCI_DEFAULT, (dvoid *)0, + (dvoid * (*)(dvoid *, size_t)) 0, + (dvoid * (*)(dvoid *, dvoid *, size_t))0, + (void (*)(dvoid *, dvoid *)) 0); + + if (OCIEnvInit(&oracle_sock->env, OCI_DEFAULT, 0, (dvoid **)0)) { + radlog(L_ERR,"Init: Couldn't init Oracle OCI environment (OCIEnvInit())"); + return -1; } if (OCIHandleAlloc((dvoid *) oracle_sock->env, (dvoid **) &oracle_sock->errHandle, -- Josh Wilsdon <[EMAIL PROTECTED]> Programmer Analyst Wizard IT Services - http://www.wizard.ca Linux Support Specialist - http://linuxmagic.com Unix Administration, Website Hosting, Network Services, Programming (604) 589-0037 Beautiful British Columbia, Canada LinuxMagic is a TradeMark of Wizard Tower TechnoServices Ltd. -------------------------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html