Dear Alexandre, Ok the patch you sent didnt work for me so here are some steps that I took and would like to share so that other may benefit from it :) these steps are working with FreeRadius 2.1.10 and Oracle Instantclient 11.2, autoconf 2.59 and libtool 1.5.4 and OS is centOS 5.4 (final) Steps that I did are as follows, 1: changed the configure.in file in src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.in replace libnnz10 to libnnz11 and also libclntsh10 to libclntsh11 etc 2: changed back to parent directory i.e. freeradius/ and then did aclocal command 3: autogen.sh works after aclocal so ran ./autogen.sh 4: created a symlink in oracleinstant client lib directory named libclntsh.so -> libclntsh.so.11.1 (as freeradius oracle driver looks for libclntsh.so) 5: did # ./configure --with-oracle-include-dir=/opt/instantclient_11_2/sdk/include/ --with-experimental-modules --with-oracle-lib-dir=/opt/instantclient_11_2/ 6: now make && make installl 7: after install export LD_LIBRARY_PATH to you instantclient folder i.e LD_LIBRARY_PATH=/opt/instantclient_11_2 8: change sql.conf to point to oracle and then radiusd -X and it works with oracle (atleast it worked for me) if it works for others then I hope somebody add it to the wiki as well Thanks Waqas On Sat, Jan 15, 2011 at 1:42 AM, Alexandre <alxgomz@gmail.com> wrote:
Hardcoding libnnz11should be done in configure not in configure.in. and so there is no need to run. ./autogen.sh
Le 14 janv. 2011 20:19, "Waqas Toor" <waqasnasirtoor@gmail.com> a écrit :
Dear Alexandre,
Thanks, I have autoconf 2.59 after patching I had to do #aclocal # ./autogen.sh # ./configure --with-oracle-include-dir=/opt/instantclient_11_2/sdk/include/ --with-experimental-modules --with-oracle-lib-dir=/opt/instantclient_11_2/
now the error is configure: configuring in ./drivers/rlm_sql_oracle configure: running /bin/sh './configure' --prefix=/usr/local '--prefix=/usr/local' '--with-oracle-include-dir=/opt/instantclient_11_2/sdk/include/' '--with-experimental-modules' '--with-oracle-lib-dir=/opt/instantclient_11_2/' '--enable-ltdl-install' '--cache-file=/dev/null' '--srcdir=.' --cache-file=/dev/null --srcdir=. checking for oci.h... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed yes configure: WARNING: oracle libraries not found. Use --with-oracle-lib-dir=<path>. configure: WARNING: silently not building rlm_sql_oracle. configure: WARNING: FAILURE: rlm_sql_oracle requires: libclntsh libnnz. configure: creating ./config.status config.status: creating Makefile
please note that is no version in libnnz.
and if I hardcode the version in lnnz11 and libnnz11 in configure.in and the again do the above steps then i get this error
configure: configuring in ./drivers/rlm_sql_oracle configure: running /bin/sh './configure' --prefix=/usr/local '--prefix=/usr/local' '--with-oracle-include-dir=/opt/instantclient_11_2/sdk/include/' '--with-experimental-modules' '--with-oracle-lib-dir=/opt/instantclient_11_2/' '--enable-ltdl-install' '--cache-file=/dev/null' '--srcdir=.' --cache-file=/dev/null --srcdir=. checking for oci.h... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed yes configure: WARNING: oracle libraries not found. Use --with-oracle-lib-dir=<path>. configure: WARNING: silently not building rlm_sql_oracle. configure: WARNING: FAILURE: rlm_sql_oracle requires: libclntsh libnnz11.
this oracle thing is becoming pain now :)
Thank you Waqas
Waqas
On Fri, Jan 14, 2011 at 10:56 PM, Alexandre <alxgomz@gmail.com> wrote:
A workaround for your very own problem could be to change all references to libnnz10 to libnnz11 in the configure file (in the same directory).
regards
2011/1/14 Alexandre <alxgomz@gmail.com>:
personnally I got it working with libtool 1.5 and autoconf 2.61
2011/1/14 Waqas Toor <waqasnasirtoor@gmail.com>:
Dear Alexandre, I am sorry I should have mentioned the env previously .. its CentOS 5.4 64bit
if I do ./autogen.sh without applying patch on a clean extract from the tarball it gives the same error.
I am not good with libtool and autoconf. can you head me to a direction where i can figure out this or which autoconf and libtool version i need to work this out.
Thanks
waqas
On Fri, Jan 14, 2011 at 10:07 PM, Alexandre <alxgomz@gmail.com> wrote:
Oops the patch is indeed bad. A bad copy/paste inserted a line break wich mess it up: here is a good one attached. sorry for that (unfortunately this won't resolve your issue with libtool/autoconf or whatever).
2011/1/14 Alexandre <alxgomz@gmail.com>: > The patch should apply flalessly on the 2.1.10 source tree. At least > it does here. Are you sure you applied it on a clean source trre > unpacked from the 2.1.10 tarball? > > Never the less it seems ,there are autoconf or libtool issues with > your environement (wich is?). > Do you have the same error before applying patch? > > > 2011/1/14 Waqas Toor <waqasnasirtoor@gmail.com>: >> also adding to that, >> i have manually typed in the changes in the configure.in file as >> suggested by the patch. >> when i do autogen.sh >> i get this error >> >> ./autogen.sh >> Remember to add `AC_PROG_LIBTOOL' to `configure.in'. >> Using `AC_PROG_RANLIB' is rendered obsolete by `AC_PROG_LIBTOOL' >> libtoolize: `/usr/share/aclocal/libtool.m4' is serial 48, less than >> 52 >> in `aclocal.m4' >> To remain compatible, you should update your `aclocal.m4' by running >> aclocal. >> configure.in:1160: warning: AC_CONFIG_SUBDIRS: you should use >> literals >> autoconf/status.m4:1077: AC_CONFIG_SUBDIRS is expanded from... >> configure.in:1160: the top level >> configure.in:1160: warning: AC_CONFIG_SUBDIRS: you should use >> literals >> autoconf/status.m4:1077: AC_CONFIG_SUBDIRS is expanded from... >> configure.in:1160: the top level >> configure:19994: error: possibly undefined macro: >> AC_REQUIRE_AUX_FILE >> If this token and others are legitimate, please use >> m4_pattern_allow. >> See the Autoconf documentation. >> >> what could be the reason now? >> >> >> >> >> On Fri, Jan 14, 2011 at 6:10 PM, Waqas Toor >> <waqasnasirtoor@gmail.com> wrote: >>> Hello Alexandre, >>> >>> Thanks for the patch >>> it tried its failing >>> >>> here is the error message >>> [root@aaa-dev freeradius-server-2.1.10]# patch -p0 < oracle.patch >>> patching file >>> src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.in >>> Hunk #1 FAILED at 86. >>> patch: **** malformed patch at line 77: >>> AC_MSG_RESULT(yes) >>> >>> >>> >>> >>> >>> >>> >>> On Fri, Jan 14, 2011 at 5:56 PM, Alexandre <alxgomz@gmail.com> >>> wrote: >>>> I wrote this patch which should allow freeradius to correctly >>>> detect >>>> oracle librairies and headers (if you provide the necessary option >>>> for >>>> configure). >>>> copy it to the top level directory of the sources and patch using >>>> >>>> patch -p0 < filename.patch >>>> >>>> then re-run ./autogen.sh, then configure, make blahblahblah... >>>> >>>> This patch worked for me but I don't think it has ever been tested >>>> anywhere else. So thanks for feedback :). >>>> >>>> regards >>>> >>>> HERE IS THE PATCH: >>>> ################################## >>>> --- /tmp/configure.in.orig 2010-12-14 23:24:40.019101002 >>>> -1000 >>>> +++ src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.in >>>> 2010-12-14 >>>> 23:18:25.875101003 -1000 >>>> @@ -86,32 +86,37 @@ >>>> if test "x$oracle_lib_dir" != "x" ; then >>>> ORACLE_LIBDIR_SWITCH="-L${oracle_lib_dir} " >>>> fi >>>> - LIBS="$old_LIBS $ORACLE_LIBDIR_SWITCH -lclntsh >>>> -lnnz10" >>>> - AC_TRY_LINK([#include <oci.h> >>>> - >>>> - static OCIEnv *p_env; >>>> - static OCIError *p_err; >>>> - static OCISvcCtx *p_svc; >>>> - static OCIStmt *p_sql; >>>> - static OCIDefine *p_dfn >>>> = (OCIDefine *) 0; >>>> - static OCIBind *p_bnd >>>> = (OCIBind *) 0; >>>> - ], >>>> - [ >>>> - int p_bvi; >>>> - char p_sli[20]; >>>> - int rc; >>>> - char errbuf[100]; >>>> - int errcode; >>>> - >>>> - rc = OCIInitialize((ub4) >>>> OCI_DEFAULT, (dvoid *)0, /* Initialize OCI */ >>>> - (dvoid * (*)(dvoid *, >>>> size_t)) 0, >>>> - (dvoid * (*)(dvoid *, >>>> dvoid *, size_t))0, >>>> - (void (*)(dvoid *, dvoid >>>> *)) 0 ); >>>> - >>>> - ], >>>> - ORACLE_LIBS="$ORACLE_LIBDIR_SWITCH >>>> -lclntsh -lnnz10", >>>> - ORACLE_LIBS= >>>> - ) >>>> + for oracle_version in 10 11 9 ""; do >>>> + LIBS="$old_LIBS $ORACLE_LIBDIR_SWITCH >>>> -lclntsh -lnnz${oracle_version}" >>>> + AC_TRY_LINK([#include <oci.h> >>>> + >>>> + static OCIEnv >>>> *p_env; >>>> + static OCIError >>>> *p_err; >>>> + static OCISvcCtx >>>> *p_svc; >>>> + static OCIStmt >>>> *p_sql; >>>> + static OCIDefine >>>> *p_dfn = (OCIDefine *) 0; >>>> + static OCIBind >>>> *p_bnd = (OCIBind *) 0; >>>> + ], >>>> + [ >>>> + int p_bvi; >>>> + char >>>> p_sli[20]; >>>> + int rc; >>>> + char >>>> errbuf[100]; >>>> + int errcode; >>>> + >>>> + rc = OCIInitialize((ub4) >>>> OCI_DEFAULT, (dvoid *)0, /* Initialize OCI */ >>>> + (dvoid * >>>> (*)(dvoid *, size_t)) 0, >>>> + (dvoid * >>>> (*)(dvoid *, dvoid *, size_t))0, >>>> + (void >>>> (*)(dvoid *, dvoid *)) 0 ); >>>> + >>>> + ], >>>> + ORACLE_LIBS="$ORACLE_LIBDIR_SWITCH >>>> -lclntsh -lnnz${oracle_version}", >>>> + ORACLE_LIBS= >>>> + ) >>>> + if test "x$ORACLE_LIBS" != "x"; then >>>> + break >>>> + fi >>>> + done >>>> >>>> LIBS="$old_LIBS" >>>> CFLAGS="$old_CFLAGS" >>>> @@ -129,7 +134,7 @@ >>>> >>>> if test "x$ORACLE_LIBS" = "x"; then >>>> AC_MSG_WARN([oracle libraries not found. >>>> Use >>>> --with-oracle-lib-dir=<path>.]) >>>> - fail="$fail libclntsh libnnz10" >>>> + fail="$fail libclntsh >>>> libnnz${oracle_version}" >>>> else >>>> sql_oracle_ldflags="${sql_oracle_ldflags} >>>> $ORACLE_LIBS" >>>> AC_MSG_RESULT(yes) >>>> >>>> ################################## >>>> END OF THE PATCH >>>> >>>> 2011/1/14 Waqas Toor <waqasnasirtoor@gmail.com>: >>>>> Dear Community, >>>>> >>>>> I am trying to compile freeradius2.1.10 with oracle >>>>> instantclient11.2 >>>>> and having problems where it is not detecting oracle libraries >>>>> and >>>>> header files. where the oracle home is /opt/instantclient_11_2 >>>>> there are two steps that I am trying and both are failing. >>>>> a: standard compile >>>>> # ./configure --with-experimental-modules >>>>> --with-oracle-include-dir=/opt/instantclient_11_2/sdk/include >>>>> --with-oracle-lib-dir=/opt/instantclient_11_2 >>>>> --with-oracle-home-dir=/opt/instantclient_11_2 >>>>> and getting this error >>>>> === configuring in ./drivers/rlm_sql_oracle >>>>> >>>>> (/opt/freeradius-server-2.1.10/src/modules/rlm_sql/./drivers/rlm_sql_oracle) >>>>> configure: running /bin/sh ./configure '--prefix=/usr/local' >>>>> '--with-experimental-modules' >>>>> '--with-oracle-include-dir=/opt/instantclient_11_2/sdk/include' >>>>> '--with-oracle-lib-dir=/opt/instantclient_11_2' >>>>> '--with-oracle-home-dir=/opt/instantclient_11_2' >>>>> '--enable-ltdl-install' --cache-file=/dev/null --srcdir=. >>>>> checking for oci.h... checking for gcc... gcc >>>>> checking for C compiler default output file name... a.out >>>>> checking whether the C compiler works... yes >>>>> checking whether we are cross compiling... no >>>>> checking for suffix of executables... >>>>> checking for suffix of object files... o >>>>> checking whether we are using the GNU C compiler... yes >>>>> checking whether gcc accepts -g... yes >>>>> checking for gcc option to accept ISO C89... none needed >>>>> yes >>>>> configure: WARNING: oracle libraries not found. Use >>>>> --with-oracle-lib-dir=<path>. >>>>> configure: WARNING: silently not building rlm_sql_oracle. >>>>> configure: WARNING: FAILURE: rlm_sql_oracle requires: libclntsh >>>>> libnnz10. >>>>> configure: creating ./config.status >>>>> config.status: creating Makefile >>>>> >>>>> b: in >>>>> freeradius-server-2.1.10/src/modules/rlm_sql/drivers/rlm_sql_oracle >>>>> changed the Makefile.in and setting >>>>> RLM_SQL_CFLAGS = -I/opt/instantclient_11_2/sdk/include >>>>> $(INCLTDL) >>>>> RLM_SQL_LIBS = -L/opt/instantclient_11_2 >>>>> >>>>> and then make. >>>>> >>>>> but still getting the error. >>>>> >>>>> any pointers . >>>>> >>>>> Thanks >>>>> Waqas >>>>> - >>>>> List info/subscribe/unsubscribe? See >>>>> http://www.freeradius.org/list/users.html >>>>> >>>> >>>> - >>>> List info/subscribe/unsubscribe? See >>>> http://www.freeradius.org/list/users.html >>>> >>> >> >> - >> List info/subscribe/unsubscribe? See >> http://www.freeradius.org/list/users.html >> >
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html