在Sun T2000(Solaris 10)上安装SU,笔者颇花费了一段时间,现将安装的辛苦历程记录如下,以待后来者参考。
一、makeinstall
出现问题:
cd ./cwp; make
cd include ; make
make: Fatal error in reader: Makefile, line11: Extra `:', `::', or `:=' on dependency line
Current working directory/xiaok/src/cwp/include
*** Error code 1
make: Fatal error: Command failed fortarget `INSTALL'
Current working directory /xiaok/src/cwp
*** Error code 1
make: Fatal error: Command failed fortarget `cwpstuff'
解决办法:
/usr/sfw/bin add into PATH
在文件中Makefile.config中
-CPP = /usr/ccs/lib/cpp
+CPP = cpp
-CC=/opt/SUNWspro/bin/cc
CC = gcc
-OPTC = -g -Xc -xc99
+OPTC = -O -DSUN
二、gmakeinstall
出现问题1:
Undefined first referenced
symbol in file
xdr_vector /xiaok/lib/libsu.a(fgettr.o)
xdr_float /xiaok/lib/libsu.a(fgettr.o)
xdr_u_int /xiaok/lib/libsu.a(xdrhdrsub.o)
xdrmem_create /xiaok/lib/libsu.a(fgettr.o)
xdr_int /xiaok/lib/libsu.a(xdrhdrsub.o)
ld: fatal: Symbol referencing errors. Nooutput written to /xiaok/bin/sucentsamp
collect2: ld returned 1 exit status
gmake[3]: [/xiaok/bin/sucentsamp] Error 1(ignored)
chmod: WARNING: can't access/xiaok/bin/sucentsamp
gmake[3]: *** [/xiaok/bin/sucentsamp] Error1
gmake[3]: Leaving directory`/xiaok/src/su/main/amplitudes'
gmake[2]: *** [INSTALL] Error 2
gmake[2]: Leaving directory`/xiaok/src/su/main'
gmake[1]: *** [INSTALL] Error 2
gmake[1]: Leaving directory `/xiaok/src/su'
gmake: *** [sustuff] Error 2
解决办法:
在Makefile.config文件中:
-POSTLFLAGS = -L/usr/ccs/lib -lgen
+POSTLFLAGS = -L/usr/sfw/lib -lgen -lnsl
出现问题2:
Undefined first referenced
symbol in file
isfinite /var/tmp//cc2J9fn5.o
ld: fatal: Symbol referencing errors. Nooutput written to /xiaok/bin/suphidecon
collect2: ld returned 1 exit status
gmake[3]: [/xiaok/bin/suphidecon] Error 1(ignored)
chmod: WARNING: can't access/xiaok/bin/suphidecon
gmake[3]: *** [/xiaok/bin/suphidecon] Error1
gmake[3]: Leaving directory`/xiaok/src/su/main/decon_shaping'
gmake[2]: *** [INSTALL] Error 2
gmake[2]: Leaving directory`/xiaok/src/su/main'
gmake[1]: *** [INSTALL] Error 2
gmake[1]: Leaving directory `/xiaok/src/su'
gmake: *** [sustuff] Error 2
解决办法:
in /usr/include/sys/feature_tests.h fileadd
/* add isfinite */
#define isfinite finite
gmake install successful
三、gmakextinstall
需要mesa(opengl)
下载mesa9.1.4,并安装,它需要:
1、下载安装libxml2 2.9.1,glproto 1.4.14,Xorg-macros 1.6.0,libdrm2.4.24,pthread-stubs,
2、下载安装 dri2proto2.6,它需要:X11-1.5.0 ,xext1.3.1,xdamage 1.1.3,xfixes 5.0,xcb 1.8.1,
3、安装X11-1.5.0,它需要keysymdef.h(系统已存在,重新定位),xproto7.0.17, xextproto7.2.1,xtrans 1.2.6, kbproto 1.0.6, inputproto 2.3, xcb 1.8.1
4、安装xcb 1.8.1,它需要Python 2.7.5, xcb-proto1.7, xau 0.99.2
出现问题1:
make install-am
make[2]: Entering directory `/xiaok/libxcb-1.8.1/src'
CC xcb_conn.lo
../libtool: bad substitution
make[2]: *** [xcb_conn.lo] Error 1
make[2]: Leaving directory `/xiaok/libxcb-1.8.1/src'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/xiaok/libxcb-1.8.1/src'
*** Error code 1
The following command caused the error:
fail= failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo install-recursive | seds/-recursive//`; \
list='src tests doc'; for subdir in $list;do \
echo "Making $target in $subdir"; \
iftest "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
AB else \
local_target="$target"; \
fi;\
(CDPATH="${ZSH_VERSION+.}:" && cd $subdir &&make $local_target) \
||eval $failcom; \
done; \
if test "$dot_seen" ="no"; then \
make "$target-am" ||exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed fortarget `install-recursive'
解决问题1:
(1)升级 make3.80 to 3.81,问题依然存在
(2)升级libtool 到2.4.2,出现问题2:
preopen.c bad substituon
the problem the same as xcb
解决问题2:
升级gcc 到 4.7.2,它需要gmp4.2.2,mpfr 2.4.0
安装gmp4.2.2:
configure
make install
make check
出现问题3:
ld: warning: file ../.libs/libgmp.so:linked to /xiaok/gmp-4.2.2/.libs/libgmp.so:attempted multiple inclusion of file
creating t-sub
make[4]: Leaving directory `/xiaok/gmp-4.2.2/tests'
make check-TESTS
make[4]: Entering directory `/xiaok/gmp-4.2.2/tests'
ld.so.1: t-bswap: fatal:/usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
Killed
FAIL: t-bswap
ld.so.1: t-constants: fatal:/usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
Killed
FAIL: t-constants
ld.so.1: t-count_zeros: fatal:/usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
Killed
FAIL: t-count_zeros
ld.so.1: t-gmpmax: fatal:/usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
Killed
FAIL: t-gmpmax
ld.so.1: t-hightomask: fatal:/usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
Killed
FAIL: t-hightomask
ld.so.1: t-modlinv: fatal:/usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
Killed
FAIL: t-modlinv
ld.so.1: t-popc: fatal:/usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
Killed
FAIL: t-popc
ld.so.1: t-parity: fatal:/usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
Killed
FAIL: t-parity
ld.so.1: t-sub: fatal:/usr/sfw/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
Killed
FAIL: t-sub
解决问题三:
增加环境变量:
C_INCLUDE_PATH=/usr/local/include:$C_INCLUDE_PATH
export C_INCLUDE_PATH
LIBRARY_PATH=/usr/local/lib:/usr/sfw/lib/64:$LIBRARY_PATH
export LIBRARY_PATH
LD_LIBRARY_PATH=$LIBRARY_PATH
export LD_LIBRARY_PATH
OBJECT_MODE=64
export OBJECT_MODE
成功安装gmp
接下来安装 mpfr 2.4.0
configure --with-gmp-build=/xiaok/gmp-4.2.2
make check
出现问题4:
Making check in tests
make[1]: Entering directory `/xiaok/mpfr-2.4.0/tests'
make libfrtests.la tversion tinternals tinits tisqrt tsgn tcheck tisnantexceptions tset_exp tset tabs tset_d tset_f tset_
q tset_si tset_str tset_z tset_ld tset_sjtswap tcopysign tcmp tcmp2 tcmpabs tcmp_d tcmp_ld tcomparisons teq tadd tsubtmul
tdivtsub1sp tadd1sp tadd_ui tsub_ui tcmp_ui tdiv_ui tmul_ui tsqrt_ui tui_divtui_sub tadd_d tsub_d td_sub tmul_d tdiv_d t
d_div tgmpop tsi_op tmul_2exp tfma tfmstsum tdim tminmax tnext tfits tget_d tget_d_2exp tget_z tget_str tget_sjtout_str t
inp_str toutimpl tcan_round tround_prectsqrt tconst_log2 tconst_pi tconst_euler trandom ttrunc trint tfrac tmodf texptexp
2 texp10 texpm1 tlog tlog2 tlog10 tlog1ptpow tui_pow tpow3 tcosh tsinh ttanh tsinh_cosh tacosh tasinh tatanhthyperbolic t
asin tacos tcos tatan tsin ttan tsin_costagm thypot tfactorial tgamma terf tcbrt tzeta mpf_compat mpfr_compat reusetsqr t
strtofr tpow_z tget_f tconst_catalan troottsec tcsc tcot teint tcoth tcsch tsech tstckintc tsubnormal tlngamma tlgammatze
ta_ui tget_ld_2exp tget_set_d64 tj0 tj1 tjnty0 ty1 tyn tremquo tfmod tl2b tli2 tprintf tsprintf tfprintf trec_sqrt tpow_al
l
make[2]: Entering directory `/xiaok/mpfr-2.4.0/tests'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_INTTYPES_H=1-DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LOCALE
_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1-DHAVE_SYS_TIME_H=1 -DHAVE_STDINT_H=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1-DHAVE
_LONG_LONG=1 -DHAVE_INTMAX_T=1-DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1-DHAVE_FLOOR=1 -DHAV
E_CEIL=1 -DHAVE_NEARBYINT=1-DHAVE_LDOUBLE_IEEE_QUAD_BIG=1 -DLT_OBJDIR=\".libs/\" -DHAVE_ATTRIBUTE_MODE=1-DMPFR_HAVE_GMP_I
MPL=1 -I.-I.. -I.. -I/xiaok/gmp-4.2.2-I/xiaok/gmp-4.2.2/tune -Wall-Wmissing-prototypes -Wpointer-arith -O2 -m64 -mptr6
4 -mcpu=ultrasparc -MT memory.lo -MD -MP-MF .deps/memory.Tpo -c -o memory.lo memory.c
/xiaok/mpfr-2.4.0/libtool:bad substitution
make[2]: *** [memory.lo] Error 1
make[2]: Leaving directory `/xiaok/mpfr-2.4.0/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/xiaok/mpfr-2.4.0/tests'
make: *** [check-recursive] Error 1
笔者不知道怎么解决,只能下载一个低版本的Mesa了。