Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Gradle on Ubuntu 13.10

I am having a problem running gradle on ubuntu 13.10, which I am assuming is the root of the issue.

I installed gradle using the below command

sudo apt-get install gradle

I am getting an error when running the command gradle -version:

gradle -version

/usr/lib/jvm/default-java/bin/java: symbol lookup error: /usr/lib/jni/libnative-platform-curses.so: undefined symbol: tgetent

I am using java version:

java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4ubuntu3)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

I'm not sure what else to do. I tried different versions of java, but to no avail.

like image 949
user101010101 Avatar asked Oct 22 '13 15:10

user101010101


1 Answers

I've come up with the patch to the Makefile for libnative-platform-jni.

sudo apt-get build-dep libnative-platform-java
apt-get source libnative-platform-java
cd libnative-platform-java-0.3~rc2/

Apply this patch:

--- Makefile.orig   2013-11-20 10:42:54.599476939 -0800
+++ Makefile    2013-11-20 10:43:04.879476606 -0800
@@ -28,7 +28,7 @@
  $(CXX) $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -o $@ $^

 $(ODIR)/libnative-platform-curses.so: $(OBJ_CURSES)
-   $(CXX) $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -lcurses -shared -o $@ $^
+   $(CXX) $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -o $@ $^ -lcurses

 $(JCLASSESDIR)/%.class: javafiles-list
  mkdir -p $(JCLASSESDIR)

Run:

dpkg-source --commit
dpkg-buildpackage
cd ..
sudo dpkg -i libnative-platform-jni_0.3~rc2-2_amd64.deb

Test with

gradle -v

See my comment here: https://bugs.launchpad.net/ubuntu/+source/gradle/+bug/1238322/comments/4

Update: You may want to checkout the ppa here https://launchpad.net/~cwchien/+archive/gradle since gradle 1.4 is pretty old.

like image 122
Eric Woodruff Avatar answered Sep 27 '22 23:09

Eric Woodruff