Open edikedik opened 4 years ago
I am also having this issue. I have tried installing from a fresh environment, both from pip and from install.sh but nothing seems to work.
file not recognized: file format not recognized collect2: error: ld returned 1 exit status error: command 'g++' failed with exit status 1
Hello,
Attempting to
pip install pydca
into freshly created conda environment fails on Linux due tobuild/temp.linux-x86_64-3.5/pydca/plmdca/lbfgs/lib/lbfgs.o: file not recognized: file format not recognized collect2: ld returned 1 exit status error: command 'g++' failed with exit status 1
I have gcc 10.1.0-2.
I have resolved the issue, the answer is practically the same as here (solved): https://github.com/pytorch/pytorch/issues/16683
In summary:
python setup.py clean
cd ~/miniconda3/envs/ENV_NAME/compiler_compat/
, else if using Anaconda: run ~/anaconda/envs/ENV_NAME/compiler_compat/
mv ld ld_old
bash install.sh
This should fix any issues with GCC compilation. The issue is that pydca is accessing the miniconda3/anaconda ld-linker when is should be using the system version.
Hope this helps.
Dean
Important note: I found that the installation is in conflict with the latest version of Python (version 3.9). Before following the above instructions, make sure to install Python==3.7 into your newly initialized env before running steps 1-7.
best,
D
Important note: I found that the installation is in conflict with the latest version of Python (version 3.9). Before following the above instructions, make sure to install Python==3.7 into your newly initialized env before running steps 1-7.
best,
D
Thanks for the instructions.
Installing with python=3.7 was the crucial moment for me, as it allowed for an error-free installation without the trick of renaming the ld-linker. Although, when installed, it throws Segmentation fault
on any attempt to run pydca
, which is another issue.
Hello,
Attempting to
pip install pydca
into freshly created conda environment fails on Linux due toI have gcc 10.1.0-2.