Building 64-bit mathopd on SUN UltraSPARC platforms?

"Peter L. Mogan" <[email protected]> Sun, 19 Nov 2006 20:41:39 -0800 (PST)
Newsgroups gmane.network.mathopd
Message-ID <[email protected]>
Hello,

Heeding the warnings given in
http://www.mathopd.org/wiki?SolarisStdio 
"SolarisSTDIO", after using a 32 bit mathopd build for
a while, I decided to attempt to build a 64 bit
version
using the SUN Studio 11 C compiler with patch
120760-06.

More host/OS info:

$ uname -a
SunOS teaball 5.9 Generic_118558-28 sun4u sparc
SUNW,UltraAX-i2

Build result:

# make
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H base64.c -o base64.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H cgi.c -o cgi.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H config.c -o config.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H core.c -o core.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H dump.c -o dump.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H imap.c -o imap.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H log.c -o log.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H main.c -o main.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H redirect.c -o
redirect.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H request.c -o request.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H util.c -o util.o
/opt/SUNWspro/bin/cc -c -Xa -fast -native -xstrconst
-mt -xarch=v9 -xcache=16/32/1:256/64/4 -xchip=ultra2e
-DNEED_INET_ATON -DHAVE_CRYPT_H stub.c -o stub.o
/opt/SUNWspro/bin/cc -R/usr/local/lib -s -o mathopd
base64.o cgi.o config.o core.o dump.o imap.o log.o
main.o  redirect.o request.o util.o stub.o
-L/usr/lib/sparcv9 -lsocket -lnsl
ld: fatal: file base64.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written
to mathopd
*** Error code 1
make: Fatal error: Command failed for target `mathopd'

As far as I can see, all object codes are 64 bit, e.g.
$ file base64.o   
base64.o:       ELF 64-bit MSB relocatable SPARCV9
Version 1

I specified 64 external libs too using the
-L/usr/lib/sparcv9.

$ cd /usr/lib/sparcv9
$ file libsocket.so
libsocket.so:   ELF 64-bit MSB dynamic lib SPARCV9
Version 1, dynamically linked, not stripped

So, I am quite puzzled why the build is not
successful, and would appreciate any hints/tips from
anyone who has done it successfully.  

Thanks,

--Peter