-
Notifications
You must be signed in to change notification settings - Fork 816
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
What the compile command and os of generating async-profiler-2.9-linux-x64.tar.gz #745
Comments
You need to build on CentOS 6, or CentOS 7 with glibc-compat (which is glibc of CentOS 6) |
It not works for C++ 11 atomic root# cat /etc/system-release
CentOS Linux release 7.9.2009 (Core)
root# uname -m
x86_64
root# yum install -y compat-glibc compat-glibc-headers compat-libstdc++-33 compat-gcc-44 compat-gcc-44-c++
root# yum install -y java-11-openjdk-devel git
root# mv /usr/bin/gcc /usr/bin/gcc.orig
root# ln -s /usr/bin/gcc44 /usr/bin/gcc
root# ln -s /usr/bin/g++44 /usr/bin/g++
root# git clone https://github.com/async-profiler/async-profiler.git
root# cd async-profiler
root# make
for f in src/*.cpp; do echo '#include "'$f'"'; done |\
g++ -O3 -fno-exceptions -fno-omit-frame-pointer -fvisibility=hidden -Wl,-z,defs -fwhole-program -momit-leaf-frame-pointer -DPROFILER_VERSION=\"2.10\" -I/usr/lib/jvm/java-11-openjdk-11.0.19.0.7-1.el7_9.x86_64/include -Isrc/helper -I/usr/lib/jvm/java-11-openjdk-11.0.19.0.7-1.el7_9.x86_64/include/linux -fPIC -shared -o build/lib/libasyncProfiler.so -xc++ - -ldl -lpthread -lrt
In file included from src/os.h:23,
from src/event.h:21,
from src/allocTracer.h:23,
from src/allocTracer.cpp:17,
from <stdin>:1:
src/arch.h: In function ‘u64 loadAcquire(u64&)’:
src/arch.h:35: error: ‘__ATOMIC_ACQUIRE’ was not declared in this scope
src/arch.h:35: error: ‘__atomic_load_n’ was not declared in this scope
src/arch.h: In function ‘void storeRelease(u64&, u64)’:
src/arch.h:39: error: ‘__ATOMIC_RELEASE’ was not declared in this scope
src/arch.h:39: error: ‘__atomic_store_n’ was not declared in this scope
src/arch.h:39: error: return-statement with a value, in function returning 'void'
In file included from src/profiler.h:25,
from src/allocTracer.cpp:18,
from <stdin>:1:
src/callTraceStorage.h: In member function ‘CallTrace* CallTraceSample::acquireTrace()’:
src/callTraceStorage.h:40: error: ‘__ATOMIC_ACQUIRE’ was not declared in this scope
src/callTraceStorage.h:40: error: ‘__atomic_load_n’ was not declared in this scope
src/callTraceStorage.h: In member function ‘void CallTraceSample::setTrace(CallTrace*)’:
src/callTraceStorage.h:44: error: ‘__ATOMIC_RELEASE’ was not declared in this scope
src/callTraceStorage.h:44: error: ‘__atomic_store_n’ was not declared in this scope
src/callTraceStorage.h:44: error: return-statement with a value, in function returning 'void'
In file included from src/profiler.h:26,
from src/allocTracer.cpp:18,
from <stdin>:1:
..................
........... |
For the releases, I uses CentOS 6 with gcc 4.7.2. |
Thx, and async-profiler-2.9-linux-arm64/build/libasyncProfiler.so is built under CentOS 7.x aarch64 ? |
It was built on Oracle Linux 7. |
I compiled the libasyncProfiler.so file for Linux x86-64 glibc-based os just using make command on CentOS 7.9 x86-64, then i got /lib64/libc.so.6: version `GLIBC_2.14' not found error message when i ran it under CentOS 6.10 x86-64.
So, what the compile command and os of generating async-profiler-2.9-linux-x64.tar.gz
The text was updated successfully, but these errors were encountered: