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 failed. #847

Closed
zdyj3170101136 opened this issue Nov 28, 2023 · 4 comments
Closed

build failed. #847

zdyj3170101136 opened this issue Nov 28, 2023 · 4 comments

Comments

@zdyj3170101136
Copy link

make all failed:

[root@plat-sh-data-testing-common-pic-infer-demo001 async-profiler]# make all
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=\"3.0-ea\" -I/usr/lib/jdk1.8.0_131/include -Isrc/helper -I/usr/lib/jdk1.8.0_131/include/linux -fPIC -shared -o build/lib/libasyncProfiler.so -xc++ - -ldl -lpthread -lrt
In file included from <stdin>:27:0:
src/objectSampler.cpp: In member function ‘virtual Error ObjectSampler::start(Arguments&)’:
src/objectSampler.cpp:198:12: error: ‘jvmtiEnv’ has no member named ‘SetHeapSamplingInterval’
     jvmti->SetHeapSamplingInterval(_interval);
            ^
src/objectSampler.cpp:199:51: error: ‘JVMTI_EVENT_SAMPLED_OBJECT_ALLOC’ was not declared in this scope
     jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_SAMPLED_OBJECT_ALLOC, NULL);
                                                   ^
src/objectSampler.cpp: In member function ‘virtual void ObjectSampler::stop()’:
src/objectSampler.cpp:208:52: error: ‘JVMTI_EVENT_SAMPLED_OBJECT_ALLOC’ was not declared in this scope
     jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_SAMPLED_OBJECT_ALLOC, NULL);
                                                    ^
In file included from <stdin>:44:0:
src/vmEntry.cpp: In static member function ‘static bool VM::init(JavaVM*, bool)’:
src/vmEntry.cpp:182:18: error: ‘struct jvmtiCapabilities’ has no member named ‘can_generate_sampled_object_alloc_events’
     capabilities.can_generate_sampled_object_alloc_events = _can_sample_objects ? 1 : 0;
                  ^
src/vmEntry.cpp:193:22: error: ‘struct jvmtiCapabilities’ has no member named ‘can_generate_sampled_object_alloc_events’
         capabilities.can_generate_sampled_object_alloc_events = 0;
                      ^
src/vmEntry.cpp:210:15: error: ‘struct jvmtiEventCallbacks’ has no member named ‘SampledObjectAlloc’
     callbacks.SampledObjectAlloc = ObjectSampler::SampledObjectAlloc;
               ^
src/vmEntry.cpp:238:21: error: ‘jvmtiEnv’ has no member named ‘SetHeapSamplingInterval’
             _jvmti->SetHeapSamplingInterval(0);
                     ^
make: *** [build/lib/libasyncProfiler.so] Error 1

g++ version:

[root@plat-sh-data-testing-common-pic-infer-demo001 async-profiler]# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
@zdyj3170101136
Copy link
Author

java version:

[root@plat-sh-data-testing-common-pic-infer-demo001 async-profiler]# java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

@yanglong1010
Copy link
Contributor

set JAVA_HOME to JDK 11

@apangin
Copy link
Collaborator

apangin commented Nov 28, 2023

You need JDK 11 or higher to build async-profiler.
Note: the result binaries will still work with JDK 8.

@zdyj3170101136
Copy link
Author

您需要 JDK 11 或更高版本来构建 async-profiler。 注意:结果二进制文件仍然适用于 JDK 8。

expect official release of vm analyze.

@apangin apangin closed this as completed Nov 29, 2023
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