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