Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error: gcc-X.Y: No such file or directory #33

Open
apanqasem opened this issue Jun 21, 2019 · 6 comments
Open

build error: gcc-X.Y: No such file or directory #33

apanqasem opened this issue Jun 21, 2019 · 6 comments

Comments

@apanqasem
Copy link

I am getting an error when I do make. It appears to be looking for a directory gcc-X.Y where X.Y is the gcc version number.

If I cmake without any arguments it looks for a directory gcc-4.9.
If I specify
cmake -DGPU_ARCH:STRING=50 -DGCC_CUDA_VERSION:STRING=gcc-7.4.0 ./
(gcc 7.4.0 is what I have in my system)
It complains about not finding gcc-7.4.0

@zhjw1998
Copy link

I am getting an error when I do make. It appears to be looking for a directory gcc-X.Y where X.Y is the gcc version number.

If I cmake without any arguments it looks for a directory gcc-4.9.
If I specify
cmake -DGPU_ARCH:STRING=50 -DGCC_CUDA_VERSION:STRING=gcc-7.4.0 ./
(gcc 7.4.0 is what I have in my system)
It complains about not finding gcc-7.4.0

Hava you solved this problem?

@zhjw1998
Copy link

zhjw1998 commented Jul 29, 2021

Change gcc-4.9 to gcc in CMakeLists.txt
SET(GCC_CUDA_VERSION "gcc" CHANE STRING " ...")
but i have got another error

Scanning dependencies of target cuHEShared [ 69%] Linking CXX shared library libcuHEShared.so /usr/bin/ld: /usr/local/lib/libntl.a(ZZ.o): relocation R_X86_64_TPOFF32 against_ZN3NTLL8iodigitsE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(ZZX.o): relocation R_X86_64_TPOFF32 against _ZZN3NTL8PlainSqrEPNS_2ZZEPKS0_lE36_ntl_hidden_variable_tls_local_ptr_t' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(ZZX1.o): relocation R_X86_64_TPOFF32 against _ZZN3NTL8SetCoeffERNS_3ZZXEllE37_ntl_hidden_variable_tls_local_ptr_aa' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(ZZ_p.o): relocation R_X86_64_TPOFF32 against _ZZN3NTLL44_ntl_hidden_function_tls_access_ZZ_pInfo_stgEvE47_ntl_hidden_variable_tls_local_ptr_ZZ_pInfo_stg' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(ZZ_pX.o): relocation R_X86_64_TPOFF32 against _ZZZN3NTLL13MulByXModAux1ElPNS_4ZZ_pEPKS0_S3_RS2_ENKUlllE_clEllE36_ntl_hidden_variable_tls_local_ptr_t' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(ZZ_pX1.o): relocation R_X86_64_TPOFF32 against _ZZZN3NTL12InnerProductERNS_5ZZ_pXERKNS_3VecINS_4ZZ_pEEEllRKNS2_IS0_EElRNS_5ZZVecEENKUlllE_clEllE36_ntl_hidden_variable_tls_local_ptr_s' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(fileio.o): relocation R_X86_64_TPOFF32 against _ZZN3NTL8UniqueIDB5cxx11EvE37_ntl_hidden_variable_tls_local_ptr_ID' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): relocation R_X86_64_TPOFF32 against _ZZ10_ntl_gswapPP17_ntl_gbigint_bodyS1_E36_ntl_hidden_variable_tls_local_ptr_t' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(lzz_p.o): relocation R_X86_64_TPOFF32 against _ZZN3NTLL44_ntl_hidden_function_tls_access_zz_pInfo_stgEvE47_ntl_hidden_variable_tls_local_ptr_zz_pInfo_stg' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(lzz_pX1.o): relocation R_X86_64_TPOFF32 against symbol _ZN3NTL13zz_pXArgBoundE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(mat_ZZ_p.o): relocation R_X86_64_TPOFF32 against _ZZN3NTL3mulERNS_3MatINS_4ZZ_pEEERKS2_RKS1_E36_ntl_hidden_variable_tls_local_ptr_b' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(mat_lzz_p.o): relocation R_X86_64_TPOFF32 against _ZZN3NTL3mulERNS_3VecINS_4zz_pEEERKS2_RKNS_3MatIS1_EEE46_ntl_hidden_variable_tls_local_ptr_mul_aux_vec' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(tools.o): relocation R_X86_64_TPOFF32 against symbol _ZN3NTL16ErrorMsgCallbackE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(vec_ZZ_p.o): relocation R_X86_64_TPOFF32 against _ZZN3NTL12InnerProductERNS_4ZZ_pERKNS_3VecIS0_EES5_E40_ntl_hidden_variable_tls_local_ptr_accum' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(thread.o): relocation R_X86_64_TPOFF32 against _ZZN3NTL15CurrentThreadIDB5cxx11EvE37_ntl_hidden_variable_tls_local_ptr_ID' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(BasicThreadPool.o): relocation R_X86_64_TPOFF32 against _ZZN3NTLL49_ntl_hidden_function_tls_access_NTLThreadPool_stgEvE52_ntl_hidden_variable_tls_local_ptr_NTLThreadPool_stg' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(FFT.o): relocation R_X86_64_TPOFF32 against _ZZN3NTLL39_ntl_hidden_function_tls_access_mul_vecEvE42_ntl_hidden_variable_tls_local_ptr_mul_vec' can not be used when making a shared object; recompile with -fPIC
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/cuHEShared.dir/build.make:184:libcuHEShared.so] 错误 1
make[1]: *** [CMakeFiles/Makefile2:106:CMakeFiles/cuHEShared.dir/all] 错误 2
make: *** [Makefile:84:all] 错误 2
`

@mstc-xqp
Copy link

gitsE' can not be used when making a shared object; recompile with -fPIC

我也是这样 您解决了吗啊

@zhjw1998
Copy link

gitsE' can not be used when making a shared object; recompile with -fPIC

我也是这样 您解决了吗啊

是没有安装NTL库的原因,cuHE需要NTL依赖,安装之后就没错了。NTL网站:https://libntl.org/doc/tour-gmp.html

@p719967821
Copy link

p719967821 commented May 15, 2024

gitsE' can not be used when making a shared object; recompile with -fPIC

我也是这样 您解决了吗啊

是没有安装NTL库的原因,cuHE需要NTL依赖,安装之后就没错了。NTL网站:https://libntl.org/doc/tour-gmp.html

请问下,我安装好了NTL的库,但是为什么仍然出现这个问题呢

屏幕截图 2024-05-15 220301 屏幕截图 2024-05-15 220709

@p719967821
Copy link

gitsE' can not be used when making a shared object; recompile with -fPIC

我也是这样 您解决了吗啊

是没有安装NTL库的原因,cuHE需要NTL依赖,安装之后就没错了。NTL网站:https://libntl.org/doc/tour-gmp.html

请问下,我安装好了NTL的库,但是为什么仍然出现这个问题呢

屏幕截图 2024-05-15 220301 屏幕截图 2024-05-15 220709

解决了,是因为ntl编译的时候没有加上-fPIC,所以重新在ntl的makefile文件中-fPIC即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants