Gentoo Archives: gentoo-java

From: Joshua Nichols <nichoj@g.o>
To: Ivan Yosifov <ivan@×××××××.net>
Cc: gentoo-java@l.g.o
Subject: Re: [gentoo-java] migration/eclass/java-utils.eclass: line 97: [: -ge: unary operator expected
Date: Tue, 02 May 2006 18:30:56
Message-Id: 4457A511.2040902@gentoo.org
In Reply to: Re: [gentoo-java] migration/eclass/java-utils.eclass: line 97: [: -ge: unary operator expected by Ivan Yosifov
1 Ivan Yosifov wrote:
2 > Ok...
3 >
4 > I updated migration overlay to revision 2153. Reemerged and updated both
5 > java-config and java-config-wrapper. I now have java-config 2.0.22 and
6 > 1.3.0-r2 installed, java-config-wrapper is 0.8-r2. /usr/bin/java-config is:
7 >
8 > #!/bin/bash
9 >
10 > WANT_JAVA_CONFIG=${WANT_JAVA_CONFIG:="2"}
11 >
12 > JAVA_CONFIG="/usr/bin/java-config-${WANT_JAVA_CONFIG}"
13 >
14 > if [[ -x ${JAVA_CONFIG} ]]; then
15 > exec ${JAVA_CONFIG} "$@"
16 > else
17 > echo "ERROR: Expected to find ${JAVA_CONFIG}"
18 >
19 > While emerging eclipse I (still) get:
20 >
21 > home ~ # emerge -1 eclipse-sdk
22 > Calculating dependencies... done!
23 >
24 >>>> Emerging (1 of 1) dev-util/eclipse-sdk-3.1.2-r2 to /
25 >>>> checking ebuild checksums
26 >>>> checking auxfile checksums
27 >>>> checking miscfile checksums
28 >>>> checking distfiles checksums
29 >>>>
30 > * Checking for at least 768MBytes RAM ...
31 > [ ok ]
32 > true
33 > * Found offending option -fomit-frame-pointer in your CFLAGS
34 >
35 > * One or more potentially gruesome CFLAGS detected. When you run into
36 > trouble,
37 > * please edit /etc/make.conf and remove all offending flags, then recompile
38 > * Eclipse and all its dependencies before submitting a bug report.
39 >
40 > * In particular, gtk+ is extremely sensitive to which which flags it was
41 > * compiled with.
42 >
43 > * Tip: use equery depgraph "=eclipse-sdk-3.1.2-r2" to list all dependencies.
44 >
45 > Cannot find JAVA_HOME in config file /etc/env.d/java/22sun-j2ee-1.3.1
46 > Cannot find JAVA_HOME in config file /etc/env.d/java/22sun-j2ee-1.3.1
47 > Detected a JDK < 1.5.0
48 > Cannot find JAVA_HOME in config file /etc/env.d/java/22sun-j2ee-1.3.1
49 > Detected a JDK >= 1.4.2
50 >
51 >>>> Unpacking source...
52 >>>>
53 >
54 > The env file seems to come from dev-java/sun-j2ee-1.3.1-r3 but that should be
55 > an unrelated problem. Please correct me if I am wrong but line 91 of
56 > java-utils.eclass:
57 >
58 That thing about complaining about JAVA_HOME not found in some env files
59 is a known issue in bugzilla somewhere.
60 > local vm_patch=$(echo ${vm_version} | cut -d. -f3)
61 >
62 > _really_ expects a 3-component vm_version, like 1.2.3. And here java-config -f
63 > returns sun-jdk-1.5, that means a 2-component version "1.5". I described that
64 > my last mail and still feel this is the issue at least in my case.
65 >
66 >
67 You'll need to run java-config-1 -f. java-config reads WANT_JAVA_CONFIG
68 variable to decide which one to actually run (java-config-1 or
69 java-config-2), and by default it uses java-config-2.
70
71 Another thing to try is adding inherit java-pkg to the ebuild. The
72 eclipse plugin doesn't currently inherit it, but the java-pkg.eclass
73 from migration-overlay has a few bits for coping with generation-2
74 being around.
75
76 I also might suggest coming into #gentoo-java on freenode to help work
77 this out, seeing as this thread has been dragging on and hasn't quite
78 been resolved yet.
79
80 - Josh
81
82 --
83 gentoo-java@g.o mailing list