From: Andrew Haley <aph@redhat.com>
To: Daniel Andrzejewski <mastadan@o2.pl>
Cc: java@gcc.gnu.org
Subject: Re: ecj1 in cross-compile
Date: Thu, 14 Aug 2008 16:11:00 -0000 [thread overview]
Message-ID: <48A458CC.40907@redhat.com> (raw)
In-Reply-To: <18984135.post@talk.nabble.com>
Daniel Andrzejewski wrote:
>
> Hi Andrew,
>
> Thank you for your reply.
>
> I'm going to try 'make check-target-libjava', but for now it looks like I
> found the solution to my compilation problem:
>
> export CLASSPATH=.:/home/scratch/daniel/:/sw/java-jdk/ecj.jar
>
> ~> /scratch/daniel> gcj --main=HelloWorld -o HelloWorld HelloWorld.java
> ~> /scratch/daniel> ./HelloWorld
> Hello World!
I have not the slightest idea why that should make any difference. After
all, your ecj1 script set the classpath. But I never understood what was
causing your problem anyway.
> Success! But ...
>
> ~> /scratch/daniel> file HelloWorld
>
> HelloWorld: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for
> GNU/Linux 2.4.1, dynamically linked (uses shared libs), not stripped
>
> ~> /scratch/daniel> ldd HelloWorld
> libm.so.6 => /lib64/tls/libm.so.6 (0x00002b1b953be000)
> libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x00002b1b95515000)
> librt.so.1 => /lib64/tls/librt.so.1 (0x00002b1b95629000)
> libz.so.1 => /lib64/libz.so.1 (0x00002b1b95732000)
> libdl.so.2 => /lib64/libdl.so.2 (0x00002b1b95845000)
> libc.so.6 => /lib64/tls/libc.so.6 (0x00002b1b95948000)
> /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
> (0x00002b1b952a7000)
>
>
> I really need to build gcc with static libraries, so my final result would
> look like this:
>
> daniel@acai ~/mpi> ldd hello
> not a dynamic executable
That path is fraught with pain and disaster. Java is inherently a dynamic
language and many components use runtime class lookup, so statically
linking fails. However, after a lot of difficulties some people on this
list have successfully statically linked with gcj; perhaps they can help you.
Andrew.
prev parent reply other threads:[~2008-08-14 16:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-11 7:37 Matthijs van de Water
2008-06-11 8:35 ` Andrew Haley
2008-06-11 16:32 ` David Daney
2008-08-13 20:51 ` Daniel Andrzejewski
2008-08-14 10:08 ` Andrew Haley
2008-08-14 14:13 ` Daniel Andrzejewski
2008-08-14 14:42 ` Andrew Haley
2008-08-14 15:40 ` Daniel Andrzejewski
2008-08-14 16:11 ` Andrew Haley [this message]
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=48A458CC.40907@redhat.com \
--to=aph@redhat.com \
--cc=java@gcc.gnu.org \
--cc=mastadan@o2.pl \
/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).