compilation problems with ecj.jar

Andrew Haley aph@redhat.com
Wed Jan 17 10:58:00 GMT 2007


Marco Trudel writes:
 > Andrew Haley wrote:
 > > Marco Trudel writes:
 > > > Andrew Haley wrote:
 > > > gcj: Internal error: Segmentation fault (program jc1)
 > > > Please submit a full bug report.
 > > > 
 > > > Maybe I patched the wrong Makefile.am? I patched the one in the libjava 
 > > > dir...
 > > 
 > > And you did run automake afterwards?
 > 
 > What is automake for? I tried to do a new gcj compilation.
It makes Makefile.in from Makefile.am. See http://gcc.gnu.org/install/prerequisites.html.
 > I assume that will automatically use the new Makefile.am.
You do presume things.
 > > > > > BTW,l there are more problems with compiling ecj.jar for
 > > > > > cross-compiling. Creating a host-linux, target-windows GCJ will
 > > > > > create a ecj.exe what is definitely the wrong thing to do.
 > > > >
 > > > > It's the right thing to do. You have to build the ecj.exe for
 > > > > GNU/Linux as a separate step when building the GNU/Linux native
 > > > > compiler. If you don't want ecj.exe for the target, don't include
 > > > > ecj.jar in the build tree.
 > > > 
 > > > What do I need a "exe" for on Linux?
 > > 
 > > It's a Windows executable that compiles .java -> .class. If you're
 > > going to compile Java source on Windows, you'll need it.
 > 
 > But if I'd like to compile Java source on Windows, I would build a 
 > host=Windows target=Windows gcj. In my case, I have no use for ecj.exe 
 > since the a compilation happens on Linux.
As I said, If you don't want ecj.exe for the target, don't include
ecj.jar in the build tree.
 > > If you want to compile Java source on Linux, even if your target is
 > > Windows, you must build a Linux *native* compiler to get ecj.exe.
 > 
 > Isn't that somewhat senseless? If I only need a host=Linux 
 > target=Windows compiler, I also have to compile a host=Linux 
 > target=Linux gcj just to get my ecj and be able to compile .java source 
 > files on Linux?
Yes.
ecj is a program that is written in Java.
To run ecj you will need a native Java library.
This is obviously true regardless of the target.
 > But I get a ecj.exe for Windows that I don't need on Windows since my 
 > gcj only runs on Linux?
 > Where is the advantage of getting ecj for Windows?
So don't build it, then.
 > > > If I get a ecj.exe, what can I do with it? I wont be able to
 > > > compile .java files on Linux and its useless on Windows as far as I
 > > > can see. But I'd be glad to learn better...
 > > 
 > > You need it for the Windows compiler.
 > 
 > Which Windows compiler?
The Windows native compiler. If you don't intend to build a Windows
native compiler, then you won't need it.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /