Results 1 to 7 of 7

Thread: Zimbra Build can't see JDK 1.5

  1. #1
    mtkoan is offline New Member
    Join Date
    May 2010
    Posts
    4
    Rep Power
    5

    Default Zimbra Build can't see JDK 1.5

    Hello,

    I am trying to build Zimbra from the main branch on Slackware-current, source downloaded today with perforce, as per Building Zimbra using Perforce - Zimbra :: Wiki

    I have downloaded jdk 1.5, put it in /usr/local, and symlinked it to java, as requested by the by the build script, but it still can't see jdk 1.5. Here is my /usr/local dir:

    Code:
    drwxr-xr-x  2 root   root  4.0K 2010-04-26 13:55 bin
    drwxr-xr-x  2 root   root  4.0K 2010-03-07 17:27 etc
    drwxr-xr-x  2 root   root  4.0K 1993-11-24 12:32 games
    drwxr-xr-x  4 root   root  4.0K 2010-04-08 00:26 include
    drwxr-xr-x  2 root   root  4.0K 1993-11-24 12:32 info
    lrwxrwxrwx  1 root   root    12 2010-05-13 20:38 java -> jdk1.5.0_22/
    drwxr-xr-x  9 root   root  4.0K 2009-10-09 06:40 jdk1.5.0_22
    drwxr-xr-x  5 root   root  4.0K 2010-04-26 13:55 lib
    drwxr-xr-x  3 root   root  4.0K 2010-03-07 17:26 libexec
    drwxr-xr-x 22 root   root  4.0K 2010-04-08 00:26 man
    drwxr-xr-x 22 root   root  4.0K 2010-03-03 16:55 netbeans-6.8
    drwxr-xr-x  2 root   root  4.0K 2010-03-07 17:27 sbin
    drwxr-xr-x  8 root   root  4.0K 2010-02-02 17:27 sges-v3
    drwxr-xr-x  9 root   root  4.0K 2010-04-26 13:55 share
    drwxr-xr-x  7 mtkoan users  12K 2010-05-13 21:22 src
    and the error from buildZCS.sh:
    Code:
    Checking for prerequisite binaries
      Checking ant
    ./buildZCS.sh: line 79: [: too many arguments
      Checking java
    Error: java not found
    Please obtain JDK 1.5 from:
    http://java.sun.com/javase/downloads/index_jdk5.jsp
    And install it in /usr/local
    Then symlink it to /usr/local/java
    Can anyone help?

  2. #2
    justdave is offline Trained Alumni
    Join Date
    Nov 2008
    Location
    Grand Rapids, MI
    Posts
    123
    Rep Power
    6

    Default

    Despite what it's telling you, it actually needs to have java in your PATH. You probably need to add /usr/local/java/bin to your PATH before telling it to compile.

  3. #3
    lysium is offline Starter Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    5

    Default

    I've got the very same error message because java ran out of memory (needs >256MB, final .jar build fails with 512MB).

    If you're on a shared hoster, try getting more memory.

  4. #4
    quanah is offline Zimbra Employee
    Join Date
    May 2007
    Location
    Zimbra
    Posts
    1,270
    Rep Power
    10

    Default

    You need to figure out why the check for ant is failing as well.
    Quanah Gibson-Mount
    Server Architect
    Zimbra, Inc
    --------------------
    Zimbra :: the leader in open source messaging and collaboration

  5. #5
    mtkoan is offline New Member
    Join Date
    May 2010
    Posts
    4
    Rep Power
    5

    Default

    I'm sure ant is failing? It IS installed, and gave an error that it wasn't prior my installing it. The line (in the script) which is now bad syntax, (not sure why) is:

    Code:
    if [ $MAJOR -eq 1 -a $MINOR -lt 6  -a $PATCH -lt 5 ]; then

  6. #6
    lysium is offline Starter Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    5

    Default

    Quote Originally Posted by mtkoan View Post
    The line (in the script) which is now bad syntax, (not sure why) is:

    Code:
    if [ $MAJOR -eq 1 -a $MINOR -lt 6  -a $PATCH -lt 5 ]; then
    $MAJOR and $MINOR are extracted from java's/ant's output.
    Unfortunatelly, zimbra scripts don't check if that output makes any sense. Furthermore, $MAJOR etc. are not quoted in the test.

    So if the java output is "Could not start the virtual machine", that will be pasted as $MAJOR, resulting in
    Code:
     if [ Could not start the virtual machine -eq 1 ... ]
    Too many arguments for `test`.

  7. #7
    mtkoan is offline New Member
    Join Date
    May 2010
    Posts
    4
    Rep Power
    5

    Default

    Quite right, I checked this yesterday after you posted. Ant is looking for tools.jar in the wrong, place: /usr/lib/java/lib/tools.jar

    while its actually in /usr/lib/java/jdk1.6.0_18/lib

    or, for jdk 1.5
    /usr/local/java/lib

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. slapd message error
    By smoke in forum Administrators
    Replies: 7
    Last Post: 04-27-2008, 03:23 PM
  2. Major Issue - 5.0RC2 NE to 5.0GA NE failed
    By DougWare in forum Installation
    Replies: 7
    Last Post: 01-06-2008, 09:56 PM
  3. Zimbra shutdowns every n hours.
    By Andrewb in forum Administrators
    Replies: 13
    Last Post: 08-14-2007, 08:55 AM
  4. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 PM
  5. Mail logs
    By Rick Baker in forum Installation
    Replies: 8
    Last Post: 01-17-2006, 04:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •