CornerNet icon indicating copy to clipboard operation
CornerNet copied to clipboard

【Two situations】 When compiling 'corner pooling layers': (1) collect2: fatal error: cannot find 'ld' compilation terminated. (2) unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory.

Open Haonan-Qin opened this issue 5 years ago • 1 comments

I tried to run the code in two different environment but failed. BTW, my linux environment is offline.

【1】The environment is: (0) Ubuntu 16.04 (1) Anaconda python 3.6.2 (GCC 7.2.0) (2) PyTorch 0.4.1 (3) gcc -v --> 5.4.0 (4) CUDA 9.0.176 【ERROR】: ... !! WARNING !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your compiler (x86_64-conda_cos6-linux-gnu-c++) may be ABI-incompatible with PyTorch! Please use a compiler that is ABI-compatible with GCC 4.9 and above. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html. See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6 for instructions on how to install GCC 4.9 or higher. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! WARNING !! warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler)) building 'top_pool' extension creating build creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src x86_64-conda_cos6-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -fPIC -I/home/qinhaonan/.local/lib/python3.6/site-packages/torch/lib/include -I/home/qinhaonan/.local/lib/python3.6/site-packages/torch/lib/include/TH -I/home/qinhaonan/.local/lib/python3.6/site-packages/torch/lib/include/THC -I/opt/anaconda3/include/python3.6m -c src/top_pool.cpp -o build/temp.linux-x86_64-3.6/src/top_pool.o -DTORCH_EXTENSION_NAME=top_pool -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 ... creating build/lib.linux-x86_64-3.6 x86_64-conda_cos6-linux-gnu-c++ -pthread -shared -Wl,-O2,--sort-common,--as-needed,-z,relro,-z,now -Wl,-rpath,/opt/anaconda3/lib -L/opt/anaconda3/lib -Wl,-O2,--sort-common,--as-needed,-z,relro,-z,now -Wl,-rpath,/opt/anaconda3/lib -L/opt/anaconda3/lib build/temp.linux-x86_64-3.6/src/top_pool.o -L/opt/anaconda3/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/top_pool.cpython-36m-x86_64-linux-gnu.so collect2: fatal error: cannot find 'ld' compilation terminated. error: command 'x86_64-conda_cos6-linux-gnu-c++' failed with exit status 1

【2】The environment is: (0) Ubuntu 16.04 (1) Anaconda python 3.6.2 (GCC 7.2.0) (2) PyTorch 0.4.0 (3) gcc -v --> 4.8.5 (4) CUDA 8.0.61 【ERROR】: ... !! WARNING !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your compiler (x86_64-conda_cos6-linux-gnu-c++) may be ABI-incompatible with PyTorch! Please use a compiler that is ABI-compatible with GCC 4.9 and above. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html. See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6 for instructions on how to install GCC 4.9 or higher. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! WARNING !! warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler)) building 'top_pool' extension x86_64-conda_cos6-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -fPIC -I/apps/jhinno/users/IMGLAB/4003/.local/lib/python3.6/site-packages/torch/lib/include -I/apps/jhinno/users/IMGLAB/4003/.local/lib/python3.6/site-packages/torch/lib/include/TH -I/apps/jhinno/users/IMGLAB/4003/.local/lib/python3.6/site-packages/torch/lib/include/THC -I/opt/anaconda3/include/python3.6m -c src/top_pool.cpp -o build/temp.linux-x86_64-3.6/src/top_pool.o -DTORCH_EXTENSION_NAME=top_pool -std=c++11 unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory error: command 'x86_64-conda_cos6-linux-gnu-gcc' failed with exit status 1

Haonan-Qin avatar May 27 '19 01:05 Haonan-Qin

I have meeted the same problem. I have solved this. try "rm conda/envs/CenterNet/compiler_compat/ld"

cosen1024 avatar Dec 21 '19 08:12 cosen1024