mittinatten / freesasa

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

-lc++ make error on Ubuntu 20.04 LTS #73

Closed stephenitpro closed 2 years ago

stephenitpro commented 2 years ago

After git cloning the repo and the respective submodules, configure proceeds without issue, but the make produces the following error mid-way during compilation:

g++ -std=gnu++14 -g -O2 -o freesasa main.o cif.o -lc++ libfreesasa.a -ljson-c -lxml2 -lpthread -ldl -lm /usr/bin/ld: cannot find -lc++ collect2: error: ld returned 1 exit status make[2]: *** [Makefile:513: freesasa] Error 1

To workaround the error I had to take cd to src and take out the -lc++ flag to compile

g++ -std=gnu++14 -g -O2 -o freesasa main.o cif.o -lc++ libfreesasa.a -ljson-c -lxml2 -lpthread -ldl -lm /usr/bin/ld: cannot find -lc++ collect2: error: ld returned 1 exit status make[2]: *** [Makefile:513: freesasa] Error 1

src$ g++ -std=gnu++14 -g -O2 -o freesasa main.o cif.o libfreesasa.a -ljson-c -lxml2 -lpthread -ldl -lm

stephenitpro commented 2 years ago

Nevermind, looks like I didn't read all of the way down to see the Ubuntu prerequisites. Apologies.

mittinatten commented 2 years ago

Good! I should probably improve the configure-script to detect this, not sure how.