【发布时间】:2013-08-25 14:02:48
【问题描述】:
我的机器(Ubuntu 12.04)上安装了MPICH 3.0.4。我正在尝试安装一个名为Qthreads 的库,我之前使用过并成功安装过它(安装了 MPICH2 包除外)。配置工作正常:
./configure --prefix=/usr/local/qthreads --enable-multinode --with-multinode-runtime=mpi --with-portals4=/usr/local/portals4 --with-hwloc=/usr/local/hwloc:
...
...
...
System Characteristics:
Target Style: unix
Multi-node: yes, mpi
Topology API: hwloc
Qtimer type: clock_gettime
Aligned_t size: 8 (aligned on 8 byte boundaries)
Default Stack size: 4kB
Safety/Debugging:
Sanity assert()s: no
Check alignment: no
Profiling: none
Debugging Output: no
Guard Pages: no
Speed:
Scheduler: sherwood (multiworker shepherds)
Sinc Style: donecount
Barrier Style: feb
Dictionary Style: simple
Lazy Thread IDs: yes
Pools/caches: memory, spawns
RCRTool: no
Increments/CAS/FEBs: Compiler Builtin (both), lock-based hash
当我尝试运行 make 时,我收到以下错误:
...
...
...
CCLD libqthread.la
/usr/bin/ld: /usr/local/lib/libmpich.a(barrier.o): relocation R_X86_64_32 against `MPIR_ThreadInfo' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libmpich.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libqthread.la] Error 1
make[2]: Leaving directory `/home/alex/Downloads/qthread-1.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alex/Downloads/qthread-1.9/src'
make: *** [all-recursive] Error 1
我有looked around,似乎显而易见的(也是唯一可能的)解决方案是按照编译器所说的去做:使用-fPIC 重新编译。但是,我很犹豫是否要为 Qthreads 编辑任何 Makefile,因为它们又长又复杂。有没有用-fPIC 重新编译的简单方法?
请指教。我很感激任何意见。
【问题讨论】:
标签: makefile mpi configure relocation