freeradius 2.1.10 with oracle instantclient11.2

Alexandre alxgomz at gmail.com
Fri Jan 14 18:07:37 CET 2011


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 at 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 at 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 at gmail.com> wrote:
>>> Hello Alexandre,
>>>
>>> Thanks for the patch
>>> it tried its failing
>>>
>>> here is the error message
>>> [root at 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 at 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 at 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
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle.patch
Type: text/x-patch
Size: 2500 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20110114/817c35ee/attachment.bin>


More information about the Freeradius-Users mailing list