Skip to content

[21,22] workaround link failure against libjvm.so

Dan investigated https://bugs.launchpad.net/ubuntu/+source/collectd/+bug/2058966 and found that it is caused by an upstream issue https://bugs.openjdk.org/browse/JDK-8329983 . openjdk master is not affected.

Changes:

  • d/p/jdk-8329983.patch: apply workaround for JDK-8329983 - link failure against libjvm.so on armhf due to undefined symbol _Copy_conjoint_bytes.

Testing:

  • built in ppa[1] and manually tested that
#include <jni.h>

int main(){
    JavaVM *jvm;
    JNIEnv *env;
    JavaVMInitArgs vm_args;
    vm_args.version = JNI_VERSION_1_8;
    vm_args.nOptions = 0;
    vm_args.ignoreUnrecognized = false;
    JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
}

compiles and runs.

root@fitting-troll:~# g++ test.cpp -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -L/usr/lib/jvm/default-java/lib/server -ljvm
root@fitting-troll:~# LD_LIBRARY_PATH=/usr/lib/jvm/default-java/lib/server ./a.out && echo passed
passed

I will add a separate MR for autopkgtest since we do not need this patch in master (declaration already removed).

[1] https://launchpad.net/~vpa1977/+archive/ubuntu/bootstrap-openjdk-lts/+sourcepub/15923305/+listing-archive-extra

Edited by Vladimir Petko

Merge request reports

Loading