mittinatten / freesasa

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

Error during linking #85

Closed swanss closed 1 year ago

swanss commented 1 year ago

Hi,

I cloned the newest version of the repo and followed the steps in the readme to build FreeSASA, but encountered the following error during linking:

g++ -std=gnu++14 -g -O2 -o freesasa main.o cif.o -lc++ libfreesasa.a -lxml2 -lpthread -ldl -lm /bin/ld: cannot find -lc++

I found that I could get it finish building and run if I just removed -lc++ from the arguments, but I was hoping you could explain why this is the case. I'm attempting to install this on a cluster running CentOS 7 with gcc 6.2.0.

Thank you for your help with maintaining FreeSASA!

mittinatten commented 1 year ago

Hi, have you tried the solution in #76 ?

mittinatten commented 1 year ago

Closing this due to inactivity. Let me know if you have any more questions.

aspitaleri commented 1 year ago

Hi, same error. Fix in src/Makefile line 383: 383 #freesasa_LDADD = -lc++ libfreesasa.a $(am__append_3) $(am__append_7) to 383 #freesasa_LDADD = -lstdc++ libfreesasa.a $(am__append_3) $(am__append_7)

using gcc 10.2.0

mittinatten commented 1 year ago

Hmm, maybe I'll have to look into updating src/Makefile.am. Just want to make sure we do it in a way that's compatible with older GCC versions and CLANG.

mittinatten commented 1 year ago

@aspitaleri Does this branch work better? https://github.com/mittinatten/freesasa/pull/91

aspitaleri commented 1 year ago

Yes - perfect! ./src/freesasa

FreeSASA 2.1.2

freesasa: error: no input

Call 'freesasa -h' or 'man freesasa' for usage instructions

Report bugs to https://github.com/mittinatten/freesasa/issues Home page: http://freesasa.github.io

Thanks!