我從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文件。幫幫我?
您是否嘗試過聯繫運行競爭的人?我確信他們以前會看到這個,並有具體的指示,但你可能不得不明確地要求他們。除此之外,錯誤信息會告訴您具體哪些標誌需要在構建庫時進行添加,以便在您的環境中進行鏈接 - 或者您可以嘗試請求庫的源代碼並在本地構建它,這會增加你有一個與你自己的代碼愉快地鏈接的版本的機率。 – keshlam
爲什麼你傳遞'libz.a'的直接路徑?如何使用'-lz'而不是'/ usr/lib/x86_64-linux-gnu/libz.a'? – ahmad