compiling 64 bit binaries on AMD64
807575Mar 8 2005 — edited Mar 12 2005I have various AMD64 cpu machines which I intend to us as nodes in an ethernet cluster (to use MPI) WHEN I can get my programmes to compile to 64 bit code.
I enclose the output from make for a simple molecular dynamics simulation:
CC -g -I/usr/include/amd64 -I/usr/include -xarch=amd64 -64 -c moldyn.cpp
CC: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise
"physics.h", line 337: Warning: tau hides Slab::tau.
1 Warning(s) detected.
CC -g -I/usr/include/amd64 -I/usr/include -xarch=amd64 -64 -c gasdev.cpp
CC: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise
CC -g -I/usr/include/amd64 -I/usr/include -xarch=amd64 -64 -c ran2.cpp
CC: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise
CC -g -I/usr/include/amd64 -I/usr/include -xarch=amd64 -64 -c phys.cpp
CC: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise
"physics.h", line 337: Warning: tau hides Slab::tau.
1 Warning(s) detected.
CC -g -I/usr/include/amd64 -I/usr/include -xarch=amd64 -64 -c bessk1.cpp
CC: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise
CC -g -I/usr/include/amd64 -I/usr/include -xarch=amd64 -64 -c bessi1.cpp
CC: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise
CC -64 -o moldyn moldyn.o gasdev.o ran2.o phys.o bessk1.o bessi1.o
CC: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise
ld: fatal: file moldyn.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to moldyn
*** Error code 1
make: Fatal error: Command failed for target `moldyn'
how can I follow up and correct the ld error? I have spent several days combing through the SUNWspro documentation. I would greatly appreciate any hints