First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 142538
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Java team <java@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Vlastimil Babka (Caster) <caster@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ant.patch attempt to fix the ant startup script patch Vlastimil Babka (Caster) 2006-08-02 07:30 0000 1.32 KB Details | Diff
1.6.5-ant.patch improved ant startup script patch, allowing to disable ant-tasks and their deps if they are not installed or overrided by JAVA_PKG_FORCE_NOANTTASKS=yes patch Vlastimil Babka (Caster) 2006-08-02 17:24 0000 1.79 KB Details | Diff
ant-core-1.6.5-r13.ebuild.patch patch for ant-core ebuild to create needed dir to work with the startup script patch patch Vlastimil Babka (Caster) 2006-08-02 17:30 0000 589 bytes Details | Diff
java-utils-2.eclass-sysclasspath-ignore.patch patch for java-utils-2.eclass to make build.sysclasspath ignored by default patch Vlastimil Babka (Caster) 2007-11-11 11:34 0000 862 bytes Details | Diff
x86.txt list of x86 stable packages text/plain Vlastimil Babka (Caster) 2007-11-11 22:18 0000 6.33 KB Details
amd64.txt amd64 list text/plain Vlastimil Babka (Caster) 2007-11-12 07:13 0000 5.98 KB Details
ppc.txt ppc list text/plain Vlastimil Babka (Caster) 2007-11-12 13:03 0000 4.42 KB Details
ppc64.txt ppc64 list text/plain Vlastimil Babka (Caster) 2007-11-12 13:04 0000 2.50 KB Details
20071113-105245.log build.log for dev-java/xom-1.0-r2 text/plain Christian Faulhammer 2007-11-13 14:08 0000 12.67 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 142538 depends on: 199673 Show dependency tree
Bug 142538 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-08-02 07:27 0000
As bug 142186 showed, classpath that ant uses for itself can affect the stuff
being compiled too. Look at this - http://ant.apache.org/manual/running.html

Especially:
Note that the CLASSPATH environment variable is passed to Ant using a -lib
option. Ant itself is started with a very minimalistic classpath. Ant should
work perfectly well with an empty CLASSPATH environment variable, something the
the -noclasspath option actually enforces. We get many more support calls
related to classpath problems (especially quoting problems) than we like.

the current ant startup script doesn't do that, it's passing the CLASSPATH for
ant's libs to the VM directly, so they are affecting the javac compiling
stuff... This should be fixed.

------- Comment #1 From Vlastimil Babka (Caster) 2006-08-02 07:30:37 0000 -------
Created an attachment (id=93262) [details]
attempt to fix the ant startup script

attempt to fix that. the classpath for stuff needed by optional ant tasks isn't
appended to the JVM classpath but passed to ant with -lib. Seems to work here
but I don't guarantee it's proper :)

------- Comment #2 From Vlastimil Babka (Caster) 2006-08-02 07:47:14 0000 -------
Hm no that wasn't it. It behaves the same, providing anything passed by the
-lib to the compiled stuff too. But still the patch could be applied if it
doesn't break anything, as upstream suggests -lib usage.

What makes the difference is using -Dbuild.sysclasspath=ignore. See
http://ant.apache.org/manual/sysclasspath.html. Maybe this should be added to
the eant in eclass?

------- Comment #3 From Josh Nichols (RETIRED) 2006-08-02 08:32:16 0000 -------
We should probably get an overlay setup to test this, and then would need to
test _all_ java packages.

This is an issue I've wanted to address for some time, but it'll take a bit of
time to fully address...

------- Comment #4 From Josh Nichols (RETIRED) 2006-08-02 08:54:17 0000 -------
Ok, here's what I can do...

There's a java-strict FEATURE that is used a few times. So in eant, I do:

        if is-java-strict; then
                einfo "Disabling system classpath for ant"
                antflags="${antflags} -Dbuild.sysclasspath=ignore"
        fi

This will let us be able to test it by having FEATURES=java-strict, and let
other users be able to test it too. Once we're sure it'll work everywhere, we
can make it the default behavior.

------- Comment #5 From Vlastimil Babka (Caster) 2006-08-02 09:19:14 0000 -------
Great. On a related note, I was thinking about ant-tasks. Trying to test if
package needs full ant with ant-tasks or if ant-core is enough isn't the
easiest. I need to quickpkg ant-tasks, unmerge it, test and later merge it back
from package. If it was possible to determine if ant-tasks are used with some
envvar, it would be easier. Currently ant-tasks symlink their libs to
$ANT_HOME/libs so it's kinda unseparable. This dir is passed as
-Dant.library.dir. If it wasn't symlinked, maybe we could pass the dirs
separated, allowing to leave the ant-tasks one if wanted. But I guess
-Dant.library.dir can be only one dir... in that case there would have to be
new dir that would get symlinks from both ant-core and ant-tasks, and the env
flag could determine if the full dir is used or just ant-core/lib dir...

------- Comment #6 From Vlastimil Babka (Caster) 2006-08-02 17:24:24 0000 -------
Created an attachment (id=93304) [details]
improved ant startup script patch, allowing to disable ant-tasks and their deps
if they are not installed or overrided by JAVA_PKG_FORCE_NOANTTASKS=yes

------- Comment #7 From Vlastimil Babka (Caster) 2006-08-02 17:30:13 0000 -------
Created an attachment (id=93305) [details]
patch for ant-core ebuild to create needed dir to work with the startup script
patch

The idea of this is that it will create /usr/share/ant-core/lib-core in
addition to /usr/share/lib. ant-tasks ebuild puts symlinks to the .../lib so
.../lib-core stays clean and can be used to invoke ant without ant-tasks and
their classpath deps even if they are installed, by setting
JAVA_PKG_FORCE_NOANTTASKS=yes. The eclass could then set this variable in eant
based on FEATURES="java-strict" and DEPENDS containing only ant-core, not full
ant or ant-core + ant-tasks. It would be then easier to determine what is
needed when creating+testing the ebuild.

This is the basic idea, not the most elegant, on IRC nichoj came up with even
more complicated way of having each of ant-tasks in separate ebuild and
precisely defining which ones to load...

------- Comment #8 From Vlastimil Babka (Caster) 2006-08-03 05:21:52 0000 -------
Actually this lib-core dir and symlink voodoo isn't needed. And it would be
impossible to implement the idea of separated ant tasks (+ their deps) like
that, imagine one libdir with symlinks for each of possible combinations of
enabled tasks... Luckily, it's equivalent to pass just the minimalist
ant-core/lib (without symlinked jars from ant-tasks) as ant.library.dir and
pass any desired task jars and their deps as -lib $TASKSCLASSPATH.

------- Comment #9 From Vlastimil Babka (Caster) 2007-01-08 00:46:00 0000 -------
Ignore comments 5-8 because split-ant is handled elsewhere :)

(In reply to comment #4)
> This will let us be able to test it by having FEATURES=java-strict, and let
> other users be able to test it too. Once we're sure it'll work everywhere, we
> can make it the default behavior.

How bout we make it the default behaviour already? I don't think many bugs
should pop up at this point.

------- Comment #10 From Petteri Räty 2007-05-07 14:11:34 0000 -------
(In reply to comment #9)
> 
> How bout we make it the default behaviour already? I don't think many bugs
> should pop up at this point.
> 

In ~arch this is safe. Someone should run a script on a stable machine to
emerge everything with this on before we always turn it on.

------- Comment #11 From Vlastimil Babka (Caster) 2007-09-05 13:05:10 0000 -------
Well seems now we have the script, so time to toss it on arch teams (with
eclass patch that makes sysclasspath-ignore passed always), like in the
sun-jdk-1.6 case? And then apply the patch.

------- Comment #12 From Petteri Räty 2007-09-05 18:27:16 0000 -------
(In reply to comment #11)
> Well seems now we have the script, so time to toss it on arch teams (with
> eclass patch that makes sysclasspath-ignore passed always), like in the
> sun-jdk-1.6 case? And then apply the patch.
> 

Indeed. We could have done them both at the same time :)

------- Comment #13 From Vlastimil Babka (Caster) 2007-11-11 11:34:34 0000 -------
Created an attachment (id=135729) [details]
patch for java-utils-2.eclass to make build.sysclasspath ignored by default

------- Comment #14 From Vlastimil Babka (Caster) 2007-11-11 22:18:00 0000 -------
Created an attachment (id=135776) [details]
list of x86 stable packages

OK time to make the build.sysclasspath setting default and not only
JAVA_PKG_STRICT. But because it affects stable ebuilds, it should be tested
first. I'll be attaching lists for arches to test, please apply the eclass
patch locally and report results.

------- Comment #15 From Vlastimil Babka (Caster) 2007-11-12 07:13:07 0000 -------
Created an attachment (id=135796) [details]
amd64 list

------- Comment #16 From Vlastimil Babka (Caster) 2007-11-12 13:03:41 0000 -------
Created an attachment (id=135820) [details]
ppc list

------- Comment #17 From Vlastimil Babka (Caster) 2007-11-12 13:04:10 0000 -------
Created an attachment (id=135822) [details]
ppc64 list

------- Comment #18 From Christian Faulhammer 2007-11-12 14:49:50 0000 -------
portagemaster is masked for removal, so no need to test it.

------- Comment #19 From Vlastimil Babka (Caster) 2007-11-12 22:20:05 0000 -------
(In reply to comment #18)
> portagemaster is masked for removal, so no need to test it.

Yeah it's possible that the script for creating the list doesn't take p.mask
into account, so just skip such packages, thanks.

------- Comment #20 From Petteri Räty 2007-11-12 22:49:56 0000 -------
(In reply to comment #19)
> (In reply to comment #18)
> > portagemaster is masked for removal, so no need to test it.
> 
> Yeah it's possible that the script for creating the list doesn't take p.mask
> into account, so just skip such packages, thanks.
> 

http://overlays.gentoo.org/proj/java/browser/scripts/find-stable-java-ebuilds

Script updated to now show package.masked stuff.

------- Comment #21 From Christian Faulhammer 2007-11-12 23:14:17 0000 -------
Filtered jikes and ecj-3.2 on dev-java/commons-logging.
Filtered jikes on games-util/searchtool

(When I noticed that I did not apply the patch nearly all packages were already
tested...thumbs up for wasted calculation cycles), will come back in some hours
with results for x86.

------- Comment #22 From Christian Faulhammer 2007-11-13 14:08:33 0000 -------
Created an attachment (id=135886) [details]
build.log for dev-java/xom-1.0-r2

dev-java/xom fails, succeeds without patch


filtered jikes on dev-java/jakarta-jstl, app-editors/jedit, dev-java/relaxngcc,
dev-java/spin, dev-java/xstream and dev-db/octopus


>>> Install mx4j-3.0.1-r2 into /var/tmp/portage/dev-java/mx4j-3.0.1-r2/image/ category dev-java
java-pkg_dosrc called without app-arch/zip in DEPEND

------- Comment #23 From Christian Faulhammer 2007-11-13 14:09:09 0000 -------
x86 out of here, only one package failing

------- Comment #24 From Petteri Räty 2007-11-13 21:55:17 0000 -------
(In reply to comment #22)
> Created an attachment (id=135886) [edit] [details]
> build.log for dev-java/xom-1.0-r2
> 
> dev-java/xom fails, succeeds without patch
> 

Please post the error.

> 
> 
> >>> Install mx4j-3.0.1-r2 into /var/tmp/portage/dev-java/mx4j-3.0.1-r2/image/ category dev-java
> java-pkg_dosrc called without app-arch/zip in DEPEND
> 

Fixed.

------- Comment #25 From Petteri Räty 2007-11-13 21:55:39 0000 -------
(In reply to comment #24)
> (In reply to comment #22)
> > Created an attachment (id=135886) [edit] [details]
> > build.log for dev-java/xom-1.0-r2
> > 
> > dev-java/xom fails, succeeds without patch
> > 
> 
> Please post the error.
> 

lol there is the log

------- Comment #26 From Petteri Räty 2007-11-13 23:28:26 0000 -------
+*xom-1.0-r3 (13 Nov 2007)
+
+  13 Nov 2007; Petteri Räty <betelgeuse@gentoo.org> +xom-1.0-r3.ebuild:
+  dev-java/servletapi is only needed to build the examples to add examples use
+  flag. Also now it does not get picked automatically from ant classpath.
+  Reported in bug #142538.
+

Ok so let's get this stable.

------- Comment #27 From Christian Faulhammer 2007-11-14 07:52:59 0000 -------
x86 stable

------- Comment #28 From Krzysiek Pawlik 2007-11-15 18:48:55 0000 -------
xom stable on ppc, I'm compiling packages from the list now, will report back
when it finishes.

------- Comment #29 From Krzysiek Pawlik 2007-11-16 07:56:00 0000 -------
All ok on ppc.

------- Comment #30 From Vlastimil Babka (Caster) 2007-11-24 12:32:02 0000 -------
(In reply to comment #26)
> +*xom-1.0-r3 (13 Nov 2007)
> Ok so let's get this stable.

Not this one anymore but -r4 in the blocker bug 199673.

------- Comment #31 From Samuli Suominen 2007-11-24 16:01:56 0000 -------
from amd64 list here,

emerge: there are no ebuilds to satisfy "dev-java/jgoodies-looks:1.3".
emerge: there are no ebuilds to satisfy "dev-java/xerces:2.6".

Calculating dependencies... done!
[ebuild  N    ] www-servers/tomcat-6.0.14-r1  USE="test -doc -examples -source" 
[ebuild  N    ]  dev-java/commons-dbcp-1.2.2  USE="test -doc -source" 
!!! Error: circular dependencies:

('ebuild', '/', 'dev-java/commons-dbcp-1.2.2', 'merge') depends on
   ('ebuild', '/', 'www-servers/tomcat-6.0.14-r1', 'merge') (hard)
('ebuild', '/', 'www-servers/tomcat-6.0.14-r1', 'merge') depends on
   ('ebuild', '/', 'dev-java/commons-dbcp-1.2.2', 'merge') (hard)

!!! Note that circular dependencies can often be avoided by temporarily
!!! disabling USE flags that trigger optional dependencies.

------- Comment #32 From Samuli Suominen 2007-11-24 16:06:32 0000 -------
Removed ebuilds and I guess the circular dep. can't be avoided with test?
Anyway, giving a shot to the list now.

------- Comment #33 From Markus Rothe 2007-11-24 17:52:54 0000 -------
xom-1.0-r4 stable on ppc64. all other packages compile/install.

------- Comment #34 From Samuli Suominen 2007-11-24 19:24:12 0000 -------
amd64 is good,

I've emerged everything from list posted here w/ patch applied.

However, these fail test suite:

joda-time, bug 187616
pmd, bug 200220

------- Comment #35 From Vlastimil Babka (Caster) 2007-11-25 07:52:38 0000 -------
Eclass patch commited. Thanks everyone.

First Last Prev Next    No search results available      Search page      Enter new bug