Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken Vagrant build #4995

Merged
merged 1 commit into from
Jul 15, 2019
Merged

Conversation

gkristic
Copy link
Contributor

Although provisioning succeeds, the Vagrant box fails to build Vitess on first vagrant ssh. It aborts on a missing Java compiler when trying to build Zookeeper, thus missing plenty of dependencies:

BUILD FAILED
/vagrant/dist/vt-zookeeper-3.4.14/zookeeper-3.4.14/build.xml:321: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-8-openjdk-amd64/jre"

Total time: 1 minute 19 seconds
ERROR: Zookeeper build failed

Note the JAVA_HOME.

Furthermore, although bootstrap.sh aborts, build.sh still continues. This makes the process end with a misleading error on Go dependencies:

... <<< Plenty of packages omitted here for brevity >>> ...
go/cmd/zk/zkcmd.go:36:2: cannot find package "golang.org/x/crypto/ssh/terminal" in any of:
        /vagrant/src/vitess.io/vitess/vendor/golang.org/x/crypto/ssh/terminal (vendor tree)
        /usr/local/go/src/golang.org/x/crypto/ssh/terminal (from $GOROOT)
        /vagrant/src/golang.org/x/crypto/ssh/terminal (from $GOPATH)
go/vt/vtgate/vtgateservice/vtgateservice_testing/mock_vtgateservice.go:10:2: cannot find package "github.com/golang/mock/gomock" in any of:
        /vagrant/src/vitess.io/vitess/vendor/github.com/golang/mock/gomock (vendor tree)
        /usr/local/go/src/github.com/golang/mock/gomock (from $GOROOT)
        /vagrant/src/github.com/golang/mock/gomock (from $GOPATH)
Makefile:47: recipe for target 'build' failed
make: *** [build] Error 1
\Build completed

This PR changes openjdk-7-jdk to openjdk-8-jdk, that is now available for the Ubuntu version (see here), matching the version used for Docker. (An example for #4780.) It also makes the build script abort on errors, just like bootstrap.sh does. This seems to make #4883 obsolete.

Add missing openjdk-8-jdk package and fix the build script to abort on
errors. (The bootstrap script was already doing that, but build.sh
attempts running make anyway.)

Signed-off-by: Gustavo Kristic <gkristic@gmail.com>
@gkristic gkristic requested a review from sougou as a code owner July 15, 2019 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants