Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during linking #85

Closed
swanss opened this issue Oct 27, 2022 · 6 comments
Closed

Error during linking #85

swanss opened this issue Oct 27, 2022 · 6 comments

Comments

@swanss
Copy link

swanss commented Oct 27, 2022

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
Copy link
Owner

Hi, have you tried the solution in #76 ?

@mittinatten
Copy link
Owner

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

@aspitaleri
Copy link

aspitaleri commented Jun 13, 2023

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
Copy link
Owner

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
Copy link
Owner

@aspitaleri Does this branch work better? #91

@aspitaleri
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants