简体   繁体   English

编译时出错

[英]Error during compilation

I downloaded a software framework from the Data Prefetching Championship website ( http://www.jilp.org/dpc/ ) and installed on a computer with the Ubuntu OS, 64 bit. 我从数据预取冠军网站( http://www.jilp.org/dpc/ )下载了一个软件框架,并安装在装有64位Ubuntu OS的计算机上。 I followed all of the instructions for unpacking the compressed file, and entered the "make" command to compile and this is what I received: 我遵循了有关解压缩压缩文件的所有说明,并输入了“ 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

The problem, I believe, is with the libz.a file. 我相信问题出在libz.a文件。 Help? 救命?

我不知道如何编译该应用程序,但是应该将-fPIC添加到C / C ++文件的编译标志(CFLAGS和CXXFLAGS)中,然后重新编译该应用程序。

I also faced same problem mentions above but I am able to solved it with scientific linux 5.4 with gcc 4.1 configuration and I did one mistake when we have to set path up to prefetch kit. 我也遇到了上面提到的相同问题,但是我可以使用带有gcc 4.1配置的科学linux 5.4来解决它,当我们必须设置预取套件的路径时,我犯了一个错误。 There was '$' sign which we have to remove while setting path for that PREF_KIT 在设置该PREF_KIT的路径时,必须删除“ $”符号

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM