mittinatten / freesasa

C-library for calculating Solvent Accessible Surface Areas
http://freesasa.github.io/
MIT License
103 stars 37 forks source link

[Install Error] /usr/bin/ld: cannot find -lc++ and its solution #72

Closed JustinDoIt closed 2 years ago

JustinDoIt commented 2 years ago

I try to install freesasa as follows

git clone git@github.com:mittinatten/freesasa.git
git submodule init
git submodule update
autoreconf -i 
./configure --disable-json  --disable-xml
make

When entered make, I encountered error: /usr/bin/ld: cannot find -lc++

make  all-recursive                                                                                                                    
make[1]: Entering directory '/home/zhangjq/appstore/softwares/freesasa'                                                                
Making all in src                                                                                                                      
make[2]: Entering directory '/home/zhangjq/appstore/softwares/freesasa/src'                                                            
g++ -std=gnu++14  -g -O2   -o freesasa main.o cif.o -lc++ libfreesasa.a   -ldl -lm  
/usr/bin/ld: cannot find -lc++          
collect2: error: ld returned 1 exit status     
make[2]: *** [Makefile:513: freesasa] Error 1                                                                     
make[2]: Leaving directory '/home/zhangjq/appstore/softwares/freesasa/src'                                                             
make[1]: *** [Makefile:382: all-recursive] Error 1                                                                                     
make[1]: Leaving directory '/home/zhangjq/appstore/softwares/freesasa'                                                                 
make: *** [Makefile:321: all] Error 2 

Actually, I solved it by a quiet long day. So I wanna record it for others

Solution is!!

sudo apt install libc++-11-dev libc++abi-11-dev

and those without root can refer this StackOverflow

Thank the author for providing such perfect software. I hope you enjoy freesasa :D

JustinDoIt commented 2 years ago

Hope it helps :D and I'll close this issue

mittinatten commented 2 years ago

Glad you figured it out :)