Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Cannot compile master branch. #360

Closed
haojinIntel opened this issue Jun 10, 2021 · 16 comments · Fixed by #364
Closed

Cannot compile master branch. #360

haojinIntel opened this issue Jun 10, 2021 · 16 comments · Fixed by #364
Labels
bug Something isn't working

Comments

@haojinIntel
Copy link
Collaborator

We try to compile the master branch and meet the error message like:

image

@haojinIntel
Copy link
Collaborator Author

@zhouyuan @weiting-chen @zhixingheyi-tian Please help to track the issue. Thanks!

@weiting-chen
Copy link
Collaborator

@haojinIntel Could you also provide the full compile command you are using. Thanks.

@haojinIntel
Copy link
Collaborator Author

@weiting-chen The command of maven is showed below:
image
And the command of cmake for arrow is like:
image

@weiting-chen
Copy link
Collaborator

@haojinIntel
This is an issue that the code cannot pass this Spark built-in ut and we can produce in our environment as well.
But we need more time to address and fix it, @rui-mo will help to submit a PR to remove this UT and let the compile can run successfully.
One workaround for the current code is to add "-Dmaven.test.skip" to ignore all the scala ut during mvn command.

@zhouyuan
Copy link
Collaborator

@weiting-chen @rui-mo i have a local jenkins running daily - this didnt show up in my jenkins env.
Java.Util.Map[K, V] can not be applied to Java.Util.HashMap(String, Array(String))
i suspect this is a compiler issue, the scala-maven-plugin is set to 4.4.0 to bypass some issue on 4.5.1
#325
not sure using 4.5.2 could fix this

@rui-mo
Copy link
Collaborator

rui-mo commented Jun 10, 2021

@zhouyuan hi, did you test with"-Dmaven.test.skip"? with this config, this error will not show up.

@zhouyuan
Copy link
Collaborator

@rui-mo
yes, my tests is running w tests compiled.

@haojinIntel can you also provide your JDK info?

this seems occur on openjdk only, oracle-jdk runs fine

@rui-mo
Copy link
Collaborator

rui-mo commented Jun 10, 2021

Here are some new findings:

       <plugin>
         <groupId>net.alchim31.maven</groupId>
         <artifactId>scala-maven-plugin</artifactId>
         <version>4.4.0</version>
         <configuration>
           <recompileMode>${scala.recompile.mode}</recompileMode>
         </configuration>

If deleting " 4.4.0" or replacing "4.4.0" to "4.5.2", below cmd runs successfully.

mvn clean package -am -DskipTests -Dbuild_arrow=OFF -Dbuild_protobuf=OFF -Phadoop-3.2

Below command still failed with the above error:

mvn test -DmembersOnlySuites=org.apache.spark.sql.travis -am -DfailIfNoTests=false -Dexec.skip=true

But If changing the scala-maven-plugin version to 4.3.0 or 4.3.1 (spark is using 4.3.0), the test compilation works well on my env.

@weiting-chen
Copy link
Collaborator

Deleting "4.4.0" not work for me. Report the same error with "4.4.0"
It looks like change to "4.5.2" is the only solution in my environment.

@zhouyuan
Copy link
Collaborator

Here are some new findings:

       <plugin>
         <groupId>net.alchim31.maven</groupId>
         <artifactId>scala-maven-plugin</artifactId>
         <version>4.4.0</version>
         <configuration>
           <recompileMode>${scala.recompile.mode}</recompileMode>
         </configuration>

If deleting " 4.4.0" or replacing "4.4.0" to "4.5.2", below cmd runs successfully.

mvn clean package -am -DskipTests -Dbuild_arrow=OFF -Dbuild_protobuf=OFF -Phadoop-3.2

But looks like tests are not compiled if using this command.

Screenshot from 2021-06-10 19-34-30

Below command still failed with the above error:

mvn test -DmembersOnlySuites=org.apache.spark.sql.travis -am -DfailIfNoTests=false -Dexec.skip=true

But If changing the scala-maven-plugin version to 4.3.0 or 4.3.1 (spark is using 4.3.0), the test compilation works well on my env.

@rui-mo
below picture showed tests are skipped, but not mean they are not compiled

@zhouyuan
Copy link
Collaborator

@haojinIntel can you please also share the JDK you are using?

@weiting-chen
Copy link
Collaborator

4.3.0 and 4.3.1 also work in my env with openjdk version "1.8.0_282"

@haojinIntel
Copy link
Collaborator Author

@zhouyuan I use oracle-jdk 1.8.0_112.
image

@rui-mo
Copy link
Collaborator

rui-mo commented Jun 11, 2021

Adding "-P full-scala-compiler" may help solve this issue. Below command compiles successfully on my env with master branch.
mvn test -P full-scala-compiler -DmembersOnlySuites=org.apache.spark.sql.travis -am -DfailIfNoTests=false -Dexec.skip=true

@weiting-chen
Copy link
Collaborator

@haojinIntel
We have merged a PR to fix this issue in master by using scala-maven-plugin with 4.3.0.
Please help to retry the master code.
Thanks.

@haojinIntel
Copy link
Collaborator Author

@weiting-chen The issue can be fixed in my env. Thanks.

@zhixingheyi-tian zhixingheyi-tian added the bug Something isn't working label Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants