Sun T2000(Solaris 10)上安装SU的历程(二)

来源:互联网 发布:知乎live内容怎么免费 编辑:程序博客网 时间:2024/05/19 10:35

一、下载安装mesaopengl6.4和glut6.4

make sunos5-gcc

出现问题1:

(cd configs && rm -f current&& ln -s sunos5-gcc current)

make default

make[1]: Entering directory`/xiaok/Mesa-6.4'

make[2]: Entering directory `/xiaok/Mesa-6.4/src'

Making sources for sunos5-gcc

make[3]: Entering directory `/xiaok/Mesa-6.4/src/mesa'

make[4]: Entering directory `/xiaok/Mesa-6.4/src/mesa'

make[5]: Entering directory`/xiaok/Mesa-6.4/src/mesa/x86'

make[5]: Nothing to be done for `default'.

make[5]: Leaving directory`/xiaok/Mesa-6.4/src/mesa/x86'

make[5]: Entering directory `/xiaok/Mesa-6.4/src/mesa/x86-64'

make[5]: Nothing to be done for `default'.

make[5]: Leaving directory `/xiaok/Mesa-6.4/src/mesa/x86-64'

mklib: Making SunOS shared library:  libGL.so

mklib: linker is gcc -G

ld: fatal: relocation error: R_SPARC_32:file sparc/clip.o: symbol <unknown>: offset 0x7a67ba11 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/clip.o: symbol <unknown>: offset 0x7a67ba17 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/clip.o: symbol <unknown>: offset 0x7a67ba1b is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/clip.o: symbol <unknown>: offset 0x7a67ba1f is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/norm.o: symbol <unknown>: offset 0x7a67ba5d is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/norm.o: symbol <unknown>: offset 0x7a67ba63 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/norm.o: symbol <unknown>: offset 0x7a67ba67 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/norm.o: symbol <unknown>: offset 0x7a67ba6b is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/xform.o: symbol <unknown>: offset 0x7a67baa9 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/xform.o: symbol <unknown>: offset 0x7a67baaf is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/xform.o: symbol <unknown>: offset 0x7a67bab3 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/xform.o: symbol <unknown>: offset 0x7a67bab7 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/glapi_sparc.o: symbol <unknown>: offset 0x7a67baf6 isnon-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/clip.o: symbol <unknown>: offset 0x7a8ac81a is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/xform.o: symbol <unknown>: offset 0x7a8acaae is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/glapi_sparc.o: symbol <unknown>: offset 0x7a8ad28b isnon-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/clip.o: symbol <unknown>: offset 0x7a927f56 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/norm.o: symbol <unknown>: offset 0x7a927f76 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/xform.o: symbol <unknown>: offset 0x7a927f96 is non-aligned

ld: fatal: relocation error: R_SPARC_32:file sparc/glapi_sparc.o: symbol <unknown>: offset 0x7a927fb6 isnon-aligned

collect2: ld returned 1 exit status

mklib: Installing libGL.so.1 libGL.so in../../lib

mv: cannot access libGL.so.1

make[4]: *** [../../lib/libGL.so] Error 2

make[4]: Leaving directory `/xiaok/Mesa-6.4/src/mesa'

make[3]: *** [default] Error 2

make[3]: Leaving directory `/xiaok/Mesa-6.4/src/mesa'

make[2]: *** [subdirs] Error 1

make[2]: Leaving directory `/xiaok/Mesa-6.4/src'

make[1]: *** [default] Error 1

make[1]: Leaving directory`/xiaok/Mesa-6.4'

make: *** [sunos5-gcc] Error 2

解决问题1:sunos5-gcc文件

将OPT_FLAGS  = -O3 -g -fomit-frame-pointer –pipe修改为

OPT_FLAGS = -O3 -gstabs -fomit-frame-pointer -pipe

make sunos5-gcc

make install

在bin/install文件中:

将cp${CP_FLAGS} ${TOP}/lib*/lib* ${LIB_DIR}

修改为

cp -f ${TOP}/lib*/lib* ${LIB_DIR}

 

二、gmakextinstall

三、gmakexminstall

四、gmakefinstall

五、gmakemglinstall

出现问题:

cd ./Mesa;gmake

gmake[1]: Entering directory`/xiaok/src/Mesa'

cd include ; gmake

gmake[2]: Entering directory`/xiaok/src/Mesa/include'

gmake[2]: `INSTALL' is up to date.

gmake[2]: Leaving directory`/xiaok/src/Mesa/include'

cd lib    ; gmake

gmake[2]: Entering directory`/xiaok/src/Mesa/lib'

gmake[2]: `INSTALL' is up to date.

gmake[2]: Leaving directory`/xiaok/src/Mesa/lib'

cd main   ; gmake

gmake[2]: Entering directory `/xiaok/src/Mesa/main'

gcc -I/xiaok/include -I/xiaok/include/MGL-I -I -I/usr/openwin/include -O -DSUN

-D_FILE_OFFSET_BITS=64-D_LARGEFILE64_SOURCE -DCWP_LITTLE_ENDIAN trip.c  -L/xiao

k/lib -L/usr/openwin/lib -L -L -lglut -lXmu-lXt -lSM -lICE -lXext -lXi -lX11 -l

m -lGL -lGLU -lglut -ltrack -lpar -lcwp -lm-L/usr/sfw/lib -lgen -lnsl    -o /xi

aok/bin/trip

In file included from trip.c:11:

/usr/local/include/GL/glut.h:531: error:syntax error before "glutInit"

/usr/local/include/GL/glut.h:539: error:syntax error before "glutInitDisplayMod

e"

/usr/local/include/GL/glut.h:541: error:syntax error before "glutInitDisplayStr

ing"

/usr/local/include/GL/glut.h:543: error:syntax error before "glutInitWindowPosi

tion"

/usr/local/include/GL/glut.h:544: error:syntax error before "glutInitWindowSize

"

/usr/local/include/GL/glut.h:545: error:syntax error before "glutMainLoop"

/usr/local/include/GL/glut.h:548: error:syntax error before "glutCreateWindow"

/usr/local/include/GL/glut.h:556: error:syntax error before "glutCreateSubWindo

w"

/usr/local/include/GL/glut.h:557: error:syntax error before "glutDestroyWindow"

/usr/local/include/GL/glut.h:558: error:syntax error before "glutPostRedisplay"

/usr/local/include/GL/glut.h:560: error:syntax error before "glutPostWindowRedi

splay"

/usr/local/include/GL/glut.h:562: error:syntax error before "glutSwapBuffers"

/usr/local/include/GL/glut.h:563: error:syntax error before "glutGetWindow"

/usr/local/include/GL/glut.h:564: error:syntax error before "glutSetWindow"

/usr/local/include/GL/glut.h:565: error:syntax error before "glutSetWindowTitle

"

/usr/local/include/GL/glut.h:566: error:syntax error before "glutSetIconTitle"

/usr/local/include/GL/glut.h:567: error:syntax error before "glutPositionWindow

"

/usr/local/include/GL/glut.h:568: error:syntax error before "glutReshapeWindow"

/usr/local/include/GL/glut.h:569: error:syntax error before "glutPopWindow"

/usr/local/include/GL/glut.h:570: error:syntax error before "glutPushWindow"

/usr/local/include/GL/glut.h:571: error:syntax error before "glutIconifyWindow"

/usr/local/include/GL/glut.h:572: error:syntax error before "glutShowWindow"

/usr/local/include/GL/glut.h:573: error:syntax error before "glutHideWindow"

gmake[2]: *** [/xiaok/bin/trip] Error 1

gmake[2]: Leaving directory`/xiaok/src/Mesa/main'

gmake[1]: *** [INSTALL] Error 2

gmake[1]: Leaving directory`/xiaok/src/Mesa'

gmake: *** [mglstuff] Error 2

解决问题:

修改 glut.h 文件的 196行

/*# define GLUTAPIENTRY GLAPIENTRY*/

# define GLUTAPIENTRY

六、gmakeutils   

七、测试

#suplane|suxwigb &

八、相关内容

安装mesa7.0

make sunos5-gcc

出现问题:

/bin/sh test :argument expected

解决问题:

make sunos5-gcc SHELL=bash

显示错误:

/glapi-sparc.s:Assemblermessages:Error:Undefined Symbol 'gloffset-idspatch stub_562' in operation

写一个新的配置文件sunos5-v9-cc-g++:

The config sunos5-v9-cc-g++ file contains:

************

# Configuration for SunOS 5, SPARC V9 andg++

 

include $(TOP)/configs/default

 

CONFIG_NAME = sunos5-v9

 

MKLIB_OPTIONS = -cplusplus

 

LIB_DIR = lib64

 

# Compiler and flags

CC = cc

CXX = g++

 

CXX_WARN_FLAGS = -Wall

CXX_PIC_FLAGS  = -fPIC

CXX_OPT_FLAGS  = -O3 -m64 -mcpu=ultrasparc -mv8plus -mvis -g-fomit-frame-pointer -pipe

CXX_ARCH_FLAGS = -m64

 

CXXFLAGS = $(CXX_WARN_FLAGS)$(CXX_OPT_FLAGS) $(CXX_PIC_FLAGS) $(CXX_ARCH_FLAGS) $(DEFINES) \

       -I/usr/openwin/include

 

CFLAGS = -xarch=v9 -KPIC -O-I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DPTHREADS

#CXXFLAGS = -xarch=v9 -KPIC -O-I/usr/openwin/include -I/usr/dt/include -DPTHREADS

GLUT_CFLAGS = -DSOLARIS_2_4_BUG

 

GL_LIB_DEPS = -L/usr/openwin/lib-L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm -lpthread

GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR)-l$(GL_LIB) -lm -lCstd -lCrun

GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR)-l$(GLU_LIB) -l$(GL_LIB) -lm

GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR)-l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11

APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lX11-l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) –lm

***********

make sunos5-v9-cc-g++

出现问题2:

mklib :error

g++:language arch=v9 not recongnized

笔者不知道怎么解决。

原创粉丝点击