Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 220779
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: vorfeed.canal@gmail.com
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 220779 depends on: Show dependency tree
Bug 220779 blocks:
Votes: 20    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: 2008-05-07 16:08 0000
Upstream explanation is here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32712

Basically you need to either put ftp://sourceware.org/pub/java/ecj-latest.jar
as ecg.jar in /var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0 before
calling GCC 4.3's configure or use --with-ecj-jar=filename option...

In this case GCC 4.3 will create useful
/usr/libexec/gcc/i686-pc-linux-gnu/4.3.0/ecj1 and GCJ will work. If ecj.jar is
not found at compilation time then it's up to user to provide ecj1 in $PATH...

------- Comment #1 From Nils Larsson 2008-05-28 19:18:51 0000 -------
(In reply to comment #0)
> Upstream explanation is here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32712
> 
> Basically you need to either put ftp://sourceware.org/pub/java/ecj-latest.jar
> as ecg.jar in /var/tmp/portage/sys-devel/gcc-4.3.0/work/gcc-4.3.0 before
> calling GCC 4.3's configure or use --with-ecj-jar=filename option...
> 
> In this case GCC 4.3 will create useful
> /usr/libexec/gcc/i686-pc-linux-gnu/4.3.0/ecj1 and GCJ will work. If ecj.jar is
> not found at compilation time then it's up to user to provide ecj1 in $PATH...
> 

Adding
cd ${WORKDIR}/${P}/contrib && ./download_ecj
last in src_unpack() and adding net-ftp/ftp as a dep. to gcj fixes this( I
think, still compiling... ). I imagine there's a better way then the
download_ecj and the ftp dep. it requires, but it's the GCC way of doing it.
Maybe, 
wget ftp://sourceware.org/pub/java/ecj-latest.jar -O
${WORKDIR}/${P}/contrib/ecj.jar
is nicer. I'm new to all this :)

------- Comment #2 From Nils Larsson 2008-05-28 19:27:52 0000 -------
Oops, ecj.jar should go in top-dir. So, (with ftp)
cd ${WORKDIR}/${P} && ./contrib/download_ecj
or
wget ftp://sourceware.org/pub/java/ecj-latest.jar -O ${WORKDIR}/${P}/ecj.jar

------- Comment #3 From vorfeed.canal@gmail.com 2008-05-29 22:33:19 0000 -------
Yes, this hack will work (I did something similar), but it's not a good
long-term solution. What happens if later
ftp://sourceware.org/pub/java/ecj-latest.jar will be changed and will only work
with gcc 4.10 or something like this? It's create a mess. To fix it properly
this file should be mirrored somewhere (probably on Gentoo mirrors) under sane
name (something like ecj-20070727.jar), then it should be downloaded as normal
file and put in proper place at src_unpack stage.

------- Comment #4 From SpanKY 2008-06-22 15:05:50 0000 -------
*** Bug 225605 has been marked as a duplicate of this bug. ***

------- Comment #5 From SpanKY 2008-06-22 15:21:19 0000 -------
maintaining any java stuff in gcc is undesirable

java team: can you update dev-java/eclipse-ecj so as to provide an `ecj1`
symlink ?

------- Comment #6 From Ceki Gulcu 2008-06-28 12:02:42 0000 -------
I stumbled upon this report while tyring to build "pdftk".

Following the suggestions found here, I have installed
dev-java/eclipse-ecj and created a symlink from /usr/bin/ecj1 to
/usr/bin/ecj-3.3. However, I have not rebuilt gcc because it takes
"forever".

Building the" pdftk" fails with

>>> Compiling source in /var/tmp/portage/app-text/pdftk-1.41/work/pdftk-1.41/pdftk ...
make -C ../java_libs
make[1]: Entering directory
`/var/tmp/portage/app-text/pdftk-1.41/work/pdftk-1.41/java_libs'
make -C
"/var/tmp/portage/app-text/pdftk-1.41/work/pdftk-1.41/java_libs/gnu_local/java/security";
make[2]: Entering directory
`/var/tmp/portage/app-text/pdftk-1.41/work/pdftk-1.41/java_libs/gnu_local/java/security'
gcj -march=k8 -O2 -pipe --encoding=UTF-8
--classpath="/var/tmp/portage/app-text/pdftk-1.41/work/pdftk-1.41/java_libs" -c
Engine.java -o E
ngine.o
/usr/lib64/portage/pym/portage_dep.py:39: DeprecationWarning: DEPRECATION
NOTICE: The portage_dep module was replaced by portage.dep
Unrecognized option :
-fbootclasspath=/var/tmp/portage/app-text/pdftk-1.41/work/pdftk-1.41/java_libs/:/usr/share/gcc-data/x86_64-pc-linux
-gnu/4.3.1/java/libgcj-4.3.1.jar

Should I rebuild gcc?

------- Comment #7 From Ceki Gulcu 2008-06-28 15:18:26 0000 -------
Given my time constraints, and the fact that the problem has been
introduced with gcc version 4.3, I circumvented this problem by
reverting to the earlier version of gcc installed on my system, namely
version 3.4.4.

Unfortunately, this version of gcc was hard masked so I could not
emerge gcc version 3.4.4.. The solution was to find an unmasked
version earlier than version 4.3 but later than version 3.4.4.

Here is how I did it:

> emerge -pv '<sys-devel/gcc-4'
[ebuild   R   ] sys-devel/gcc-3.4.6-r2  USE="fortran gcj nls (-altivec)
-bootstrap -boundschecking -build -d -doc -gtk (-hardened) -ip28 -ip32r10k
-libffi (-multilib) -multislot (-n32) (-n64) -nocxx -nopie -nossp -objc -test
-vanilla" 0 kB

> USE="gcj" emerge '=sys-devel/gcc-3.4.6-r2'

I also followed the directions for upgrading GCC [1].

HTH,

[1] http://www.gentoo.org/doc/en/gcc-upgrading.xml

------- Comment #8 From Andrej Gelenberg 2008-06-30 15:51:13 0000 -------
I have maked it work.

1. emerge eclips-ecj
2. sudo vim /usr/bin/ecj1
 and where change
gjl_main="org.eclipse.jdt.internal.compiler.batch.Main"
to
gjl_main="org.eclipse.jdt.internal.compiler.batch.GCCMain"

------- Comment #9 From Andrej Gelenberg 2008-06-30 15:58:46 0000 -------
Know someone from where ecj1 come from?

------- Comment #10 From Andrew John Hughes 2008-07-01 19:12:18 0000 -------
contrib/download_ecj is the acknowledged way of fulfilling this dependency by
upstream.  Hence others will depend on it so the jar file is hardly going to
move.  But if you think it's a problem, then you should discuss it with them
rather than complaining here.

As to 'maintaining any java stuff in gcc is undesirable', it's part of gcc so
get over it.

------- Comment #11 From Andrew John Hughes 2008-07-01 19:14:57 0000 -------
Having an ecj1 symlink won't cut it completely, the build also needs to be
supplied with a copy of ecj.jar.  By far the easiest way to do this is to patch
gcc-4.3.1 to download ecj as upstream specifies.

------- Comment #12 From Andrew John Hughes 2008-07-01 19:28:25 0000 -------
I've put the patched version in the java-overlay for now but this isn't a
permanent solution.  Please fix gcc.

------- Comment #13 From Andrew John Hughes 2008-07-01 19:51:27 0000 -------
Tom Tromey has kindly made the ecj-latest.jar into a symlink which currently
points to ecj-4.3.jar.

ftp://sourceware.org/pub/java/

So now the Gentoo ebuild can rely on this version for 4.3

------- Comment #14 From James Le Cuirot 2008-07-08 17:01:32 0000 -------
I've made the ebuild in java-overlay slightly less evil. No one likes using
wget during src_unpack.

------- Comment #15 From Andreas Klauer 2008-07-20 14:54:13 0000 -------
I couldn't get this to work, not manually and not with the ebuilds from the
java overlay. So I resorted to emerging gcc 4.2 in a separate slot (gcc-4.2
with gcj useflag, gcc-4.3 without), and symlinked gcj and gcjh to the 4.2
version. With this I can emerge "pdftk" again. Not sure if mixing gcc-4.2 and
4.3 like this is a good idea in general. Would love to see a proper fix for
gcc-4.3.

------- Comment #16 From James Le Cuirot 2008-07-20 14:58:58 0000 -------
What was the problem though?

------- Comment #17 From Andrew John Hughes 2008-07-25 18:47:31 0000 -------
The problem is the current build of gcj is unusable -- it can't compile
anything.

------- Comment #18 From James Le Cuirot 2008-07-25 19:01:58 0000 -------
No, I meant what was the problem that Andreas had with the ebuilds from the
overlay?

------- Comment #19 From Nikolay Orlyuk 2008-08-02 19:53:57 0000 -------
I'm completely lost with this ecj1...

I have no /usr/bin/ecj1 and I'm getting (dev-java/eclipse-ecj-3.4-r2):
>>> Unpacking ecjsrc-3.4.zip to /var/tmp/portage/portage/dev-java/eclipse-ecj-3.4-r2/work
 * bootstrapping ecj with /usr/x86_64-pc-linux-gnu/gcc-bin/4.3.1/gcj -C ...
gcj: error trying to exec 'ecj1': execvp: Permission denied

for hello.java:
gcj: error trying to exec 'ecj1': execvp: No such file or directory

I have /usr/bin/ecj with "...batch.Main", so when I create symlink for ecj1:
 * bootstrapping ecj with /usr/x86_64-pc-linux-gnu/gcc-bin/4.3.1/gcj -C ...
Unrecognized option :
/var/tmp/portage/portage/dev-java/eclipse-ecj-3.4-r2/temp//ccnGH4Tajx

for hello.java:
invalid debug option: -g1

When I change gjl_main to "...batch.GCCMain":
 * bootstrapping ecj with /usr/x86_64-pc-linux-gnu/gcc-bin/4.3.1/gcj -C ...
java.lang.ArrayIndexOutOfBoundsException: -1
        at
org.eclipse.jdt.internal.compiler.parser.Parser.consumeFieldAccess(Parser.java:3492)
        at
org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:5688)
        at
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9007)
        at
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9238)
        at
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9195)
        at
org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:7851)
        at
org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:587)
        at
org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357)
        at
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371)
        at
org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:3410)
        at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1607)
        at
org.eclipse.jdt.internal.compiler.batch.GCCMain.compile(GCCMain.java:475)
        at
org.eclipse.jdt.internal.compiler.batch.GCCMain.main(GCCMain.java:492)

for hello.java - nothing, and no hello executable or anything else.

Java VM: sun-jdk-1.6
ecj: ecj-3.3
gcc: 4.3.1-r1
COMPILERS="javac ecj-3.3 jikes"

------- Comment #20 From James Le Cuirot 2008-08-02 21:19:11 0000 -------
My ecj1 is at /usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.1/ecj1, which is where
it should be. You definitely used gcc from the overlay, right?

------- Comment #21 From Mark Loeser 2008-08-03 01:43:43 0000 -------
This has been fixed in the tree.  Thanks all.

------- Comment #22 From Andrew John Hughes 2008-08-03 10:51:17 0000 -------
Thanks for doing this.  Just for the record, ecj.jar was not removed, it's a
new external dependency from gcc 4.3 onwards.

------- Comment #23 From Helmut Jarausch 2008-09-02 12:35:47 0000 -------
(In reply to comment #21)
> This has been fixed in the tree.  Thanks all.
> 

When or where is the new ebuild available? (not yet in the standard
emerge 2008/09/02)

------- Comment #24 From Vlastimil Babka (Caster) 2008-09-15 12:06:11 0000 -------
Please consider revbumping as we still get bug reports about this from people
who didn't recompile gcc after the fix.

------- Comment #25 From Vlastimil Babka (Caster) 2008-09-15 12:06:36 0000 -------
*** Bug 236398 has been marked as a duplicate of this bug. ***

------- Comment #26 From Patrizio Bassi 2008-09-21 11:18:07 0000 -------
my gcc is still failing, needs a revdump? seems i'm running the latest one

------- Comment #27 From Patrizio Bassi 2008-10-01 17:07:16 0000 -------
after re-emerging it works.
looks fixed in the portage tree

------- Comment #28 From Mark Loeser 2008-10-04 21:14:48 0000 -------
gcc 4.3.2 is now in the tree, so everyone will be getting that version now
anyway.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug