------- Comment #5 from mt1 at systella dot fr 2008-11-26 08:27 ------- (In reply to comment #4) > > There is no error on link stage, but gfortran tries to link program with 32 > > bits libraries, not with 64 bits one even I force -m64. > > Not quite. The binary is correctly linked against 64-bit libraries, but the > -R path is not set by default. You need to set it or set LD_LIBRARY_PATH: > > ([EMAIL PROTECTED]) ~ $ gfortran -m64 test.f90 > ([EMAIL PROTECTED]) ~ $ ./a.out > ld.so.1: ./a.out: fatal: > /nile.build/botcazou/gcc-head/install_sparc/lib/libgfortran.so.3: wrong ELF > class: ELFCLASS32 > Killed > ([EMAIL PROTECTED]) ~ $ gfortran -m64 test.f90 > -Wl,-R,/nile.build/botcazou/gcc-head/install_sparc/lib/sparcv9 > ([EMAIL PROTECTED]) ~ $ ./a.out > Hello, world > > ([EMAIL PROTECTED]) ~ $ gfortran -m64 test.f90 > ([EMAIL PROTECTED]) ~ $ ./a.out > ld.so.1: ./a.out: fatal: > /nile.build/botcazou/gcc-head/install_sparc/lib/libgfortran.so.3: wrong ELF > class: ELFCLASS32 > Killed > ([EMAIL PROTECTED]) ~ $ export > LD_LIBRARY_PATH=/nile.build/botcazou/gcc-head/install_sparc/lib/sparcv9 > ([EMAIL PROTECTED]) ~ $ ./a.out > Hello, world
Thanks a lot. I'm trying to build my project with LDFLAGS=-Wl,-R,/usr/shared-apps/lib/sparcv9 Is there any issue to direclty fix this mistake in gfortran sources ? Regards, JKB -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38268