GMP install on Sun architecture - problems

Nathan Moore nmoore at
Wed Jul 7 21:52:55 CEST 2004

Have had a lot of trouble getting the GMP package to work with Solaris. 
  Working on a Sunblade 2000 workstation, w/ UltraSparc3, and Solaris 8. 
  The library is installed per the auto config script.  With makefile,
- - - - -
nmoore at s1 [~/ccode/sun/cond_P] % cat Makefile
CFLAGS=-I/usr/local/GMP2  -xarch=v9
LDFLAGS=-lm -library=sunperf -L/usr/local/GMP2/lib -lgmp
SRCS=KnotAnalyzer.cpp KnotAnalyzer2.cpp KnotAnalyzer3.cpp 
KnotAnalyzer4.cpp  gmp-test.cpp
OBJS=KnotAnalyzer.o KnotAnalyzer2.o KnotAnalyzer3.o KnotAnalyzer4.o  
HDRS=KnotAnalyzer.h macros.h old_macros.h MyTypes.h

$(OBJS): $(SRCS) $(HDRS)
         $(CC) $(CFLAGS) -c $*.cpp

a.out: $(OBJS)
         $(CC) $(LDFLAGS) -o $@ $(OBJS)

         -rm a.out *.o
- - - - -
I see persistent error,
- - - - -
nmoore at s1 [~/ccode/sun/cond_P] % make
CC -I/usr/local/GMP2  -xarch=v9 -c KnotAnalyzer.cpp
CC -I/usr/local/GMP2  -xarch=v9 -c KnotAnalyzer2.cpp
CC -I/usr/local/GMP2  -xarch=v9 -c KnotAnalyzer3.cpp
CC -I/usr/local/GMP2  -xarch=v9 -c KnotAnalyzer4.cpp
CC -I/usr/local/GMP2  -xarch=v9 -c gmp-test.cpp
CC -lm -library=sunperf -L/usr/local/GMP2/lib -lgmp -o a.out 
KnotAnalyzer.o KnotAnalyzer2.o KnotAnalyzer3.o KnotAnalyzer4.o  
ld: fatal: file /usr/local/GMP2/lib/ wrong ELF class: 
ld: fatal: file KnotAnalyzer.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to a.out
*** Error code 1
make: Fatal error: Command failed for target `a.out'
  - - - - -
Anyone on the list know what "ELFCLASS64" refers to?  I can't find a 


NT Moore
U of Minnesota Physics

More information about the gmp-discuss mailing list