Skip to content

Conversation

@Fokko
Copy link
Contributor

@Fokko Fokko commented Jan 30, 2019

Pull Request Guidance

Otherwise it will fail with:

make[4]: Entering directory '/thrift/tutorial/cpp'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/thrift/tutorial/cpp'
make[3]: Leaving directory '/thrift/tutorial/cpp'
make[2]: Leaving directory '/thrift/tutorial/cpp'
Making install in java
make[2]: Entering directory '/thrift/tutorial/java'
/usr/bin/ant  compile
Buildfile: /thrift/tutorial/java/build.xml

init:
    [mkdir] Created dir: /thrift/tutorial/java/build
    [mkdir] Created dir: /thrift/tutorial/java/build/log

generate:

compile:
    [javac] Compiling 7 source files to /thrift/tutorial/java/build
    [javac] /thrift/tutorial/java/gen-java/shared/SharedService.java:10: error: package javax.annotation does not exist
    [javac] @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2019-01-30")
    [javac]                  ^
    [javac] /thrift/tutorial/java/gen-java/shared/SharedStruct.java:10: error: package javax.annotation does not exist
    [javac] @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2019-01-30")
    [javac]                  ^
    [javac] /thrift/tutorial/java/gen-java/tutorial/Calculator.java:10: error: package javax.annotation does not exist
    [javac] @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2019-01-30")
    [javac]                  ^
    [javac] /thrift/tutorial/java/gen-java/tutorial/Work.java:19: error: package javax.annotation does not exist
    [javac] @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2019-01-30")
    [javac]                  ^
    [javac] /thrift/tutorial/java/gen-java/tutorial/InvalidOperation.java:13: error: package javax.annotation does not exist
    [javac] @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2019-01-30")
    [javac]                  ^
    [javac] /thrift/tutorial/java/gen-java/tutorial/Operation.java:14: error: package javax.annotation does not exist
    [javac] @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2019-01-30")
    [javac]                  ^
    [javac] 6 errors

BUILD FAILED
/thrift/tutorial/java/build.xml:55: Compile failed; see the compiler error output for details.

Review the following items to ensure a smooth pull request experience.

  • Did you make a breaking change? If so:

    • Add (or reference) an Apache Jira THRIFT ticket.
    • Add a Breaking-Change label to the Jira ticket.
    • Add a note to the lib/<language>/README.md file.
    • Add a line to the CHANGES.md file.
  • Is this change significant enough to be in release notes?

This will add JDK9+ compatibility to Thirft

  • If there is an Apache Jira ticket:

    • Is the Apache Jira THRIFT ticket identifier in the PR title?

      THRIFT-4766: an example pull request title
      
    • Is the Apache Jira THRIFT ticket identifier and affected languages in the commit message?

      THRIFT-4766: [summary of fix, one line if possible]
      Client: [language(s) affected, comma separated, use lib/ directory names please]
      
  • Did you squash your changes to a single commit?

      Committers can squash when they merge, but sometimes we forget, and it makes the history
      pretty dirty.  Please squash your pull requests to a single commit if you can.
    

For more information about committing, see CONTRIBUTING.md

@Fokko Fokko changed the title [THRIFT-4766] Enable JDK9 build THRIFT-4766: Fix JDK9 build Jan 30, 2019
@Fokko Fokko force-pushed the fd-enable-jdk-9-build branch from b37e4c7 to 8fa33f4 Compare January 30, 2019 14:22
@jeking3
Copy link
Contributor

jeking3 commented Jan 30, 2019

We need to change the build tooling to prove this out. I will do that and push into your branch to kick another build. This PR built with java-8-openjdk, not java-11-openjdk.

@Fokko
Copy link
Contributor Author

Fokko commented Jan 30, 2019

Thanks for the quick response @jeking3

The CI is now failing because there is no JDK:

-- ----------------------------------------------------------
-- Thrift version:                               0.13.0 (0.13.0)
-- Thrift package version:                       0.13.0
-- Build configuration Summary
--   Build compiler:                             ON
--   Build libraries:                            ON
--   Build tests:                                ON
--   Build type:                                 Debug
--  Language libraries:
--   Build as3 library:                          ON
--   Build C++ library:                          ON
--     C++ Language Level:                       C++11 [compiler must support it]
--   Build C (GLib) library:                     ON
--   Build Java library:                         OFF
--    - Java Runtime missing
--   Build Python library:                       ON
--   Build Haskell library:                      ON
--  Library features:
--   Build shared libraries:                     ON
--   Build with libevent support:                ON
--   Build with Qt5 support:                     ON
--   Build with ZLIB support:                    ON
-- ----------------------------------------------------------

I've added the JDK-11 to the build.

@Fokko Fokko changed the title THRIFT-4766: Fix JDK9 build THRIFT-4766: Fix JDK11 build Jan 30, 2019
@jeking3
Copy link
Contributor

jeking3 commented Jan 30, 2019

I see, bionic only came with the jre11. Thanks. (next time put it in alphabetically!!)

@jeking3
Copy link
Contributor

jeking3 commented Jan 31, 2019

Looks like the file debian/control needs to be updated for this...

@Fokko
Copy link
Contributor Author

Fokko commented Jan 31, 2019

Thanks for the pointer @jeking3. I'll get rid of the jdk7 since the target is 1.8 as well:

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

I'll also plug in the headless ones, since we don't use any GUI:

root@06e6d3dc7505:/thrift# apt-cache search openjdk
icedtea-8-plugin - web browser plugin based on OpenJDK and IcedTea to execute Java applets
jtreg - Regression Test Harness for the OpenJDK platform
openjdk-8-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-8-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-8-doc - OpenJDK Development Kit (JDK) documentation
openjdk-8-jdk - OpenJDK Development Kit (JDK)
openjdk-8-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-8-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-8-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-8-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark
openjdk-8-source - OpenJDK Development Kit (JDK) source files
openjdk-8-jre-dcevm - Alternative VM for OpenJDK 8 with enhanced class redefinition
uwsgi-plugin-jvm-openjdk-8 - Java plugin for uWSGI (OpenJDK 8)
uwsgi-plugin-jwsgi-openjdk-8 - JWSGI plugin for uWSGI (OpenJDK 8)
uwsgi-plugin-ring-openjdk-8 - Closure/Ring plugin for uWSGI (OpenJDK 8)
uwsgi-plugin-servlet-openjdk-8 - JWSGI plugin for uWSGI (OpenJDK 8)
openjdk-11-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-11-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-11-doc - OpenJDK Development Kit (JDK) documentation
openjdk-11-jdk - OpenJDK Development Kit (JDK)
openjdk-11-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-11-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-11-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-11-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-11-source - OpenJDK Development Kit (JDK) source files

I'll omit 9 and 10 since they are already EOL: https://en.wikipedia.org/wiki/Java_version_history

@Fokko Fokko force-pushed the fd-enable-jdk-9-build branch from 06fd1e5 to bf6e171 Compare January 31, 2019 07:32
@Fokko Fokko force-pushed the fd-enable-jdk-9-build branch from bf6e171 to 8aeb37b Compare January 31, 2019 07:34
@Fokko
Copy link
Contributor Author

Fokko commented Jan 31, 2019

I've also listed the dependencies alphabetically :-)

@Fokko
Copy link
Contributor Author

Fokko commented Jan 31, 2019

I'm seeing some errors:

�[4mRunning "qunit:ThriftDeepConstructor" (qunit) task�[24m
�[31m>> �[39mThere was an error with headless chrome
�[31mFatal error: Failed to launch chrome!
/thrift/src/lib/js/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

Change from headless to the normal JDK. Maybe the libasound is pulled
in transitively.
@jeking3
Copy link
Contributor

jeking3 commented Jan 31, 2019

Our tests load chrome, but something isn't loading libasound. This also happens when you install Visual Studio Code on ubuntu. You can add the libasound2 package to the dockerfile. I would prefer if we use java-11-openjdk-headless...

@Fokko
Copy link
Contributor Author

Fokko commented Feb 1, 2019

I prefer using the headless as well. I've added libasound2 package to the Dockerfile.

@Fokko
Copy link
Contributor Author

Fokko commented Feb 1, 2019

Still some issues with launching Chrome:

�[4mRunning "qunit:ThriftDeepConstructor" (qunit) task�[24m
�[31m>> �[39mThere was an error with headless chrome
�[31mFatal error: Failed to launch chrome!
/thrift/src/lib/js/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: error while loading shared libraries: libatk-bridge-2.0.so.0: cannot open shared object file: No such file or directory

@Fokko
Copy link
Contributor Author

Fokko commented Feb 1, 2019

Another one:

/thrift/src/lib/js/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory

@Fokko
Copy link
Contributor Author

Fokko commented Feb 1, 2019

@jeking3 can you restart the failed builds? The error looks unrelated.

@jeking3 jeking3 merged commit 1686c87 into apache:master Feb 1, 2019
@Fokko Fokko deleted the fd-enable-jdk-9-build branch February 1, 2019 21:05
@jeking3
Copy link
Contributor

jeking3 commented Feb 1, 2019

This has broken the CI builds. It looks like the java runs slower than expected... I think we need to adjust the timeouts on the cross test builds.

@jeking3
Copy link
Contributor

jeking3 commented Feb 1, 2019

I just pushed a fix by increasing the ruby client timeout.

@Fokko
Copy link
Contributor Author

Fokko commented Feb 2, 2019

Thanks, @jeking3 I accidentally force pushed, and therefore discarded your commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants