64位编译选项-shared -fPIC

我在32位编译没有出现以下错误,64位的编译,编译情况如下:
gcc -shared -fpic -pthread -I/root/proj/ipc_manager-11-3/include ....(省略)

/usr/bin/ld: common/ipc.o: relocation R_X86_64_32S against `cmd_handler' can not be used when making a shared object; recompile with -fPIC
common/ipc.o: could not read symbols: Bad value
collect2: ld 返回 1
make: *** [libipc.so] 错误 1

你是不是用到了库不支持64位。

具体用了那些库不是很清晰,头文件就用了这些:
#include
#include
#include
#include
#include
#include
#include
#include
#include

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
之前尝试过安装如下的库:
faac-devel lame-devel amrnb-devel opencore-amr-devel amrwb-devel libvorbis-devel libtheora-devel xvidcore-devel
gcc gcc-c++ openssl-devel zlib-devel pcre pcre-devel yamdi

#gcc -v 查看的信息
使用内建 specs。
目标:x86_64-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
线程模型:posix
gcc 版本 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)

头文件

































stdint.h

stdlib.h

string.h

assert.h

time.h

string.h

ctype.h

stdio.h

stdarg.h

sys/types.h

sys/stat.h

fcntl.h

malloc.h

math.h

signal.h

unistd.h

pthread.h

semaphore.h

string.h

stdlib.h

sys/ipc.h

sys/msg.h