Mantis - Resin
Viewing Issue Advanced Details
4827 minor always 10-27-11 11:14 10-27-11 14:26
none 4.0.24  
0004827: Build problems with Red Hat 6 (with workarounds)
AMI: RHEL-6.1-Starter-EBS-x86_64-7-Hourly2 (ami-31d41658)

On a clean install....

Get Resin....
# wget [^]
# tar xvf resin-pro-4.0.23.tar.gz
# cd resin-pro-4.0.23
# ./configure --enable-64bit

configure: error: Java 1.6 required. /usr/lib/jvm/bin/java returned: ./configure: line 11263: /usr/lib/jvm/bin/java: No such file or directory

Red Hat, CentOS and Amazon store Java in a slightly different location. I think, but do not know, that our configure should look for the common Java location for Red Hat, Centos and Amazon Linux by default.

# ls /usr/lib/jvm
java-1.5.0-gcj- jre-1.5.0 jre-1.6.0-openjdk.x86_64
java-1.6.0-openjdk- jre-1.5.0-gcj jre-gcj
jre jre-1.6.0 jre-openjdk

To get past this issue, you need to set JAVA_HOME like so.... (My recollection is that you do not have to do this Ubuntu or Debian).

# export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-

Now you will get the JNI issue.

# ./configure --enable-64bit

checking if /bin/cp accepts -u... yes
configure: error:

    *** Can't find JNI directory in JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-
    *** JNI is expected in /usr/lib/jvm/java-1.6.0-openjdk-
Now once you do this....

# sudo yum install java-1.6.0-openjdk-devel.x86_64
# ./configure --enable-64bit

It works.

This is different than Amazon Linux. With Amazon Linux you have to point to the new jdk. I had to setup JAVA_HOME after this. Here I don't. Once the package was installed, it just worked.

The RPM we build needs to include java-1.6.0-openjdk-devel.x86_64.

10-27-11 11:31   
To use open-ssl....

Please don't delete, this is also my notes on how to build the rpm.

# ./configure --enable-64bit --enable-ssl


checking if Java is 64-bit... yes
checking if /bin/cp accepts -u... yes
checking for JNI in /usr/lib/jvm/java-1.6.0-openjdk- ... found
Using JVMTI for class reloading
configure: error: Can't find valid OpenSSL include in
[root@domU-12-31-39-14-66-90 resin-pro-4.0.23]#

# sudo yum install openssl-devel

This gets you past this problem.

This dependency needs to be understood in the rpm.