This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 3.1 -- Sparc64 Solaris 8 and C++


ahh, didn't realize that the  sparcv9 directory was for 64 bit ...
makes sense though.

setting LD_LIBRARY_PATH_64 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:
> 
>>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_s
>>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 
>>class: ELFCLASS32
>>Killed
> 
> 
> 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
> 
> I solved this with:
>   $ g++ -m64 -R[path to gcc31]/lib/sparcv9 test.c
> 
> Do you have LD_LIBRARY_PATH or LD_LIBRARY_PATH_64 set?
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]