Notes |
|
(0005580)
|
rickHigh
|
10-24-11 16:23
|
|
To get Resin to compile at all you need this command:
sudo yum groupinstall "Development Tools"
This installs all of the dev tools like C compiler.
It still fails to find the JNI libs....
configure: error:
*** Can't find JNI directory in JAVA_HOME=/usr/lib/jvm/jre
*** JNI is expected in /usr/lib/jvm/jre/include/linux
I ran into this same issue with CentOS 4.5 a few weeks ago when trying to track down a CentOS compile issue.
Amazon Linux is CentOS....
http://www.infoworld.com/d/open-source/why-red-hat-should-fear-amazon-linux-675 [^] |
|
|
(0005582)
|
rickHigh
|
10-25-11 00:28
|
|
This seem to do the trick for getting the header....
sudo yum install java-1.6.0-openjdk-devel.x86_64
$ pwd
/usr/lib/jvm
[ec2-user@ip-10-124-214-37 jvm]$ find . -name "*.h"
./java-1.6.0-openjdk-1.6.0.0.x86_64/include/jawt.h
./java-1.6.0-openjdk-1.6.0.0.x86_64/include/classfile_constants.h
./java-1.6.0-openjdk-1.6.0.0.x86_64/include/jvmticmlr.h
./java-1.6.0-openjdk-1.6.0.0.x86_64/include/jni.h
./java-1.6.0-openjdk-1.6.0.0.x86_64/include/jdwpTransport.h
./java-1.6.0-openjdk-1.6.0.0.x86_64/include/jvmti.h
./java-1.6.0-openjdk-1.6.0.0.x86_64/include/linux/jni_md.h
./java-1.6.0-openjdk-1.6.0.0.x86_64/include/linux/jawt_md.h
To get the gcc compiler...
sudo yum groupinstall 'Development Tools'
I was still getting compile error....
configure: error:
*** Can't find JNI directory in JAVA_HOME=/usr/lib/jvm/jre
*** JNI is expected in /usr/lib/jvm/jre/include/linux
$ export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
This got me past that issue.
I changed it to 64 bit (not sure why this is not the default on a 64 bit OS)
$ ./configure --enable-64bit
OpenSSL support not enabled at this point.
That seemed to work. |
|
|
(0005584)
|
rickHigh
|
10-27-11 00:50
|
|
Even when you install the right obscure package that has the headers. The build does not work without manually setting JAVA_HOME which does not work for rpmbuild to build rpm files as you can't rely on manually setting JAVA_HOME. |
|
|
(0005585)
|
rickHigh
|
10-27-11 00:53
|
|
To get rpmbuild to work with creating a resin rpm, I needed to set the following...
sudo ln -s /usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin /usr/lib/jvm/bin
somehow the build expects java to be in /usr/lib/jvm/bin and it is not for Amazon WS and CentOS. |
|
|
(0005586)
|
rickHigh
|
10-27-11 00:57
|
|
Now I am getting this from rpmbuild. It seems like he resets the JAVA_HOME
checking if /bin/cp accepts -u... yes
configure: error:
*** Can't find JNI directory in JAVA_HOME=/usr/lib/jvm
*** JNI is expected in /usr/lib/jvm/include/linux
error: Bad exit status from /var/tmp/rpm-tmp.sotT7x (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.sotT7x (%build)
[ec2-user@domU-12-31-38-04-B2-A3 resin-rpm]$ echo $JAVA_HOME
/usr/lib/jvm/java-1.6.0-openjdk.x86_64 |
|
|
(0005587)
|
rickHigh
|
10-27-11 01:02
|
|
[ec2-user@domU-12-31-38-04-B2-A3 resin-rpm]$ sudo mv /usr/lib/jvm /usr/lib/java-libs
[ec2-user@domU-12-31-38-04-B2-A3 resin-rpm]$ sudo ln -s /usr/lib/java-libs/java-1.6.0-openjdk.x86_64/ /usr/lib/jvm
[ec2-user@domU-12-31-38-04-B2-A3 resin-rpm]$ export JAVA_HOME=/usr/lib/jvm
Now the rpmbuild fails with...
[ec2-user@domU-12-31-38-04-B2-A3 resin-rpm]$ sudo rpmbuild -v -bb --clean SPECS/resin.spec
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking for JAVA_HOME...
configure: error: Can't find valid JAVA_HOME
error: Bad exit status from /var/tmp/rpm-tmp.Z9fgLH (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.Z9fgLH (%build) |
|