From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23710 invoked by alias); 6 Dec 2009 17:49:02 -0000 Received: (qmail 23690 invoked by uid 48); 6 Dec 2009 17:49:01 -0000 Date: Sun, 06 Dec 2009 17:49:00 -0000 Subject: [Bug java/42311] New: Cross build fails because native gcj needed to build ecjx X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "bugtrack at roumenpetrov dot info" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2009-q4/txt/msg00082.txt.bz2 +++ 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