<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:PMingLiU;
panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:PMingLiU;
panose-1:2 2 5 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-TW link=blue vlink=purple style='text-justify-trim:punctuation'><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi guys,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I'm now trying to build another "FreeRADIUS 2.2.0" with rlm_sql_oracle which using Oracle "instantclient 11.2.0.3.0" and backend "Oracle 11g".<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>And the OS version is Linux x86_64 (including CentOS 6.2 & RHEL Server 5 Tikanga).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I've tried many times following step by step on google. Unfortunately all i got was the error like below:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>--<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Could not link driver rlm_sql_oracle: libclntsh.so.11.1: cannot open shared object file: No such file or directory<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Make sure it (and all its dependent libraries!) are in the search path of your system's ld.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/opt/freeRADIUS-CoA/etc/raddb/sql.conf[22]: Instantiation failed for module "sql"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/opt/freeRADIUS-CoA/etc/raddb/sites-enabled/default[191]: Failed to find "sql" in the "modules" section.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/opt/freeRADIUS-CoA/etc/raddb/sites-enabled/default[69]: Errors parsing authorize section.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>--<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I have no idea why it couldn't link libclntsh.so.11.1. I think I must be wrong in some way but just couldn't find the way out...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Here are my installation steps:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>1. ./configure --prefix=/opt/freeRADIUS --with-oracle-lib-dir=/usr/lib/oracle/11.2/client64/lib --with-oracle-include-dir=/usr/include/oracle/11.2/client64<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>and the following are configure logs<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>--<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>=== configuring in ./drivers/rlm_sql_oracle (/home/okis/freeradius-server-2.2.0/src/modules/rlm_sql/./drivers/rlm_sql_oracle)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>configure: running /bin/sh ./configure '--prefix=/opt/freeRADIUS-Oracle' '--with-oracle-include-dir=/usr/include/oracle/11.2/client64/' '--with-oracle-lib-dir=/usr/lib/oracle/11.2/client64/lib' '--enable-ltdl-install' --cache-file=/dev/null --srcdir=.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>checking for oci.h... checking for gcc... gcc<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>checking for C compiler default output file name... a.out<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>checking whether the C compiler works... yes<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>checking whether we are cross compiling... no<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>checking for suffix of executables...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>checking for suffix of object files... o<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>checking whether we are using the GNU C compiler... yes<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>checking whether gcc accepts -g... yes<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>checking for gcc option to accept ISO C89... none needed<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>yes<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>yes<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>configure: creating ./config.status<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>config.status: creating Makefile<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>--<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>2. make<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Making all in rlm_sql_oracle.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>gmake[9]: Entering directory `/home/okis/freeradius-server-2.2.0/src/modules/rlm_sql/drivers/rlm_sql_oracle'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>gmake[9]: Nothing to be done for `all'.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>gmake[9]: Leaving directory `/home/okis/freeradius-server-2.2.0/src/modules/rlm_sql/drivers/rlm_sql_oracle'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>It looks like *Nothing* done here.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>3. make install<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>After doning those regular steps, and finishing all config setup(e.g. uncomment $INCLUDE sql.conf, sql in authorize section; set up sql.conf), I tried to run radius -X, but like I said before, it failed to link .so file.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Hence, I did the following steps again.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>4. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(1)cd ./src/modules/rlm_sql/drivers/rlm_sql_oracle <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(2)./configure --with-oracle-lib-dir=/usr/lib/oracle/11.2/client64/lib --with-oracle-include-dir=/usr/include/oracle/11.2/client64<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(3)make<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>--<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/home/okis/freeradius-server-2.2.0/libtool --mode=compile gcc -I/home/okis/freeradius-server-2.2.0 -I/home/okis/freeradius-server-2.2.0/src -I//usr/include/oracle/11.2/client64 -Wall -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -I/home/okis/freeradius-server-2.2.0/libltdl -I../.. -I/home/okis/freeradius-server-2.2.0/src/ -I/usr/include/oracle/11.2/client64 -c sql_oracle.c<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>mkdir .libs<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> gcc -I/home/okis/freeradius-server-2.2.0 -I/home/okis/freeradius-server-2.2.0/src -I//usr/include/oracle/11.2/client64 -Wall -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -I/home/okis/freeradius-server-2.2.0/libltdl -I../.. -I/home/okis/freeradius-server-2.2.0/src/ -I/usr/include/oracle/11.2/client64 -c sql_oracle.c -fPIC -DPIC -o .libs/sql_oracle.o<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c: In function 'sql_error':<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c:66: warning: pointer targets in passing argument 5 of 'OCIErrorGet' differ in signedness<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>//usr/include/oracle/11.2/client64/ociap.h:7265: note: expected 'OraText *' but argument is of type 'char *'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c: In function 'sql_init_socket':<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c:179: warning: pointer targets in passing argument 4 of 'OCILogon' differ in signedness<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>//usr/include/oracle/11.2/client64/ociap.h:7143: note: expected 'const OraText *' but argument is of type 'char *'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c:179: warning: pointer targets in passing argument 6 of 'OCILogon' differ in signedness<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>//usr/include/oracle/11.2/client64/ociap.h:7143: note: expected 'const OraText *' but argument is of type 'char *'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c:179: warning: pointer targets in passing argument 8 of 'OCILogon' differ in signedness<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>//usr/include/oracle/11.2/client64/ociap.h:7143: note: expected 'const OraText *' but argument is of type 'char *'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c: In function 'sql_query':<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c:253: warning: pointer targets in passing argument 3 of 'OCIStmtPrepare' differ in signedness<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>//usr/include/oracle/11.2/client64/ociap.h:7163: note: expected 'const OraText *' but argument is of type 'char *'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c: In function 'sql_select_query':<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>sql_oracle.c:311: warning: pointer targets in passing argument 3 of 'OCIStmtPrepare' differ in signedness<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>//usr/include/oracle/11.2/client64/ociap.h:7163: note: expected 'const OraText *' but argument is of type 'char *'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> gcc -I/home/okis/freeradius-server-2.2.0 -I/home/okis/freeradius-server-2.2.0/src -I//usr/include/oracle/11.2/client64 -Wall -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -I/home/okis/freeradius-server-2.2.0/libltdl -I../.. -I/home/okis/freeradius-server-2.2.0/src/ -I/usr/include/oracle/11.2/client64 -c sql_oracle.c -o sql_oracle.o >/dev/null 2>&1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/home/okis/freeradius-server-2.2.0/libtool --mode=link gcc -release 2.2.0 \<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> -module -export-dynamic -L/usr/lib/oracle/11.2/client64/lib -o rlm_sql_oracle.la \<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> -rpath /opt/FR-Oracle/lib sql_oracle.lo -L/usr/lib/oracle/11.2/client64/lib -lclntsh -lnnz11<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>gcc -shared .libs/sql_oracle.o -L/usr/lib/oracle/11.2/client64/lib -lclntsh -lnnz11 -Wl,-soname -Wl,rlm_sql_oracle-2.2.0.so -o .libs/rlm_sql_oracle-2.2.0.so<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(cd .libs && rm -f rlm_sql_oracle.so && ln -s rlm_sql_oracle-2.2.0.so rlm_sql_oracle.so)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>ar cru .libs/rlm_sql_oracle.a sql_oracle.o<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>ranlib .libs/rlm_sql_oracle.a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>creating rlm_sql_oracle.la<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(cd .libs && rm -f rlm_sql_oracle.la && ln -s ../rlm_sql_oracle.la rlm_sql_oracle.la)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>--<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(4)make install<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>--<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US># make install<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>if [ "xrlm_sql_oracle" != "x" ]; then \<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> /home/okis/freeradius-server-2.2.0/libtool --mode=install /home/okis/freeradius-server-2.2.0/install-sh -c -c \<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> rlm_sql_oracle.la /opt/FR-Oracle/lib/rlm_sql_oracle.la || exit $?; \<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> rm -f /opt/FR-Oracle/lib/rlm_sql_oracle-2.2.0.la; \<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> ln -s rlm_sql_oracle.la /opt/FR-Oracle/lib/rlm_sql_oracle-2.2.0.la || exit $?; \<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> fi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/home/okis/freeradius-server-2.2.0/install-sh -c -c .libs/rlm_sql_oracle-2.2.0.so /opt/FR-Oracle/lib/rlm_sql_oracle-2.2.0.so<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(cd /opt/FR-Oracle/lib && { ln -s -f rlm_sql_oracle-2.2.0.so rlm_sql_oracle.so || { rm -f rlm_sql_oracle.so && ln -s rlm_sql_oracle-2.2.0.so rlm_sql_oracle.so; }; })<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/home/okis/freeradius-server-2.2.0/install-sh -c -c .libs/rlm_sql_oracle.lai /opt/FR-Oracle/lib/rlm_sql_oracle.la<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>/home/okis/freeradius-server-2.2.0/install-sh -c -c .libs/rlm_sql_oracle.a /opt/FR-Oracle/lib/rlm_sql_oracle.a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>chmod 644 /opt/FR-Oracle/lib/rlm_sql_oracle.a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>ranlib /opt/FR-Oracle/lib/rlm_sql_oracle.a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>PATH="$PATH:/sbin" ldconfig -n /opt/FR-Oracle/lib<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>----------------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Libraries have been installed in:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> /opt/FR-Oracle/lib<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>If you ever happen to want to link against installed libraries<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>in a given directory, LIBDIR, you must either use libtool, and<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>specify the full pathname of the library, or use the `-LLIBDIR'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>flag during linking and do at least one of the following:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> - add LIBDIR to the `LD_LIBRARY_PATH' environment variable<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> during execution<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> - add LIBDIR to the `LD_RUN_PATH' environment variable<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> during linking<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> - use the `-Wl,--rpath -Wl,LIBDIR' linker flag<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> - have your system administrator add LIBDIR to `/etc/ld.so.conf'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>See any operating system documentation about shared libraries for<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>more information, such as the ld(1) and ld.so(8) manual pages.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>----------------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>--<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>While it still cannot work now...Anyone has any recommendation about this? If needed any other information for debugging, please let me know directly.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Any help would be appreciate!!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Okis.<o:p></o:p></span></p></div></body></html>