re: Help! Can't compile rlm_sql_oracle on solaris
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
re: Help! Can't compile rlm_sql_oracle on solaris
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
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 ' where is the rlm_sql.o > file and the oracle lib that isn't working? > > Also, please list the output of 'ldd ' where 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
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 ' where is the rlm_sql.o file and the oracle lib that isn't working? Also, please list the output of 'ldd ' where 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
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
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