From: Sharon L. <lu...@us...> - 2007-04-20 15:06:54
|
We don't currently provide STAF binaries for Solaris Sparc 64-bit simply=20 because we don't have a Solaris Sparc 64-bit machine to build and test=20 with (and because no one has requested this before). This is why I'm=20 assuming you're trying to build STAF yourself on a Solaris Sparc 64-bit=20 machine. STAF should be able to be built on a Solaris Sparc 64-bit=20 machine. Are you following the instructions in the STAF Developer's Guide = at http://staf.sourceforge.net/current/stafdg.html for how to build your=20 own version of STAF and setting OS=5FNAME=3Dsolaris? Did you make any changes to src/staf/build/makefile.solaris in order to=20 build on 64-bit Solaris Sparc? I don't know if any changes are necessary, = but there might be. Did you google for the error that your getting. I found many hits=20 searching for keywords: C++ compile Sparc 64-bit wrong ELF class:=20 ELFCLASS32 Here are a couple of postings that may be of interest to you. Please let=20 us know what changes worked for you as perhaps we could provide a STAF=20 makefile specifically for Sparc 64-bit (if changes are needed to build=20 STAF on it, e.g. compiler options like -m64 and/or setting=20 LD=5FLIBRARY=5FPATH=5F64, etc. so that others can build STAF. Also, then w= hen=20 we get access to a Sparc 64-bit machine, we could provide binaries for=20 STAF for it. I'm getting the following error, when i tried to compile my c++=20 application in 64-bit mode. ld: warning: file=20 /export/pasupule/build/yudit=5Fbuild/yudit=5F2=5F7=5F8/dist/libstdc++.a(del= =5Fop.o):=20 wrong ELF class: ELFCLASS32 I used "-m64 -mcpu=3Dv9" flags with the c++ compiler to build and also am=20 using two libraries which were built from 64-bit object files.=20 You have at least one 32-bit object in the set of files being linked. If=20 you run the "file" command on each .o file, you can find out which one it=20 is. Example: % file *.o a.o: ELF 64-bit MSB relocatable SPARCV9 Version 1 b.o: ELF 32-bit MSB relocatable SPARC32PLUS Version 1, V8+ Required c.o: ELF 64-bit MSB relocatable SPARCV9 Version 1 If you are linking an archive (.a), you will have to extract all the .o=20 files first. Example: % ar -x lib.a To compile for 64 bits on SPARC with Sun C++, use the option -xarch=3Dv9. The -m64 and -mcpu options are not Sun C++ options. If you are using some=20 other compiler, check the manual, or ask in a forum devoted to that=20 compiler.=20 ahh, didn't realize that the sparcv9 directory was for 64 bit ... makes sense though. setting LD=5FLIBRARY=5FPATH=5F64 fixed the problem ... thanks ... BTW, why doesn't GCC know to look where it installed them by default?? -Brad Albert Chin wrote: > On Tue, May 28, 2002 at 01:31:30PM -0400, Brad House wrote: >=20 >>I compiled GCC 3.1 on Solaris 8 using GCC 2.95.3 >>and the Solaris 8 default as and ld, not GNU binutils. >> >>Apparently a 64bit version of libstdc++ and libgcc=5Fs >>were not created at build time, so when I have a test >>program: >> >>#include <stdio.h> >>int main() { printf("hello world!\n"); return(0); } >> >>and force the C++ compiler to compile it (yes I know >>it's C code) in 64bit: >> >>g++ -m64 -o test test.c >> >>I get this when I run it: >> >># ./test >>ld.so.1: ./test: fatal: /usr/local/gcc/lib/libstdc++.so.4: wrong ELF=20 >>class: ELFCLASS32 >>Killed >=20 >=20 > I get the following error (on Solaris 7): > $ ./a.out > ld.so.1: ./a.out: fatal: libstdc++.so.4: open failed: No such file > or directory >=20 > I solved this with: > $ g++ -m64 -R[path to gcc31]/lib/sparcv9 test.c >=20 > Do you have LD=5FLIBRARY=5FPATH or LD=5FLIBRARY=5FPATH=5F64 set? >=20 Note: In the future, only post to one mailing list please, as we monitor=20 all of them. -------------------------------------------------------------- Sharon Lucas IBM Austin, lu...@us... (512) 838-8347 or Tieline 678-8347 "Rohit Omar" <Rohit=5F...@sy...>=20 Sent by: sta...@li... 04/20/2007 08:34 AM To <sta...@li...>, <sta...@li...> cc Subject [staf-users] libSTAF.so problem with sparc 64-bit binaries Hi =20 Please tell me what about sparc 64 bit binaries support As I am trying to build with 64 ?bit binaries I am getting following=20 error =20 /usr/local/staf/lib/libSTAF.so: wrong ELF class:=20 ELFCLASS32 =20 I think this is due to 32-binaries of staf Please help me ASAP =20 =20 Regards Rohit =20 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F staf-users mailing list sta...@li... https://lists.sourceforge.net/lists/listinfo/staf-users |