re: Help! Can't compile rlm_sql_oracle on solaris

2003-02-06 Thread Chayim I. Kirshen
Chris,

My compiler is now 64 bit (with a bit of work), but I still can't link. 
Any ideas?  BTW: since I'm not subscribed to the list, can you reply all
so I can see it as well.

thanks,

--ck


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



re: Help! Can't compile rlm_sql_oracle on solaris

2003-02-06 Thread Chris Parker
At 04:28 PM 2/6/2003 -0500, Chayim I. Kirshen wrote:

Chris,

My compiler is now 64 bit (with a bit of work), but I still can't link.
Any ideas?  BTW: since I'm not subscribed to the list, can you reply all
so I can see it as well.


Can you reprint the error you are seeing?

Also, can you show the output of 'file foo' where foo is the rlm_sql.o
file and the oracle lib that isn't working?

Also, please list the output of 'ldd oraclefoo' where oraclefoo is the
library that is failing to link.

-Chris



thanks,

--ck


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


--
   \\\|||///  \  StarNet Inc.  \ Chris Parker
   \ ~   ~ /   \   WX *is* Wireless!\   Director, Engineering
   | @   @ |\   http://www.starnetwx.net \  (847) 963-0116
oOo---(_)---oOo--\--
  \ Wholesale Internet Services - http://www.megapop.net



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


re: Help! Can't compile rlm_sql_oracle on solaris

2003-02-06 Thread Chayim I. Kirshen
Well, I solved the rlm_sql_oracle issue (thanks Chris):

Here's what I needed to do:

1. recompile my gcc for 64 bit.  This means use a 32 bit gcc to
bootstrap binutils, and then create a 64 bit compiler.

2. export LD_LIBRARY_PATH=/lib:/path-to-compiler/lib

And that was great.  Except I've got this new issue where I can't use
libcrypt.so because of a linker error.  Here's my new error and the gcc
line that's generating it.  I haven't compiled glibc on Solaris yet (and
so far I'm happily avoiding it).

gcc .libs/radiusdS.o -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-Wall -D_GNU_SOURCE -DNDEBUG -I../include -o .libs/radiusd radiusd.o
files.o util.o acct.o nas.o log.o valuepair.o version.o proxy.o exec.o
auth.o timestr.o conffile.o modules.o modcall.o session.o xlat.o
threads.o smux.o radius_snmp.o client.o request_list.o mainconfig.o 
-L/export/home/chayim/freeradius/src/lib
/export/home/chayim/freeradius/src/lib/.libs/libradius.so -lcrypt
/export/home/chayim/freeradius/libltdl/.libs/libltdl.so -ldl -lnsl
-lresolv -lsocket -lposix4 -lpthread -R/shared/toolchain//lib
ld: fatal: file /lib/libcrypt.so: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to .libs/radiusd
collect2: ld returned 1 exit status


On Thu, 2003-02-06 at 16:37, Chris Parker wrote:
 At 04:28 PM 2/6/2003 -0500, Chayim I. Kirshen wrote:
 Chris,
 
 My compiler is now 64 bit (with a bit of work), but I still can't link.
 Any ideas?  BTW: since I'm not subscribed to the list, can you reply all
 so I can see it as well.
 
 Can you reprint the error you are seeing?
 
 Also, can you show the output of 'file foo' where foo is the rlm_sql.o
 file and the oracle lib that isn't working?
 
 Also, please list the output of 'ldd oraclefoo' where oraclefoo is the
 library that is failing to link.
 
 -Chris
 
 
 thanks,
 
 --ck
 
 
 -
 List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
 
 --
 \\\|||///  \  StarNet Inc.  \ Chris Parker
 \ ~   ~ /   \   WX *is* Wireless!\   Director, Engineering
 | @   @ |\   http://www.starnetwx.net \  (847) 963-0116
 oOo---(_)---oOo--\--
\ Wholesale Internet Services - http://www.megapop.net
 
 


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



re: Help! Can't compile rlm_sql_oracle on solaris

2003-02-06 Thread Chris Parker
At 04:51 PM 2/6/2003 -0500, Chayim I. Kirshen wrote:

Well, I solved the rlm_sql_oracle issue (thanks Chris):

Here's what I needed to do:

1. recompile my gcc for 64 bit.  This means use a 32 bit gcc to
bootstrap binutils, and then create a 64 bit compiler.

2. export LD_LIBRARY_PATH=/lib:/path-to-compiler/lib


Here is what I do to set a 64-bit solaris env:

( assuming you've installed 64-bit version of gcc in /usr/local/gcc-v9 )

PATH=/usr/local/gcc-v9/bin:$PATH
LD_LIBRARY_PATH=/usr/local/gcc-v9/lib:$LD_LIBRARY_PATH
CFLAGS=-mcpu=v9 -Wa,-xarch=v9a
CXXFLAGS=$CFLAGS
export PATH LD_LIBRARY_PATH CFLAGS CXXFLAGS


And that was great.  Except I've got this new issue where I can't use
libcrypt.so because of a linker error.  Here's my new error and the gcc
line that's generating it.  I haven't compiled glibc on Solaris yet (and
so far I'm happily avoiding it).

gcc .libs/radiusdS.o -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-Wall -D_GNU_SOURCE -DNDEBUG -I../include -o .libs/radiusd radiusd.o
files.o util.o acct.o nas.o log.o valuepair.o version.o proxy.o exec.o
auth.o timestr.o conffile.o modules.o modcall.o session.o xlat.o
threads.o smux.o radius_snmp.o client.o request_list.o mainconfig.o
-L/export/home/chayim/freeradius/src/lib
/export/home/chayim/freeradius/src/lib/.libs/libradius.so -lcrypt
/export/home/chayim/freeradius/libltdl/.libs/libltdl.so -ldl -lnsl
-lresolv -lsocket -lposix4 -lpthread -R/shared/toolchain//lib
ld: fatal: file /lib/libcrypt.so: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to .libs/radiusd
collect2: ld returned 1 exit status


Note that you above set '/lib' explicitly to be the first place for
ld to look.  Try removing the '/lib' from the front of your LD_LIBRARY_PATH.

-Chris
--
   \\\|||///  \  StarNet Inc.  \ Chris Parker
   \ ~   ~ /   \   WX *is* Wireless!\   Director, Engineering
   | @   @ |\   http://www.starnetwx.net \  (847) 963-0116
oOo---(_)---oOo--\--
  \ Wholesale Internet Services - http://www.megapop.net



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


re: Help! Can't compile rlm_sql_oracle on solaris

2003-02-06 Thread Chayim I. Kirshen
About 2 minutes before your email came in I just stumbled across
something similar.  Here's exactly what I had to do:

1. build binutils:
options --target=sparcv9-sun-solaris2

2. build gcc:
options -host=sparcv9-sun-solaris2 --with-gnu-as --with-gnu-ar
--with-as=/path-to/as --with-ar=/path-to/ar

3. OHOME=/path-to/oraclehome
   LD_LIBRARY_PATH=/lib:/path-to-gcc/lib
   export OHOME LD_LIBRARY_PATH

4. build freeradius:
- options are only specific to my install.  nothing fancy occurred

5. deploy!

Thanks a tonne for all your help.  I hope this list is useful to the
next person.  Note, to those interested in compiling the gcc for solaris
(repeatably), I will be posting a document on my website
(www.gnupower.net) in the upcoming week/month depending on time.

cheers,

--ck

 Here is what I do to set a 64-bit solaris env:
 
 ( assuming you've installed 64-bit version of gcc in /usr/local/gcc-v9 )
 
 PATH=/usr/local/gcc-v9/bin:$PATH
 LD_LIBRARY_PATH=/usr/local/gcc-v9/lib:$LD_LIBRARY_PATH
 CFLAGS=-mcpu=v9 -Wa,-xarch=v9a
 CXXFLAGS=$CFLAGS
 export PATH LD_LIBRARY_PATH CFLAGS CXXFLAGS
 
 And that was great.  Except I've got this new issue where I can't use
 libcrypt.so because of a linker error.  Here's my new error and the gcc
 line that's generating it.  I haven't compiled glibc on Solaris yet (and
 so far I'm happily avoiding it).
 
 gcc .libs/radiusdS.o -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
 -Wall -D_GNU_SOURCE -DNDEBUG -I../include -o .libs/radiusd radiusd.o
 files.o util.o acct.o nas.o log.o valuepair.o version.o proxy.o exec.o
 auth.o timestr.o conffile.o modules.o modcall.o session.o xlat.o
 threads.o smux.o radius_snmp.o client.o request_list.o mainconfig.o
 -L/export/home/chayim/freeradius/src/lib
 /export/home/chayim/freeradius/src/lib/.libs/libradius.so -lcrypt
 /export/home/chayim/freeradius/libltdl/.libs/libltdl.so -ldl -lnsl
 -lresolv -lsocket -lposix4 -lpthread -R/shared/toolchain//lib
 ld: fatal: file /lib/libcrypt.so: wrong ELF class: ELFCLASS32
 ld: fatal: File processing errors. No output written to .libs/radiusd
 collect2: ld returned 1 exit status
 
 Note that you above set '/lib' explicitly to be the first place for
 ld to look.  Try removing the '/lib' from the front of your LD_LIBRARY_PATH.
 
 -Chris
 --
 \\\|||///  \  StarNet Inc.  \ Chris Parker
 \ ~   ~ /   \   WX *is* Wireless!\   Director, Engineering
 | @   @ |\   http://www.starnetwx.net \  (847) 963-0116
 oOo---(_)---oOo--\--
\ Wholesale Internet Services - http://www.megapop.net
 
 


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Help! Can't compile rlm_sql_oracle on solaris

2003-02-05 Thread Chayim I. Kirshen
Hi there,

I'm trying to compile rlm_sql_oracle for solaris.  I've got the oracle9i
client installed and when linking I get an error because of the ELFCLASS
of the file.  I've printed the output of the make below.  Hopefully,
someone can help me!
Oh, I've got GNU make, the GCC, and am running Solaris 8i.  Thanks!

make[10]: Entering directory
`/export/home/chayim/freeradius/src/modules/rlm_sql/drivers/rlm_sql_oracle'
/export/home/chayim/freeradius/libtool --mode=link gcc -module
-export-dynamic  -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall
-D_GNU_SOURCE -DNDEBUG -I../.. -I../../../../include \
-I/export/home/chayim/oracle9i//rdbms/demo
-I/export/home/chayim/oracle9i//rdbms/public
-I/export/home/chayim/oracle9i//plsql/public
-I/export/home/chayim/oracle9i//network/public
-I/export/home/chayim/oracle9i//oci/include
-I/export/home/chayim/freeradius/libltdl -o rlm_sql_oracle.la -rpath
/shared/toolchain/stow/freeradius-0.8//lib sql_oracle.lo
-L/export/home/chayim/oracle9i//lib -lclntsh -lm
rm -fr .libs/rlm_sql_oracle.la .libs/rlm_sql_oracle.*
.libs/rlm_sql_oracle.*
/usr/ccs/bin/ld -G -h rlm_sql_oracle.so.0 -o
.libs/rlm_sql_oracle.so.0.0.0  sql_oracle.lo 
-L/export/home/chayim/oracle9i//lib -lclntsh -lm -lc 
ld: fatal: file /export/home/chayim/oracle9i//lib/libclntsh.so: wrong
ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to
.libs/rlm_sql_oracle.so.0.0.0


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Re: Help! Can't compile rlm_sql_oracle on solaris

2003-02-05 Thread Chris Parker
At 11:48 AM 2/5/2003 -0500, Chayim I. Kirshen wrote:

Hi there,

I'm trying to compile rlm_sql_oracle for solaris.  I've got the oracle9i
client installed and when linking I get an error because of the ELFCLASS
of the file.  I've printed the output of the make below.  Hopefully,
someone can help me!
Oh, I've got GNU make, the GCC, and am running Solaris 8i.  Thanks!


It looks like perhaps you have a 64-bit version of the oracle libs, but
you haven't told GCC to compile 64-bit versions of freeradius.

Either use a 32-bit version of Oracle, or tell GCC to compile in 64-bit
mode.  Getting GCC to compile 64-bit binaries is possible, though it
is a fairly involved process and not for the faint of heart ( you have
to bootstrap a 32bit compiler that can produce 64bit output, then build
a 64bit native compler ).

You could try telling './configure' that your host is: sparc64-sun-solaris2.8

-Chris
--
   \\\|||///  \  StarNet Inc.  \ Chris Parker
   \ ~   ~ /   \   WX *is* Wireless!\   Director, Engineering
   | @   @ |\   http://www.starnetwx.net \  (847) 963-0116
oOo---(_)---oOo--\--
  \ Wholesale Internet Services - http://www.megapop.net



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html