0

When trying to build zlib-1.2.5 (or the latest, 1.2.7) on a Solaris-10 sparc machine, I get:

Relevant env. vars:

export CFLAGS="-m64 -O4"
export CXXFLAGS="-m64 -O4"
export CC="cc"
export CXX="CC"

Output of building:

Checking for shared library support...
Building shared library libz.so.1.2.7 with cc.
Checking for off64_t... Yes.
....
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Looking for a four-byte integer type... Found.
cc -m64 -O4 -D_LARGEFILE64_SOURCE=1 -I. -c -o example.o test/example.c
cc -m64 -O4 -D_LARGEFILE64_SOURCE=1   -c -o adler32.o adler32.c
.... stripped a few lines
cc -m64 -O4 -D_LARGEFILE64_SOURCE=1   -c -o gzwrite.o gzwrite.c
ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
cc -m64 -O4 -D_LARGEFILE64_SOURCE=1 -o example example.o -L. libz.a
.... stripped a few lines
cc -G -h libz.so.1 -m64 -O4 -D_LARGEFILE64_SOURCE=1 -o libz.so.1.2.7 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc
ld: fatal: relocation error: R_SPARC_H44: file crc32.lo: symbol <unknown>: relocations based on the ABS44 coding model can not be used in building a shared object
make: *** [libz.so.1.2.7] Error 1
mabarroso
  • 659
  • 2
  • 11
  • 23
user1838696
  • 31
  • 1
  • 4

1 Answers1

0

I found the answer by now: Use option -xcode=pic32

user1838696
  • 31
  • 1
  • 4