[Mondrian] Updated buildOnJdk script

Patrick Leckey patl at seewind.com
Fri Mar 9 18:23:02 EST 2012


Julian,

Thanks!  I don't think it's necessary on Darwin as ant / java don't seem to have issues with the symlinks.  Seems pretty localized to CentOS / RHEL, but won't hurt other ix distros either.  :)

Pat

On 2012-03-09, at 6:06 PM, Julian Hyde wrote:

> Checked in as change 14996.
> 
> I deliberately didn't use readlink on MacOS/Darwin. That OS (and maybe BSD also) has a readlink command, but the syntax is 'readlink -n' rather than 'readlink -f'. Grr. So much for POSIX.
> 
> Julian
> 
> On Mar 9, 2012, at 10:28 AM, Patrick Leckey wrote:
> 
>> Sorry if this is a double, I didn't see my first send go through.
>> 
>> Julian,
>> 
>> Still don't know why it works on Ubuntu but not CentOS with symlinks.  However I have reverted to your buildOnJdk.sh file and added 1 change that allows it to work on Ubuntu and CentOS/RHEL 5/6.
>> 
>> When you set the defaultJavaHome in chooseJavaHome(), I changed it to resolve the symlink to it's actual path:
>> readlink -f /usr/lib/jvm/${jdkVersion}
>> 
>> This allows different JDKs to be used via symlink as you mentioned, but will pass the actual path the symlink points to as the JAVA_HOME, which fixes the issues on CentOS/RHEL, allowing us non-Ubuntu folk to compile with the defaults, not having to pass in a JAVA_HOME_1X env.
>> 
>> On both CentOS and Ubuntu, the "readlink" util is installed as part of the "coreutils" package, which is installed even with the most minimal installs on both distros, thus not introducing a new package dependency.
>> 
>> It's simply changing line 70, the (*) condition of the case $(uname) block to:
>> defaultJavaHome=`readlink -f /usr/lib/jvm/${jdkVersion}`;;
>> _______________________________________________
>> Mondrian mailing list
>> Mondrian at pentaho.org
>> http://lists.pentaho.org/mailman/listinfo/mondrian
> 
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian



More information about the Mondrian mailing list