系统debian 6.0 内核linux 2.6.32-5-amd64,gnome 2.30.2。gmlive 0.22.2。装了gmlive没频道,只好编译gmlive-extra-0.3。出现如下错误
root@debian:/home/xiaomao/gmlive-extra-0.3# ./install.sh
lib/
lib/libppsbase.so
lib/libppsapi.so.0.1.826
lib/libppsbase.so.0.1.826
lib/libppssg.so.0.1.826
lib/libppssg.so
lib/libppsvodres.so.0.1.826
lib/libppsvodres.so.0
lib/libppsapi.so
lib/libppsfds.so
lib/libppsfds.so.0.1.826
lib/libppsapi.so.0
lib/libppssg.so.0
lib/libppsvodnet.so
lib/libppsvodres.so
lib/libppsvodnet.so.0.1.826
lib/libppsbase.so.0
lib/libppsfds.so.0
lib/libppsvodnet.so.0
g++ -O2 -g -m32 -c -o xpps.o xpps.cc
g++ -O2 -g -m32 -c -o ec_throw.o ec_throw.cc
g++ -O2 -g -m32 -o xpps xpps.o ec_throw.o -m32 -L./lib -lppsbase -lppssg -lppsapi -lppsvodres -lppsfds -lppsvodnet
gcc -shared -Wl,-ldl -o libppswrapper-preload.so.0.0.0 ppswrapper-msgget.c
/usr/bin/ld: /tmp/ccGkHRr9.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/ccGkHRr9.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libs] 错误 1
cp xpps /usr/bin/
mv libppswrapper-preload.* /usr/lib/
mv: 无法获取"libppswrapper-preload.*" 的文件状态(stat): 没有那个文件或目录
make: *** [install] 错误 1
百度,谷歌了好久,自己解决不了,貌似要改源码。C基本白痴。有高手指教下。下面是MAKEFILE内容
#add path to pps libraries here
LIB_PPS=./lib
COMPILE_MODE=1
CXX=g++
CXXFLAGS=-O2 -g -m32
CFLAGS=-O2 -g -m32
LDFLAGS=-m32 -L$(LIB_PPS) -lppsbase -lppssg -lppsapi -lppsvodres -lppsfds -lppsvodnet
OBJFILE=xpps
OBJECTS=xpps.o ec_throw.o
all:$(OBJFILE) libs
xpps:$(OBJECTS)
$(CXX) $(CXXFLAGS) -o $(OBJFILE) $(OBJECTS) $(LDFLAGS)
.c.o:
gcc $(CFLAGS) -c -o $@ $<
.cc.o:
g++ $(CXXFLAGS) -c -o $@ $<
libs:ppswrapper-msgget.c
gcc -shared -Wl,-ldl -o libppswrapper-preload.so.0.0.0 ppswrapper-msgget.c
ln -s libppswrapper-preload.so.0.0.0 libppswrapper-preload.so.0.0
ln -s libppswrapper-preload.so.0.0 libppswrapper-preload.so.0
ln -s libppswrapper-preload.so.0 libppswrapper-preload.so
clean:
rm -rf *.so* *.o xpps
install:
cp xpps /usr/bin/
mv libppswrapper-preload.* /usr/lib/