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

Build requires libc++.so #76

Closed
jvlehtonen opened this issue Apr 6, 2022 · 4 comments
Closed

Build requires libc++.so #76

jvlehtonen opened this issue Apr 6, 2022 · 4 comments

Comments

@jvlehtonen
Copy link

jvlehtonen commented Apr 6, 2022

Hi,

Makefile.am sets:
freesasa_LDADD = -lc++

GCC does not provide libc++.so (but would autolink libstdc++.so)
Therefore, build fails with GCC.

The libc++.so is from Clang?

After
sed -i "s/freesasa_LDADD = -lc++/freesasa_LDADD =/" src/Makefile.am
a build with GCC is successful.

@jvlehtonen
Copy link
Author

My bad, did not browse the closed issues. #72 was on same/similar issue.

Difference is that we build on RHEL 7 / CentOS 7, where libc++ is not in base repos. GCC 9 and 11.

@mittinatten
Copy link
Owner

Ok, if you have one or two lines of code for how to install the correct dependencies, like we have for Ubuntu in the README, I can add that (either by PR or a comment here). Seems a lot of people are running into this issue.

Ideally autoconf should detect the problem too, will try to figure something out.

@jvlehtonen
Copy link
Author

jvlehtonen commented Apr 6, 2022

GNU Build System and git install on RHEL 7 and 8 -based systems (including CentOS 7, AlmaLinux, Rocky Linux, etc) as "yum group":
sudo yum install @development

The additional dependencies can be installed on RHEL-based systems with:
sudo yum install json-c-devel libxml2-devel

The system GCC in RHEL 7 (and hence CentOS 7) does not support required C++ standard.
Later GCC (and possibly some version of Clang) are available via Software Collections (SCL).
RHEL 7 has its method to enable SCL. CentOS 7 enables SCL repo with:
sudo yum install centos-release-scl-rh
"Toolchain" from Developer Toolset is sufficient for building with GCC. For example:
sudo yum install devtoolset-9-toolchain
In order to use programs from SCL one has to enable environment:
scl enable devtoolset-9 bash
The bash that starts above does have gcc version 9 on PATH.
The built freesasa binary does not require the environment.

Users of RHEL 7 / CentOS 7 could know how to use SCL, but there is no enforcement ...

@mittinatten
Copy link
Owner

Thanks! I'll add it to the README.

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

2 participants