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