You are not logged in.
Pages: 1
I am trying to install Ant so I can build a plugin for tuxguitar (tuxguitar.com.ar). Here is the Ant manual: http://ant.apache.org/manual/install.html
Please refer to the Setup section a bit down from the top, I don't understand what to do, here is what it instructs (from link above):
Before you can run Ant there is some additional set up you will need to do unless you are installing the RPM version from jpackage.org:
* Add the bin directory to your path.
* Set the ANT_HOME environment variable to the directory where you installed Ant. On some operating systems, Ant's startup scripts can guess ANT_HOME (Unix dialects and Windows NT/2000), but it is better to not rely on this behavior.
* Optionally, set the JAVA_HOME environment variable (see the Advanced section below). This should be set to the directory where your JDK is installed.Note: Do not install Ant's ant.jar file into the lib/ext directory of the JDK/JRE. Ant is an application, whilst the extension directory is intended for JDK extensions. In particular there are security restrictions on the classes which may be loaded by an extension.
I have so far unzipped the ant-1.7.0.zip file to my desktop and moved the folder to /opt, so I have /opt/apache-ant-1.7.0. I know it work as I did sh /opt/apache-ant-1.7.0/bin/ant and it tried to build what I wanted but gave some errors that I am sure are related to the above, which I need to know how to do.
TIA for any help
Last edited by colbert (2007-12-18 18:12:04)
Offline
pacman -S apache-ant
Offline
peart,
Thank you! I did a pacman search for ant but forgot about the apache part I am now getting this error trying to build it:
bobby@dabox:~/installs/TuxGuitar-alsa-0.9-src$ ant
Unable to locate tools.jar. Expected to find it in /opt/java/lib/tools.jar
Buildfile: build.xml
init:
build:
[echo] +--------------------------------------------------------------------+
[echo] | B U I L D I N G T U X G U I T A R - A L S A |
[echo] +--------------------------------------------------------------------+
[javac] Compiling 10 source files to /home/bobby/installs/TuxGuitar-alsa-0.9-src/build
BUILD FAILED
/home/bobby/installs/TuxGuitar-alsa-0.9-src/build.xml:34: 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 "/opt/java/jre"
Total time: 0 seconds
bobby@dabox:~/installs/TuxGuitar-alsa-0.9-src$
??
Offline
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/opt/java/jre"
Do you have 'jdk' installed?
Offline
Cerebral, thanks, just installed and am getting this now:
bobby@dabox:~/installs/TuxGuitar-alsa-0.9-src$ ant
Buildfile: build.xml
init:
build:
[echo] +--------------------------------------------------------------------+
[echo] | B U I L D I N G T U X G U I T A R - A L S A |
[echo] +--------------------------------------------------------------------+
[javac] Compiling 10 source files to /home/bobby/installs/TuxGuitar-alsa-0.9-src/build
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[echo] +--------------------------------------------------------------------+
[echo] | P A C K A G I N G T U X G U I T A R - A L S A |
[echo] +--------------------------------------------------------------------+
[jar] Building jar: /home/bobby/installs/TuxGuitar-alsa-0.9-src/TuxGuitar-alsa.jar
[echo] +--------------------------------------------------------------------+
[echo] | B U I L D I N G N A T I V E - L I B R A R I E S |
[echo] +--------------------------------------------------------------------+
[exec] gcc -c -o midi_receiver.o midi_receiver.c
[exec] In file included from midi_receiver.c:3:
[exec] midi_receiver.h:2:17: error: jni.h: No such file or directory
[exec] In file included from midi_receiver.c:3:
[exec] midi_receiver.h:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.h:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.h:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.h:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.h:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.h:63: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.h:71: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.c:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.c:67: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.c:80: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.c:99: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.c:116: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.c:133: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.c:152: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] midi_receiver.c:171: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
[exec] make: *** [midi_receiver.o] Error 1
BUILD FAILED
/home/bobby/installs/TuxGuitar-alsa-0.9-src/build.xml:52: exec returned: 2
Total time: 3 seconds
bobby@dabox:~/installs/TuxGuitar-alsa-0.9-src$
If it's an error specific to the program I'm trying to install I can try their forum.
Offline
[exec] In file included from midi_receiver.c:3:
[exec] midi_receiver.h:2:17: error: jni.h: No such file or directory
That seems to be the real problem. This file should be in jdk:
$ pacman -Ql jdk | grep jni
jdk /opt/java/include/jni.h
I think you need to make sure your include path has /opt/java/include in it. Try running
source /etc/profile
then running ant again - the jdk package includes a file in /etc/profile.d that might set up your paths properly and is only sourced when you login or when you explicitly source it (like above)
Offline
Okay, I did:
[bobby@dabox TuxGuitar-alsa-0.9-src]$ pacman -Ql jdk | grep jni
jdk /opt/java/include/jni.h
jdk /opt/java/include/linux/jni_md.h
[bobby@dabox TuxGuitar-alsa-0.9-src]$
then
source /etc/profile
I also edited /etc/profile and in export PATH I added /opt/java/. I did above command again. Still the same error on "ant"
Offline
source /etc/profile
I also edited /etc/profile and in export PATH I added /opt/java/. I did above command again. Still the same error on "ant"
Well, you shouldn't have to edit /etc/profile but I guess that wouldn't cause this error. Does it still say it couldn't find jni.h? I'm unfamiliar with ant in general, but that seems to be the source of your problem - somehow you've got to tell it to look in /opt/java/include for its header files. Maybe someone else can pick it up from here, since that's about all I know.
Offline
On the website's forum, the developer has helped me. I had to edit the MakeFile and uncomment the #INCLUDES line. Thanks a lot for your help Cerebral, this Arch community is fantastic
Offline
Pages: 1