2014-02-20 105 views
1

我从Data Prefetching Championship网站(http://www.jilp.org/dpc/)下载了一个软件框架,并安装在64位Ubuntu操作系统的计算机上。我跟所有的备解压缩文件中的指令,并进入了“make”命令编译,这是我收到的:编译期间出错

g++ -Wl,-u,main -g -shared -Wl,-Bsymbolic -Wl,--version-script=/grads/hhoffman/Documents/ELE_591/PREF_KIT/pin-2.5-22247-gcc.4.0.0-ia32_intel64-linux/source/include/pintool.ver -L/grads/hhoffman/Documents/ELE_591/PREF_KIT/pin-2.5-22247-gcc.4.0.0-ia32_intel64-linux/Lib/ -L/grads/hhoffman/Documents/ELE_591/PREF_KIT/pin-2.5-22247-gcc.4.0.0-ia32_intel64-linux/ExtLib/ -L/grads/hhoffman/Documents/ELE_591/PREF_KIT/pin-2.5-22247-gcc.4.0.0-ia32_intel64-linux/extras/xed2-intel64/lib -L/grads/hhoffman/Documents/ELE_591/PREF_KIT/pin-2.5-22247-gcc.4.0.0-ia32_intel64-linux/intel64/lib -L/grads/hhoffman/Documents/ELE_591/PREF_KIT/pin-2.5-22247-gcc.4.0.0-ia32_intel64-linux/intel64/lib-ext -o bin/CMPsim.usetrace ./bin/libCMPsim64.a ./src/prefetch/sample_prefetcher.o -lpin -lxed -ldwarf -lelf -ldl /usr/lib/x86_64-linux-gnu/libz.a 
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libz.a(gzio.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC 
/usr/lib/x86_64-linux-gnu/libz.a: could not read symbols: Bad value 
collect2: ld returned 1 exit status 
make: *** [CMPsimpref64] Error 1 

的问题,我相信,与libz.a文件。帮帮我?

+0

您是否尝试过联系运行竞争的人?我确信他们以前会看到这个,并有具体的指示,但你可能不得不明确地要求他们。除此之外,错误信息会告诉您具体哪些标志需要在构建库时进行添加,以便在您的环境中进行链接 - 或者您可以尝试请求库的源代码并在本地构建它,这会增加你有一个与你自己的代码愉快地链接的版本的几率。 – keshlam

+0

为什么你传递'libz.a'的直接路径?如何使用'-lz'而不是'/ usr/lib/x86_64-linux-gnu/libz.a'? – ahmad

回答

2

我不知道你是怎么编译这个应用程序,但你应该添加-fPIC到的C/C++文件编译选项(CFLAGS和CXXFLAGS),并重新编译应用程序。

0

我也面临同样的问题,上面提到,但我能与科学版Linux 5.4GCC解决它4.1配置和我做了一个错误,当我们要设置路径可达预取包。有'$'签名,我们必须删除,同时设置该PREF_KIT的路径