-
Notifications
You must be signed in to change notification settings - Fork 70
java: Build async-profiler with -static-libstdc++ #139
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
Conversation
No reason to build on centos:6 really - centos:7 builds work on centos:6 as well.
And anyway there's no reason not to build statically.
|
I installed Result before (on master): and on this branch, it works fine :) |
|
Bleh, doesn't work on a real CentOS 6: |
This reverts commit 8b2aa02. The assumption that it's okay was incorrect.
Need newer GCC for -static-libstdc++
|
Okay, reverted back to CentOS 6 (and commented so next time we won't forget). I install devtoolset 7 and build with it. Tested now on my CentOS 6 machine - works fine. Also, no |
|
Unrelated error.. |
|
Also checked my Java running on |
This PR upgrades async-profiler to v2.9. Post upgrading to v2.9, the force_symbols.cpp hack didn't work. This PR standarizes the build for CentOS 6 compatibility: * Remove devtoolset-7 installation - this is a remnant from #139 which enabled -static-libstdc++, which is not supported on CentOS 6 GCC (see description in that PR). However, we've since switched to CentOS 7 (in #304) so it's no longer relevant - GCC on CentOS 7 supports it. * Install compat-glibc and build against it with "-I /usr/lib/x86_64-redhat-linux6E/include -B /usr/lib/x86_64-redhat-linux6E/lib64/". * Remove the hack of force linking memcpy. Closes: #563
Description
Build async-profiler with
-static-libstdc++to avoid the libstd++ dependency.Needs #137
Related Issue
Possibly resolves #136
Motivation and Context
Allow async-profiler to be loaded also in environments without
libstdc++.so.How Has This Been Tested?
centos:7works fine oncentos:6machines (old glibc compatibility). This assumption might be false, in which case I'll use devtoolset to get a newer GCC (default GCC ofcentos:6doesn't have-static-libstdc++)Test it on an environment where I removedlibstdc++.so, thus old gProfiler won't work (will fail with the same error from Error when running gProfiler - Failed to profile Java process #136 ), and this mew build will work.I can't really reproduce this - since Java itself uses libstdc++, it's already loaded in the process, anyway, so it won't matter if I deleted it. I don't understand how the state of Error when running gProfiler - Failed to profile Java process #136 can happen (well, Java itself was compiled withSee java: Build async-profiler with -static-libstdc++ #139 (comment)-static-libstdc++?)Checklist: