This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
static linking -> binarie segfaults
- From: Andrew Haley <aph at redhat dot com>
- To: Jörg Maisenbacher <joerg at maisenbachers dot de>
- Cc: java at gcc dot gnu dot org
- Date: Wed, 1 Oct 2003 15:35:43 +0100
- Subject: static linking -> binarie segfaults
- References: <3F7ADCAA.3020701@maisenbachers.de>
Jörg Maisenbacher writes:
> Hy,
> now as we plan to distribute our nice little application, and we see
> that most of the people have an older environment as we have, we want to
> distribute static-builds, but this is where the problem start, the
> static binaries segfault.
>
> Take this little test:
> Test.java:
> -------
> public class Test {
> public static void main(String[] args) {
> Test test = new Test();
> test.run();
> }
> private void run() {
> System.out.println("static testing");
> }
> }
> -------
> compile it with:
> $ gcj -v -o test.static --main=Test Test.java -static
> and run
>
> $ ./test.static
> Segmentation fault
It works for me.
cuddles:~ $ gcj -o test.static --main=Test Test.java -static
cuddles:~ $ ./test.static
static testing
>
> So my very stupid question is: What am i doing wrong?
I don't know. How is anyone supposed to find out if you don't tell us
anything about which release and which platform you're using?
Andrew.