0

当尝试在Solaris-10 sparc机器上构建zlib-1.2.5(或最新的 1.2.7)时,我得到:

相关环境 变量:

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

建筑输出:

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
4

1 回答 1

0

我现在找到了答案:使用选项 -xcode=pic32

于 2012-11-29T10:05:24.587 回答