如何在CMake上编译Ignite应用程序? [英] how to compile Ignite application on CMake?
问题描述
我确实成功编译了Ignite Application. 但是二进制文件不起作用.
I did compile Ignite Application successfully. but The Binary didn't work.
/tmp/tmp.Nw0IPD6ru3/cmake-build-debug-local-container/planet_engine: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory
/tmp/tmp.Nw0IPD6ru3/cmake-build-debug-local-container/planet_engine: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory
我如何使其起作用?
此外,我成功地编译了C ++示例.例如ignite-compute-example.
并且,我执行了该操作,但收到一条错误消息.
An error occurred: JVM library is not found (did you set JAVA_HOME environment variable?)
Also, I compiled C++ Examples successfully. such as ignite-compute-example.
and, I execute that but I got an error message.
An error occurred: JVM library is not found (did you set JAVA_HOME environment variable?)
并且我使用了夜间发布的版本2.8.0.20190213
,因为在我的环境中无法构建到2.7版.
and I using a nightly release version 2.8.0.20190213
because I couldn't build to version 2.7 in my environment.
我将环境值记下来了.
IGNITE_HOME=
TERM=xterm-256color
SHELL=/bin/bash
LIBRARY_PATH=/root/jre1.8.0_201/lib/amd64/server:/root/jre1.8.0_201/lib/amd64/
LC_NUMERIC=ko_KR.UTF-8
SSH_TTY=/dev/pts/0
JRE_HOME=/root/jre1.8.0_201
USER=root
LS_COLORS=rs=0:d...
LD_LIBRARY_PATH=/root/jre1.8.0_201/lib/amd64/server:/root/jre1.8.0_201/lib/amd64/
CLASS_PATH=/root/jdk-11.0.2/lib:
LC_TELEPHONE=ko_KR.UTF-8
MAIL=/var/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/jdk-11.0.2/bin
LC_IDENTIFICATION=ko_KR.UTF-8
JAVA_HOME=/root/jdk-11.0.2
LANG=en_US.UTF-8
LC_MEASUREMENT=ko_KR.UTF-8
JDK_HOME=/root/jdk-11.0.2/lib
SHLVL=1
HOME=/root
LOGNAME=root
LESSOPEN=| /usr/bin/lesspipe %s
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=ko_KR.UTF-8
LC_NAME=ko_KR.UTF-8
_=/usr/bin/env
感谢您的阅读. :)
推荐答案
我明白了.
我正在docker容器环境中工作.
I am working on a docker container environment.
因此,我正在使用ssh和gdb进行远程构建和调试.
and therefore I am using remote build and debug with ssh and gdb.
最后,我发现了为什么找不到libjvm.so
的原因,以及为什么无法读取诸如JAVA_HOME
的环境值.
finally, I found out why it couldn't find libjvm.so
and why couldn't read environment values such as JAVA_HOME
.
因为它现在可以在gdb中使用.
because it is working in gdb for now.
我确认没有gdb时它可以正常工作.
I confirmed that it is working when without gdb.
我会找到解决方案. 并且,如果找到了我,我将更新答案.
I will find a solution. and, if I have been found, I will update the answer.
[已解决]
我分享解决方法.
我正在通过源代码安装使用Oracle JDK-11.
I was using an Oracle JDK-11 through source install.
但是Ignite C ++客户端需要与最新发布的jdk版本有所不同.
but Ignite C++ client need something different with latest released jdk versions.
点燃需要这样的目录结构
Ignite need a directory structure like this
JAVA_HOME/ (as JDK install directory)
- jre/
- lib/
- lib/
...
我被apt install openjdk-8-jdk
解决.
openjdk-8-jdk具有满足Ignite需求的结构.
I solved by apt install openjdk-8-jdk
.
openjdk-8-jdk have structure for what Ignite need.
我在/etc/environment
处添加了JAVA_HOME,IGNITE_HOME.
i added JAVA_HOME, IGNITE_HOME, at /etc/environment
.
终于可以了.
但是我遇到了另一个问题.哈哈 我好伤心.
but I got another problem. HAHA I am so sad.
这也是GDB问题.
这篇关于如何在CMake上编译Ignite应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!