Makefile 从源代码构建mysql工作台时无法访问jarfile ANTLR_JAR_PATH-NOTFOUND

Makefile 从源代码构建mysql工作台时无法访问jarfile ANTLR_JAR_PATH-NOTFOUND,makefile,cmake,mysql-workbench,kali-linux,Makefile,Cmake,Mysql Workbench,Kali Linux,我试图从源代码构建mysql工作台 步骤: 1-$>cd wb构建 2-$>cmake 3-$>make-j4 4-$>sudo make安装 在第2步 root@Ahsan:~/Downloads/mysql-workbench-community-8.0.19-src/wb build#cmake.. 在第3步 root@Ahsan:~/Downloads/mysql-workbench-community-8.0.19-src/wb-build# make-j4 关于ANTLR的注意事项:

我试图从源代码构建mysql工作台

步骤:

1-$>cd wb构建

2-$>cmake

3-$>make-j4

4-$>sudo make安装

在第2步

root@Ahsan:~/Downloads/mysql-workbench-community-8.0.19-src/wb build#cmake..

在第3步

root@Ahsan:~/Downloads/mysql-workbench-community-8.0.19-src/wb-build# make-j4

关于ANTLR的注意事项:

  • 为MySQL解析器生成文件需要ANTLR 4.7。从下载antlr-4.7.2-complete.jar . 那你就需要通过考试了 cmake参数:-DWITH_ANTLR_JAR=path_to_your_ANTLR_complete_文件
注意: 我已经在my/root/Downloads中下载了Antlr-4.7.2-complete.jar文件/


我应该把它放在哪里。

你的CMake似乎没有完全找到ANTLR_JAR_路径,你能在你的问题帖子中提供完整的CMake日志吗。您还可以提供构建此应用程序所遵循的步骤吗?也许是辅导?您在哪里下载了源代码?注意:不必生成解析器/词法分析器文件,因为它们是存储库的一部分。只有当您想重新生成它们(例如,因为您更改了语法)时,您还必须运行ANTLR。我知道(重新)生成是构建项目的一部分,但是作为开始,您可以注释掉它,因为您已经有生成的文件。您能告诉我需要注释掉Antlr的文件是哪个吗。当做
ANTLR4 INCLUDE DIR: /usr/local/include/antlr4-runtime
ANTLR4 LIB DIR: -L/usr/local/lib -lantlr4-runtime
CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:77 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

VSQLITE INCLUDE DIR: /usr/include
VSQLITE LIB DIR: -L/usr/lib/x86_64-linux-gnu -lvsqlitepp
Found unixodbc, using it as ODBC library.
CMake Warning at CMakeLists.txt:153 (message):
  antlr-4.7.1-complete.jar or java runtime wasn't found which is required if
  you'd like to rebuild Lexer and Parser files


Found Scintilla Version: 4.1.5
CMake Warning (dev) at /usr/share/cmake-3.16/Modules/UseSWIG.cmake:607 (message):
  Policy CMP0078 is not set: UseSWIG generates standard target names.  Run
  "cmake --help-policy CMP0078" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

Call Stack (most recent call first):
  library/forms/swig/CMakeLists.txt:64 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.16/Modules/UseSWIG.cmake:460 (message):
  Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
  flag.  Run "cmake --help-policy CMP0086" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/UseSWIG.cmake:702 (SWIG_ADD_SOURCE_TO_MODULE)
  library/forms/swig/CMakeLists.txt:64 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.16/Modules/UseSWIG.cmake:607 (message):
  Policy CMP0078 is not set: UseSWIG generates standard target names.  Run
  "cmake --help-policy CMP0078" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

Call Stack (most recent call first):
  library/forms/swig/CMakeLists.txt:96 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.16/Modules/UseSWIG.cmake:460 (message):
  Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
  flag.  Run "cmake --help-policy CMP0086" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/UseSWIG.cmake:702 (SWIG_ADD_SOURCE_TO_MODULE)
  library/forms/swig/CMakeLists.txt:96 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /root/Downloads/mysql-workbench-community-8.0.19-src/wb-build
[  0%] [mysql] Generating parser files...
Error: Unable to access jarfile ANTLR_JAR_PATH-NOTFOUND
make[2]: *** [library/parsers/CMakeFiles/generate_parser_mysql.dir/build.make:75: ../library/parsers/mysql/MySQLLexer.h] Error 1
make[1]: *** [CMakeFiles/Makefile2:2260: library/parsers/CMakeFiles/generate_parser_mysql.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  1%] Built target cdbc
[  3%] Built target wbbase
[ 24%] Built target wbscintilla
make: *** [Makefile:130: all] Error 2