[Mondrian] Updated buildOnJdk.sh

patl at seewind.com patl at seewind.com
Thu Mar 8 22:42:51 EST 2012


It works with a JAVA_HOME_1X passed in.

I can certainly understand your point.  Since you are talking about  
links though, I would suggest you add a note/comment for CentOS/RHEL.   
Since CentOS 5 (RHEL5) doesn't ship an Ant release higher than 1.4.x,  
the "accepted" solution to get Ant 1.7.x is to use the JPP 5.0 repos.   
Unfortunately the maintained version of Ant in the JPP repos does not  
properly resolve symlinks (supposedly by design for one of their  
supported platforms), so you will need to set JAVA_HOME_1X to the  
actual path, without symlinks, to the JDK or the build will fail with  
the standard ant.Launcher ClassNotFound exception.

CentOS/RHEL 6 ship with a supported Ant 1.7.x version that seems to  
handle the symlinks properly, in that it resolves the path, but if you  
use a symlinked path it add /jre to the end of the path automatically.  
  If you set the actual path (like in CentOS 5) it works, and doesn't  
add /jre to the path.  I have no clue why, still looking into this one.

So in both cases you need to set the JAVA_HOME_1X to the full actual  
path, not symlinks.  Hopefully I'll get the CentOS 6 issue figured out  
tomorrow.  Just good to note for people building on CentOS/RHEL 5/6.


Quoting Julian Hyde <jhyde at pentaho.com>:

> Pat,
> Thanks for the patch. However, even though that change works, I'd  
> rather not incorporate it. My goal is that buildOnJdk is simple and  
> not frightening to developers who just want to build the code.  
> Anyone who is technical enough to be installing multiple JDKs and  
> doing releases is technical enough to be editing that file. Or  
> creating links in /usr/lib/jvm.
> (In retrospect, I should not have added the "Darwin" case either. I  
> build on MacOS, but use some JDKs that are not blessed by apple, so  
> the /usr/lib/jvm approach actually works better.)
> When you say "the defaults fail". Hopefully it uses the JAVA_HOME  
> passed in, and successfully builds for that one JDK version. If  
> that's not the case, I'd consider that a bug.
> Julian
> On Mar 8, 2012, at 2:15 PM, Patrick Leckey wrote:
> Julian,
> Saw your changes to buildOnJdk.sh and tried them out - works on Mac  
> OS X Lion and Ubuntu 11.10, but not on CentOS 5/6 (with defaults).   
> Settings JAVA_HOME_16 works, but with that unset the defaults fail  
> on CentOS.
> Attached updated buildOnJdk.sh (as text) that checks the distro and  
> architecture and uses those for the CentOS defaults.  Behaviour on  
> other platforms (Mac, Ubuntu) is unchanged.
> Also now provides the $distroCommonName (which defaults to "Linux"  
> if none found) and $processorType (which is just uname -p) variables.
> Thanks,
> Pat
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org<mailto:Mondrian at pentaho.org>
> http://lists.pentaho.org/mailman/listinfo/mondrian
> <buildOnJdk.txt>

More information about the Mondrian mailing list