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

Statically link libstdc++ for distribution #17211

Closed
brson opened this issue Sep 12, 2014 · 2 comments
Closed

Statically link libstdc++ for distribution #17211

brson opened this issue Sep 12, 2014 · 2 comments

Comments

@brson
Copy link
Contributor

brson commented Sep 12, 2014

Binary incompatibilities in libstdc++ are a big source of problems for us. For snapshots we work around this with static linking. Is there any reason we shouldn't do this for our main distributables as well?

cc #17194

cc @alexcrichton

@brson brson changed the title Statically linke libstdc++ for distribution Statically link libstdc++ for distribution Sep 12, 2014
@alexcrichton
Copy link
Member

Sadly I've found this to not help whenever I've needed it to in the past. Frequently it's not just libstdc++ that's "too new", but it's also libc that's "too new".

I think that our snapshot builders have an old libc, but I don't actually know if they're linking against it. They may be picking up a libc that was installed with gcc 4.7 (a "too new" libc).

All-in-all, there'd be a few lingering questions for me:

  • This prevents dynamically loading any C++ code, is that desirable? This is largely relevant because we currently support dynamically opening syntax extensions. This would prevent anyone from adding optimization passes to LLVM I think, but that may not necessarily be the end of the world.
  • Does this actually fix the problem? The libc errors that I've seen after statically linking libstdc++ in the past worry me.

I suspect the answer is "yes, we should statically link libstdc++ for our distribution purposes." We may have to investigate the libc issue further, but this is a step forward!

@alexcrichton
Copy link
Member

Closing, this is now done.

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