public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "bugtrack at roumenpetrov dot info" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug java/42311]  New: Cross build fails because native gcj needed to build ecjx
Date: Sun, 06 Dec 2009 17:49:00 -0000	[thread overview]
Message-ID: <bug-42311-17984@http.gcc.gnu.org/bugzilla/> (raw)

+++ This bug was initially created as a clone of Bug #30591 +++

> ecjx is a java program used as part of the gcj compilation process.  Because it is written in java and > runs on the host, it needs a host version of gcj to build it.
> 
> Here is the error I am getting:
> 
> make[3]: *** [ecjx] Error 127
> make[3]: Leaving directory `/home/daney/gccsvn/mipsel-trunk/mipsel-linux/libjava'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/daney/gccsvn/mipsel-trunk/mipsel-linux/libjava'
> make[1]: *** [all-target-libjava] Error 2
> make[1]: Leaving directory `/home/daney/gccsvn/mipsel-trunk'
> make: *** [all] Error 2
> 
> There seem to be two ways to fix this:
> 
> 1) In a cross build, build a complete gcc/g++/gcj in build-i686-pc-linux-gnu along with fixincldes and > libiberty.
> 
> 2) Have configure check for a good version of gcj that is already installed and use that

Bug #30591 is closed by the reason from
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30591#c6 .

I would like to clone issue as cross build obj ecjx don't work in my case:
The part of .../gcc/Makefile is:
build=i486-pc-linux-gnu
host=i486-pc-linux-gnu
target=i486-pc-mingw32

The part of ../i486-mingw32/libjava/Makefile
build_triplet = i486-pc-linux-gnu
host_triplet = i486-pc-mingw32
target_triplet = i486-pc-mingw32


It seems to me ecjx can't be build as part of libjava build process:
- build of ecjx.o
..../build/gcc-i486-mingw32/./gcc/xgcc .... -c -o ecjx.o
../../../src/gcc-4.4.0/libjava/ecjx.cc ...
- build of executable :
i486-pc-linux-gcj -o ecjx.exe .... ecjx.o
make: i486-pc-linux-gcj: Command not found

So far so good but may native compiler is :
/usr/bin/gcj with symlink to
/usr/bin/i486-slackware-linux-gcj
So the first problem is why is not peeked correct compiler ? Note that C, C++,
Fortran builds just fine.

Next lets create a symlink to "missing" gcj compiler:
# cd /usr/bin; ln -s gcj i486-pc-linux-gc
$ make ecjx.exe
i486-pc-linux-gcj -o ecjx.exe ...  ecjx.o
ecjx.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status

And this is expected as :
$ file ecjx.o
ecjx.o: 80386 COFF executable not stripped - version 30821


-- 
           Summary: Cross build fails because native gcj needed to build
                    ecjx
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bugtrack at roumenpetrov dot info
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-mingw32


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42311


             reply	other threads:[~2009-12-06 17:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06 17:49 bugtrack at roumenpetrov dot info [this message]
2010-07-07 14:39 ` [Bug java/42311] " dmitrij dot ledkov at ubuntu dot com
2010-07-10  8:57 ` bugtrack at roumenpetrov dot info

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-42311-17984@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).