H2O 构建失败,在 h2o-algos 中出现错误“找不到符号”

问题描述 投票:0回答:1

我尝试构建H2O开源,无论是稳定版本还是克隆版本,通过

./gradlew build
构建过程都因“错误:找不到符号”而失败,详细错误信息如下:

更新了构建日志:

here is the full log from output for the latest rel-3.42.0 branch:

(python) wayahead@ubox:~/workspace/h2o/github$ git clone --branch rel-3.42.0 https://github.com/h2oai/h2o-3.git
Cloning into 'h2o-3'...
remote: Enumerating objects: 428884, done.
remote: Counting objects: 100% (6618/6618), done.
remote: Compressing objects: 100% (3895/3895), done.
remote: Total 428884 (delta 3654), reused 5264 (delta 2604), pack-reused 422266
Receiving objects: 100% (428884/428884), 604.35 MiB | 9.36 MiB/s, done.
Resolving deltas: 100% (263828/263828), done.
(python) wayahead@ubox:~/workspace/h2o/github$ javac -version
javac 1.8.0_382
(python) wayahead@ubox:~/workspace/h2o/github$ cd h2o-3/
(python) wayahead@ubox:~/workspace/h2o/github/h2o-3$ ./gradlew build -x test
Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :
The project project ':h2o-persist-s3' needs CI for running tests! You can pass `-PdoCI=true` to force CI behaviour.

> Configure project :h2o-assemblies:main
== :h2o-assemblies:main: Using optional component: xgboost, version 3.42.0
== :h2o-assemblies:main: Using optional component: jython-cfunc, version 3.42.0
== :h2o-assemblies:main: Using optional component: jgrapht, version 3.42.0
== :h2o-assemblies:main: Using optional component: mojo-pipeline, version 3.42.0

> Configure project :h2o-r


> Configure project :h2o-assemblies:genmodel
== :h2o-assemblies:genmodel: Using optional genmodel component: xgboost, version 3.42.0
== :h2o-assemblies:genmodel: Using optional genmodel component: jgrapht, version 3.42.0
== :h2o-assemblies:genmodel: Using optional genmodel component: mojo-pipeline, version 3.42.0

> Configure project :h2o-assemblies:minimal
== :h2o-assemblies:minimal: Using optional component: xgboost, version 3.42.0
== :h2o-assemblies:minimal: Using optional component: jython-cfunc, version 3.42.0
== :h2o-assemblies:minimal: Using optional component: jgrapht, version 3.42.0
== :h2o-assemblies:minimal: Using optional component: mojo-pipeline, version 3.42.0

> Configure project :h2o-assemblies:steam
== :h2o-assemblies:steam: Using optional component: xgboost, version 3.42.0
== :h2o-assemblies:steam: Using optional component: jython-cfunc, version 3.42.0
== :h2o-assemblies:steam: Using optional component: jgrapht, version 3.42.0
== :h2o-assemblies:steam: Using optional component: mojo-pipeline, version 3.42.0

> Task :h2o-core:generateBuildVersionJava
NOTE: emitBuildVersionJava found no file, emitting new file
> Task :h2o-genmodel:generateBuildVersionJava
NOTE: emitBuildVersionJava found no file, emitting new file
> Task :h2o-genmodel:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:h2o-genmodel:compileJava took 1.141 secs

> Task :h2o-core:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:h2o-core:compileJava took 7.099 secs

> Task :h2o-algos:compileJava
/home/wayahead/workspace/h2o/github/h2o-3/h2o-algos/src/main/java/hex/schemas/GLMModelV3.java:24: error: cannot find symbol
  public static final class GLMModelOutputV3 extends ModelOutputSchemaV3<GLMOutput, GLMModelOutputV3> {
                                                     ^
  symbol:   class ModelOutputSchemaV3
  location: class hex.schemas.GLMModelV3
/home/wayahead/workspace/h2o/github/h2o-3/h2o-algos/src/main/java/hex/schemas/GLMModelV3.java:24: error: cannot find symbol
  public static final class GLMModelOutputV3 extends ModelOutputSchemaV3<GLMOutput, GLMModelOutputV3> {
                                                                         ^
  symbol:   class GLMOutput
  location: class hex.schemas.GLMModelV3
/home/wayahead/workspace/h2o/github/h2o-3/h2o-algos/src/main/java/hex/schemas/GLMModelV3.java:22: error: type argument hex.schemas.GLMModelV3.GLMModelOutputV3 is not within bounds of type-variable OS
public class GLMModelV3 extends ModelSchemaV3<GLMModel, GLMModelV3, GLMModel.GLMParameters, GLMV3.GLMParametersV3, GLMOutput, GLMModelV3.GLMModelOutputV3> {
                                                                                                                                        ^
/home/wayahead/workspace/h2o/github/h2o-3/h2o-algos/src/main/java/hex/schemas/GLMModelV3.java:196: error: method does not override or implement a method from a supertype
    @Override
    ^
/home/wayahead/workspace/h2o/github/h2o-3/h2o-algos/src/main/java/hex/schemas/GLMModelV3.java:198: error: non-static variable super cannot be referenced from a static context
      super.fillFromImpl(impl);
      ^
/home/wayahead/workspace/h2o/github/h2o-3/h2o-algos/src/main/java/hex/schemas/GLMModelV3.java:198: error: no suitable method found for fillFromImpl(hex.glm.GLMModel.GLMOutput)
      super.fillFromImpl(impl);
           ^
    method water.api.Schema.fillFromImpl(hex.glm.GLMModel) is not applicable
      (argument mismatch; hex.glm.GLMModel.GLMOutput cannot be converted to hex.glm.GLMModel)
    method water.api.schemas3.ModelSchemaV3.fillFromImpl(hex.glm.GLMModel) is not applicable
      (argument mismatch; hex.glm.GLMModel.GLMOutput cannot be converted to hex.glm.GLMModel)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
6 errors
:h2o-algos:compileJava took 2.255 secs

> Task :h2o-algos:compileJava FAILED

Task timings:
   7.099 secs  :h2o-core:compileJava
   2.255 secs  :h2o-algos:compileJava
   1.141 secs  :h2o-genmodel:compileJava
   0.366 secs  :h2o-core:generateBuildVersionJava
   0.290 secs  All others

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':h2o-algos:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 29s
14 actionable tasks: 13 executed, 1 up-to-date

================================================ 环境:Ubuntu 22.04,openjdk版本“1.8.0_382”

我确实在github上查看了h2o-3的FQA和README,并尝试了很多次

./gladew clean
。根据上述错误,代码库中似乎缺少机器学习算法
GLMModelV3
,但没有有关如何获取这些代码/jar 的信息。所以希望高手能详细解释一下如何准备构建环境。

h2o
1个回答
0
投票

感谢您对 h2o-3 的兴趣! 我在同一 Ubuntu 和 Java 版本上重现该问题时遇到问题,您能分享一下您正在使用哪个 git 分支吗?如果您不使用 git,我建议克隆该项目并使用

rel-3.42.0
分支,这是最新的发布分支。

我还强烈建议首先跳过测试:

./gradlew build -x test

© www.soinside.com 2019 - 2024. All rights reserved.