This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linux audio software using gcj&swt!


Norbert Frese wrote:

i guess building a static binary (which includes libgcj) on linux is
really a tricky task. i've seen that other people gave up on this (read
the posts on this mailing list). :-(

/me was one of these persons, maybe i can contribute some of my experiences. Here are my experiences:


I once referred to this little test:
/*start Test.java*/
public class Test {
        public static void main(String[] args) {
                Test test = new Test();
                test.run();
        }
        private void run() {
                System.out.println("passed the test");
        }
}
/*end Test.java*/

I compiled on a debian woody with self-comiled gcj 3.4 (CVS) in the following way:
woody$ gcj -o test-static --main=Test Test.java -static


when I start this on the box I compiled it, it runs fine
woody$ ./test.static
passed the test

If i take the same binary and copy it on a debian sarge box CPU-usage increases to ~100%
sarge$ ./test.static
(and it takes quite a while, until:)
Segmentation fault


And see, that i don't have any SWT included, so this is _not_ SWT-related.

if i strace this nice little app, i see clearly, that it tries to open

/lib/libnss_compat.so.2
/lib/libnsl.so.1
/lib/libc.so.6
/lib/ld-linux.so.2

so it accesses some shared-libs, if someone is interested, i can send the whole strace-log. (or whatever you want to have...)

I hope, this information helps

joerg

--
Jörg Maisenbacher
   "There are only 10 types of people in the world:
    Those who understand binary and those who don't."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]